Last active
September 6, 2018 17:24
-
-
Save eto4detak/4abe15a761fcadb36ff172095e41c363 to your computer and use it in GitHub Desktop.
wp php autozone
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'my_styles_method35325235' ); | |
add_action('wp_print_footer_scripts', 'autozone_print_footer_color', 99 ); | |
function autozone_print_footer_color() { | |
global $autozone_opt_val; | |
?> | |
<style scoped> | |
.main-slider:after, .main-slider:before { | |
background-color: <?php echo $autozone_opt_val;?>; | |
} | |
</style> | |
<?php | |
} | |
function my_styles_method35325235() { | |
global $autozone_opt_val; | |
// wp_enqueue_style('custom-style', get_template_directory_uri() . '/css/custom_script.css'); | |
// $color = get_theme_mod( 'my-custom-color' ); // #FF0000 | |
$custom_css = " | |
.main-slider:after, .main-slider:before { | |
background-color:" . $autozone_opt_val . "; | |
}"; | |
wp_add_inline_style( 'custom-style', $custom_css ); | |
} | |
// $reflFunc = new ReflectionFunction('pixtheme_get_staticblock_content'); | |
// $tttt = $reflFunc->getFileName() . ':' . $reflFunc->getStartLine(); | |
// echo '<pre class="aaa" style="display:none">'; | |
// var_dump($tttt); | |
// echo '</pre>'; | |
add_filter( 'nav_menu_item_args', 'filter_function_name_271', 10, 3 ); | |
function filter_function_name_271( $args, $item, $depth ){ | |
// vardd2($args); | |
// vardd2($item); | |
// vardd2($depth); | |
return $args; | |
} | |
function vardd2($var) { | |
echo '<pre class="bbbb" style="display:none">'; | |
var_dump($var); | |
echo '</pre>'; | |
} | |
function vardd22($var) { | |
echo '<pre class="cccc" style="display:none">'; | |
var_dump($var); | |
echo '</pre>'; | |
} | |
// add_filter( 'wp_nav_menu_items', 'filter_function_name_4792', 9999999999, 2 ); | |
add_filter( 'wp_nav_menu_objects', 'filter_function_name_4792', 9999999999, 2 ); | |
function filter_function_name_4792( $items, $args ){ | |
// vardd2($args); | |
vardd2(0); | |
vardd2($items); | |
vardd22($args); | |
// if($args->menu->slug =='main-menu2' ){ | |
// vardd2(111111111111111111); | |
// vardd2($items); | |
// vardd2(222222222222222222); | |
// $items1 = wpm_translate_string ($items, 'en'); | |
// vardd2($items1); | |
// } | |
// $items = wpm_translate_string ($items, 'en'); | |
return $items; | |
} | |
// $str = ''; | |
// if(function_exists('wpm_translate_string')){ | |
// vardd2('yyyyyyyyyyy'); | |
// } | |
// $tt= wpm_translate_string ($str, 'en'); | |
// vardd2($tt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment