$39 GRAYBYTE WORDPRESS FILE MANAGER $57

SERVER : in-mum-web1330.main-hosting.eu #1 SMP Mon Feb 10 22:45:17 UTC 2025
SERVER IP : 88.222.222.18 | ADMIN IP 216.73.216.215
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/u550391411/domains/ukbhatia.com/public_html/wp-content/themes/yobazar/admin/

HOME
Current File : /home/u550391411/domains/ukbhatia.com/public_html/wp-content/themes/yobazar/admin//functions.php
<?php
add_action('init', 'yobazar_get_default_theme_options');
function yobazar_get_default_theme_options(){
	global $yobazar_theme_options;
	if( empty( $yobazar_theme_options ) ){
		include get_template_directory() . '/admin/options.php';
		foreach( $option_fields as $fields ){
			foreach( $fields as $field ){
				if( in_array($field['type'], array('section', 'info')) ){
					continue;
				}
				if( isset($field['default']) ){
					$yobazar_theme_options[ $field['id'] ] = $field['default'];
				}
			}
		}
	}
}

function yobazar_get_theme_options( $key = '', $default = '' ){
	global $yobazar_theme_options;
	
	if( !$key ){
		return $yobazar_theme_options;
	}
	else if( isset($yobazar_theme_options[$key]) ){
		return $yobazar_theme_options[$key];
	}
	else{
		return $default;
	}
}

function yobazar_change_theme_options( $key, $value ){
	global $yobazar_theme_options;
	if( isset( $yobazar_theme_options[$key] ) ){
		$yobazar_theme_options[$key] = $value;
	}
}

add_filter('redux/validate/yobazar_theme_options/defaults', 'yobazar_set_default_color_options_on_reset');
add_filter('redux/validate/yobazar_theme_options/defaults_section', 'yobazar_set_default_color_options_on_reset');
function yobazar_set_default_color_options_on_reset( $options_defaults ){
	if( !isset($options_defaults['redux-section']) || ( isset($options_defaults['redux-section']) && $options_defaults['redux-section'] == 2 ) ){
		if( isset($options_defaults['ts_color_scheme']) ){
			$preset_colors = array();
			include get_template_directory() . '/admin/preset-colors/' . $options_defaults['ts_color_scheme'] . '.php';
			foreach( $preset_colors as $key => $value ){
				if( isset($options_defaults[$key]) ){
					$options_defaults[$key] = $value;
				}
			}
		}
	}
	return $options_defaults;
}

function yobazar_get_preset_color_options( $color ){
	$preset_colors = array();
	include get_template_directory() . '/admin/preset-colors/' . $color . '.php';
	return $preset_colors;
}

add_action('add_option_yobazar_theme_options', 'yobazar_create_dynamic_css', 10, 2);
function yobazar_create_dynamic_css( $option, $value ){
	yobazar_update_dynamic_css($value, $value, $option);
}

add_action('update_option_yobazar_theme_options', 'yobazar_update_dynamic_css', 10, 3);
function yobazar_update_dynamic_css( $old_value, $value, $option ){
	if( is_array($value) ){
		$data = $value;
		$upload_dir = wp_get_upload_dir();
		$filename_dir = trailingslashit($upload_dir['basedir']) . strtolower(str_replace(' ', '', wp_get_theme()->get('Name'))) . '.css';
		ob_start();
		include get_template_directory() . '/framework/dynamic_style.php';
		$dynamic_css = ob_get_contents();
		ob_end_clean();
		
		global $wp_filesystem;
		if( empty( $wp_filesystem ) ) {
			require_once ABSPATH .'/wp-admin/includes/file.php';
			WP_Filesystem();
		}
		
		$creds = request_filesystem_credentials($filename_dir, '', false, false, array());
		if( ! WP_Filesystem($creds) ){
			return false;
		}

		if( $wp_filesystem ) {
			$wp_filesystem->put_contents(
				$filename_dir,
				$dynamic_css,
				FS_CHMOD_FILE
			);
		}
	}
}

add_filter('redux/yobazar_theme_options/localize', 'yobazar_remove_redux_ads', 99);
function yobazar_remove_redux_ads( $localize_data ){
	if( isset($localize_data['rAds']) ){
		$localize_data['rAds'] = '';
	}
	return $localize_data;
}

if( is_admin() && isset($_GET['page']) && $_GET['page'] == 'themeoptions' ){
	add_filter('upload_mimes', 'yobazar_allow_upload_font_files');
	function yobazar_allow_upload_font_files( $existing_mimes = array() ){
		$existing_mimes['ttf'] = 'font/ttf';
		return $existing_mimes;
	}
}

function yobazar_get_footer_block_options(){
	$footer_blocks = array('0' => esc_html__('No Footer', 'yobazar'));
	$args = array(
		'post_type'			=> 'ts_footer_block'
		,'post_status'	 	=> 'publish'
		,'posts_per_page' 	=> -1
	);

	$posts = new WP_Query($args);

	if( !empty( $posts->posts ) && is_array( $posts->posts ) ){
		foreach( $posts->posts as $p ){
			$footer_blocks[$p->ID] = $p->post_title;
		}
	}

	wp_reset_postdata();
	
	return $footer_blocks;
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
18 Dec 2023 8.41 AM
u550391411 / o200927086
0755
assets
--
18 Dec 2023 8.41 AM
u550391411 / o200927086
0755
preset-colors
--
18 Dec 2023 8.41 AM
u550391411 / o200927086
0755
functions.php
3.964 KB
18 Dec 2023 8.41 AM
u550391411 / o200927086
0644
init.php
0.195 KB
18 Dec 2023 8.41 AM
u550391411 / o200927086
0644
options.php
107.8 KB
18 Dec 2023 8.41 AM
u550391411 / o200927086
0644
redux.php
9.519 KB
18 Dec 2023 8.41 AM
u550391411 / o200927086
0644
register_sidebar.php
6.001 KB
18 Dec 2023 8.41 AM
u550391411 / o200927086
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF