| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/www/wp-content/themes/trackstore/trackstore/includes/ |
Upload File : |
<?php
if ( ! function_exists( 'trackstore_elated_theme_version_class' ) ) {
/**
* Function that adds classes on body for version of theme
*/
function trackstore_elated_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', 'trackstore_elated_theme_version_class' );
}
if ( ! function_exists( 'trackstore_elated_boxed_class' ) ) {
/**
* Function that adds classes on body for boxed layout
*/
function trackstore_elated_boxed_class( $classes ) {
$allow_boxed_layout = true;
$allow_boxed_layout = apply_filters( 'trackstore_elated_allow_content_boxed_layout', $allow_boxed_layout );
if ( $allow_boxed_layout && trackstore_elated_get_meta_field_intersect( 'boxed' ) === 'yes' ) {
$classes[] = 'eltd-boxed';
}
return $classes;
}
add_filter( 'body_class', 'trackstore_elated_boxed_class' );
}
if ( ! function_exists( 'trackstore_elated_paspartu_class' ) ) {
/**
* Function that adds classes on body for paspartu layout
*/
function trackstore_elated_paspartu_class( $classes ) {
$id = trackstore_elated_get_page_id();
//is paspartu layout turned on?
if ( trackstore_elated_get_meta_field_intersect( 'paspartu', $id ) === 'yes' ) {
$classes[] = 'eltd-paspartu-enabled';
if ( trackstore_elated_get_meta_field_intersect( 'disable_top_paspartu', $id ) === 'yes' ) {
$classes[] = 'eltd-top-paspartu-disabled';
}
}
return $classes;
}
add_filter( 'body_class', 'trackstore_elated_paspartu_class' );
}
if ( ! function_exists( 'trackstore_elated_page_smooth_scroll_class' ) ) {
/**
* Function that adds classes on body for page smooth scroll
*/
function trackstore_elated_page_smooth_scroll_class( $classes ) {
//is smooth scroll enabled enabled?
if ( trackstore_elated_options()->getOptionValue( 'page_smooth_scroll' ) == 'yes' ) {
$classes[] = 'eltd-smooth-scroll';
}
return $classes;
}
add_filter( 'body_class', 'trackstore_elated_page_smooth_scroll_class' );
}
if ( ! function_exists( 'trackstore_elated_smooth_page_transitions_class' ) ) {
/**
* Function that adds classes on body for smooth page transitions
*/
function trackstore_elated_smooth_page_transitions_class( $classes ) {
$id = trackstore_elated_get_page_id();
if ( trackstore_elated_get_meta_field_intersect( 'smooth_page_transitions', $id ) == 'yes' ) {
$classes[] = 'eltd-smooth-page-transitions';
if ( trackstore_elated_get_meta_field_intersect( 'page_transition_preloader', $id ) == 'yes' ) {
$classes[] = 'eltd-smooth-page-transitions-preloader';
}
if ( trackstore_elated_get_meta_field_intersect( 'page_transition_fadeout', $id ) == 'yes' ) {
$classes[] = 'eltd-smooth-page-transitions-fadeout';
}
}
return $classes;
}
add_filter( 'body_class', 'trackstore_elated_smooth_page_transitions_class' );
}
if ( ! function_exists( 'trackstore_elated_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 trackstore_elated_content_initial_width_body_class( $classes ) {
$initial_content_width = trackstore_elated_get_meta_field_intersect( 'initial_content_width', trackstore_elated_get_page_id() );
if ( ! empty( $initial_content_width ) ) {
$classes[] = $initial_content_width;
}
return $classes;
}
add_filter( 'body_class', 'trackstore_elated_content_initial_width_body_class' );
}
if ( ! function_exists( 'trackstore_elated_set_content_behind_header_class' ) ) {
function trackstore_elated_set_content_behind_header_class( $classes ) {
$id = trackstore_elated_get_page_id();
if ( get_post_meta( $id, 'eltd_page_content_behind_header_meta', true ) === 'yes' ) {
$classes[] = 'eltd-content-is-behind-header';
}
return $classes;
}
add_filter( 'body_class', 'trackstore_elated_set_content_behind_header_class' );
}