HEX
Server: Apache
System: Linux webm006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/cortonavolley/wp-content/themes/subway/includes/qode-body-classes.php
<?php

if ( ! function_exists( 'subway_qode_add_theme_version_class' ) ) {
    /**
     * Function that adds classes on body for version of theme
     */
    function subway_qode_add_theme_version_class( $classes ) {
        $current_theme = wp_get_theme();
        $theme_prefix  = 'subway';

        //is child theme activated?
        if ( $current_theme->parent() ) {
            //add child theme version
            $classes[] = $theme_prefix . '-child-theme-ver-' . $current_theme->get( 'Version' );

            //get parent theme
            $current_theme = $current_theme->parent();
        }

        if ( $current_theme->exists() && $current_theme->get( 'Version' ) != "" ) {
            $classes[] = $theme_prefix . '-theme-ver-' . $current_theme->get( 'Version' );
        }

        return $classes;
    }

    add_filter( 'body_class', 'subway_qode_add_theme_version_class' );
}


/* Add class on body for ajax */

if (!function_exists('subway_qode_ajax_classes')) {
    function subway_qode_ajax_classes($classes) {
        $global_options = subway_qode_return_global_options();

        $qode_animation="";
        if (isset($_SESSION['qode_animation'])) $qode_animation = $_SESSION['qode_animation'];
        if(($global_options['page_transitions'] === "0") && ($qode_animation == "no")) :
            $classes[] = '';
        elseif($global_options['page_transitions'] === "1" && (empty($qode_animation) || ($qode_animation != "no"))) :
            $classes[] = 'ajax_updown';
            $classes[] = 'page_not_loaded';
        elseif($global_options['page_transitions'] === "2" && (empty($qode_animation) || ($qode_animation != "no"))) :
            $classes[] = 'ajax_fade';
            $classes[] = 'page_not_loaded';
        elseif($global_options['page_transitions'] === "3" && (empty($qode_animation) || ($qode_animation != "no"))) :
            $classes[] = 'ajax_updown_fade';
            $classes[] = 'page_not_loaded';
        elseif($global_options['page_transitions'] === "4" && (empty($qode_animation) || ($qode_animation != "no"))) :
            $classes[] = 'ajax_leftright';
            $classes[] = 'page_not_loaded';
        elseif(!empty($qode_animation) && $qode_animation != "no") :
            $classes[] = 'page_not_loaded';
        else:
            $classes[] ="";
        endif;

        return $classes;
    }

    add_filter('body_class','subway_qode_ajax_classes');
}


/* Add class on body for smooth scroll */

if (!function_exists('subway_qode_smooth_class')) {
    function subway_qode_smooth_class($classes) {
        $global_options = subway_qode_return_global_options();

        $iPod    = stripos(getenv( "HTTP_USER_AGENT" ),"iPod");
        $iPhone  = stripos(getenv( "HTTP_USER_AGENT" ),"iPhone");
        $iPad    = stripos(getenv( "HTTP_USER_AGENT" ),"iPad");
        $mac    = stripos(getenv( "HTTP_USER_AGENT" ),"Mac");
        $isMobile = (bool)preg_match('#\b(ip(hone|od|ad)|android|opera m(ob|in)i|windows (phone|ce)|blackberry|tablet'.
            '|s(ymbian|eries60|amsung)|p(laybook|alm|rofile/midp|laystation portable)|nokia|fennec|htc[\-_]'.
            '|mobile|up\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\b#i', getenv( "HTTP_USER_AGENT" ) );

        $smooth_scroll = false;

        if(!$isMobile){
            if(isset($global_options['smooth_scroll']) && $global_options['smooth_scroll'] == "yes"){
                $smooth_scroll = true;
            }
            if (isset($_SESSION['qode_smooth'])) {
                if ($_SESSION['qode_smooth'] == "yes") $smooth_scroll = true;
                else $smooth_scroll = false;
            }
        }
        if($smooth_scroll) :
            $classes[] = 'smooth_scroll';
        else:
            $classes[] ="";
        endif;

        return $classes;
    }

    add_filter('body_class', 'subway_qode_smooth_class');
}


/* Add class on body boxed layout */

if (!function_exists('subway_qode_boxed_class')) {
    function subway_qode_boxed_class($classes) {
        $global_options = subway_qode_return_global_options();


        if(isset($global_options['boxed']) && $global_options['boxed'] == "yes") :
            $classes[] = 'boxed';
        else:
            $classes[] = "";
        endif;

        return $classes;
    }

    add_filter('body_class', 'subway_qode_boxed_class');
}