| 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/framework/modules/header/lib/ |
Upload File : |
<?php
use TrackStoreElated\Modules\Header\Lib;
if(!function_exists('trackstore_elated_get_header_type_options')) {
/**
* This function collect all header types values and forward them to header factory file for further processing
*/
function trackstore_elated_get_header_type_options() {
do_action('trackstore_elated_before_header_function_init');
$header_types_option = apply_filters('trackstore_elated_register_header_type_class', $header_types_option = array());
return $header_types_option;
}
}
if(!function_exists('trackstore_elated_set_default_logo_height_for_header_types')) {
/**
* This function set default logo area height for header types
*/
function trackstore_elated_set_default_logo_height_for_header_types() {
$logo_height_meta = trackstore_elated_filter_px( trackstore_elated_options()->getOptionValue( 'logo_area_height' ) );
$logo_height = !empty($logo_height_meta) ? intval( $logo_height_meta ) : 105;
return apply_filters('trackstore_elated_set_default_logo_height_value_for_header_types', $logo_height);
}
}
if(!function_exists('trackstore_elated_set_default_menu_height_for_header_types')) {
/**
* This function set default menu area height for header types
*/
function trackstore_elated_set_default_menu_height_for_header_types() {
$menu_height_meta = trackstore_elated_filter_px( trackstore_elated_options()->getOptionValue( 'menu_area_height' ) );
$menu_height = !empty($menu_height_meta) ? intval( $menu_height_meta ) : 105;
return apply_filters('trackstore_elated_set_default_menu_height_value_for_header_types', $menu_height);
}
}
if(!function_exists('trackstore_elated_set_default_mobile_menu_height_for_header_types')) {
/**
* This function set default mobile menu area height for header types
*/
function trackstore_elated_set_default_mobile_menu_height_for_header_types() {
$mobile_menu_height_meta = trackstore_elated_filter_px( trackstore_elated_options()->getOptionValue( 'mobile_header_height' ) );
$mobile_menu_height = !empty($mobile_menu_height_meta) ? intval( $mobile_menu_height_meta ) : 70;
return apply_filters('trackstore_elated_set_default_mobile_menu_height_value_for_header_types', $mobile_menu_height);
}
}
if(!function_exists('trackstore_elated_set_header_object')) {
/**
* This function is used to instance header type object
*/
function trackstore_elated_set_header_object() {
$header_type = trackstore_elated_get_meta_field_intersect('header_type', trackstore_elated_get_page_id());
$header_types_option = trackstore_elated_get_header_type_options();
$object = Lib\HeaderFactory::getInstance()->build($header_type, $header_types_option);
if(Lib\HeaderFactory::getInstance()->validHeaderObject()) {
$header_connector = new Lib\TrackStoreElatedHeaderConnector($object);
$header_connector->connect($object->getConnectConfig());
}
}
add_action('wp', 'trackstore_elated_set_header_object', 1);
}