HEX
Server: Apache
System: Linux mare-tim-wwwmocrea 6.8.12-9-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-9 (2025-03-16T19:18Z) x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/www.mocrea.it/wp-content/themes/ottar/includes/edgtf-body-class-functions.php
<?php

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

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

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

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

        return $classes;
    }

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

if (!function_exists('ottar_edge_boxed_class')) {
    /**
     * Function that adds classes on body for boxed layout
     */
    function ottar_edge_boxed_class($classes) {
        $allow_boxed_layout = true;
        $allow_boxed_layout = apply_filters('ottar_edge_filter_allow_content_boxed_layout', $allow_boxed_layout);

        if ($allow_boxed_layout && ottar_edge_get_meta_field_intersect('boxed') === 'yes') {
            $classes[] = 'edgtf-boxed';
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_paspartu_class')) {
    /**
     * Function that adds classes on body for paspartu layout
     */
    function ottar_edge_paspartu_class($classes) {
        $id = ottar_edge_get_page_id();

        //is paspartu layout turned on?
        if (ottar_edge_get_meta_field_intersect('paspartu', $id) === 'yes') {
            $classes[] = 'edgtf-paspartu-enabled';

            if (ottar_edge_get_meta_field_intersect('disable_top_paspartu', $id) === 'yes') {
                $classes[] = 'edgtf-top-paspartu-disabled';
            }

            if (ottar_edge_get_meta_field_intersect('enable_fixed_paspartu', $id) === 'yes') {
                $classes[] = 'edgtf-fixed-paspartu-enabled';
            }
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_page_smooth_scroll_class')) {
    /**
     * Function that adds classes on body for page smooth scroll
     */
    function ottar_edge_page_smooth_scroll_class($classes) {
        //is smooth scroll enabled enabled?
        if (ottar_edge_options()->getOptionValue('page_smooth_scroll') == 'yes') {
            $classes[] = 'edgtf-smooth-scroll';
        }

        return $classes;
    }

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


if (!function_exists('ottar_edge_page_custom_cursor_class')) {
    /**
     * Function that adds classes on body for theme custom cursor
     */
    function ottar_edge_page_custom_cursor_class($classes) {
        //is smooth scroll enabled enabled?
        if (ottar_edge_options()->getOptionValue('custom_cursor') == 'yes') {
            $classes[] = 'edgtf-custom-cursor-enabled';
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_smooth_page_transitions_class')) {
    /**
     * Function that adds classes on body for smooth page transitions
     */
    function ottar_edge_smooth_page_transitions_class($classes) {
        $id = ottar_edge_get_page_id();

        if (ottar_edge_get_meta_field_intersect('smooth_page_transitions', $id) == 'yes') {
            $classes[] = 'edgtf-smooth-page-transitions';

            if (ottar_edge_get_meta_field_intersect('page_transition_preloader', $id) == 'yes') {
                $classes[] = 'edgtf-smooth-page-transitions-preloader';
            }

            if (ottar_edge_get_meta_field_intersect('page_transition_fadeout', $id) == 'yes') {
                $classes[] = 'edgtf-smooth-page-transitions-fadeout';
            }
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_content_initial_width_body_class')) {
    /**
     * Function that adds transparent content class to body.
     *
     * @param $classes array of body classes
     *
     * @return array with transparent content body class added
     */
    function ottar_edge_content_initial_width_body_class($classes) {
        $initial_content_width = ottar_edge_get_meta_field_intersect('initial_content_width', ottar_edge_get_page_id());

        if (!empty($initial_content_width)) {
            $classes[] = $initial_content_width;
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_set_content_behind_header_class')) {
    function ottar_edge_set_content_behind_header_class($classes) {
        $id = ottar_edge_get_page_id();

        if (get_post_meta($id, 'edgtf_page_content_behind_header_meta', true) === 'yes') {
            $classes[] = 'edgtf-content-is-behind-header';
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_set_no_google_api_class')) {
    function ottar_edge_set_no_google_api_class($classes) {
        $google_map_api = ottar_edge_options()->getOptionValue('google_maps_api_key');

        if (empty($google_map_api)) {
            $classes[] = 'edgtf-empty-google-api';
        }

        return $classes;
    }

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

if (!function_exists('ottar_edge_wide_menu_body_class')) {
    /**
     * Function that adds wide menu width control classes to body.
     *
     * @param $classes array of body classes
     *
     * @return array with wide menu width control body classes added
     */
    function ottar_edge_wide_menu_body_class($classes) {
        $wide_dropdown_menu_in_grid = ottar_edge_get_meta_field_intersect('wide_dropdown_menu_in_grid', ottar_edge_get_page_id());
        $wide_dropdown_menu_in_grid_meta = get_post_meta(ottar_edge_get_page_id(), 'edgtf_wide_dropdown_menu_in_grid_meta', true);

        $wide_dropdown_menu_content_in_grid = ottar_edge_get_meta_field_intersect('wide_dropdown_menu_content_in_grid', ottar_edge_get_page_id());
        $wide_dropdown_menu_content_in_grid_global = ottar_edge_options()->getOptionValue('wide_dropdown_menu_content_in_grid');

        if ($wide_dropdown_menu_in_grid === 'yes') {
            $classes[] = 'edgtf-wide-dropdown-menu-in-grid';
        } else if (!empty($wide_dropdown_menu_in_grid_meta) && $wide_dropdown_menu_content_in_grid === 'yes' || $wide_dropdown_menu_content_in_grid_global === 'yes') {
            $classes[] = 'edgtf-wide-dropdown-menu-content-in-grid';
        }

        return $classes;
    }

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