This file contains 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_filter('__screen_layout', 'my_layout', 10, 2); | |
function my_layout($id, $arg){ | |
$global_layout = TC_init::$instance -> global_layout; | |
if ( $arg == 'class'){ | |
return $global_layout['b']['content']; | |
} | |
return 'b'; | |
} | |
?> |
This file contains 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
/* Works with Customizr > 3.3.26 and Customizr-Pro > 1.1.9 */ | |
add_filter('tc_core', 'use_custom_slider_class'); | |
function use_custom_slider_class($classes){ | |
//don't instantiate default class | |
unset( $classes['content'][ | |
array_search(array('inc/parts','slider'), $classes['content']) | |
] | |
); | |
//instantiate our class | |
new TC_Slider_mod; |
This file contains 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
// header content wrapped | |
add_action('after_setup_theme', 'wrap_header'); | |
function wrap_header(){ | |
add_action('__header', 'tc_header_header_start', 0); | |
function tc_header_header_start(){ | |
echo '<div class="tc-header-container container">'; | |
} | |
add_action('__header', 'tc_header_header_end', 40); | |
function tc_header_header_end(){ | |
echo '</div>'; |
This file contains 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
/* source: http://www.geekpedia.com/code152_Get-The-Current-Season.html */ | |
function get_season() { | |
$season_slider = array('/12/21'=>'winter', | |
'/09/21'=>'autumn', | |
'/06/21'=>'summer', | |
'/03/21'=>'spring', | |
'/01/01'=>'winter'); //this needed to be at Jan 1st | |
foreach ($season_slider as $key => $value) // Loop through the season dates | |
{ | |
$season_date = date("Y").$key; |
This file contains 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
// ==================================================================================================================== | |
// Customizr-Polylang bridge: Makes the Customizr theme or the Featured Pages Unlimited | |
// plugin compatible with Polylang; Runs only if Polylang is active; | |
// ==================================================================================================================== | |
// If Polylang is active, hook function on the admin pages | |
if ( function_exists( 'pll_register_string' ) ) add_action( 'admin_init', 'pll_tc_strings_setup' ); | |
function pll_tc_strings_setup() { | |
This file contains 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
add_filter('tc_logo_src' ,'my_logo'); | |
function my_logo($logo_src){ | |
if ( ! is_singular() ) | |
return; | |
$mylogo_src = array( | |
//page_or_post id => url | |
'31' => 'http://', | |
'4' => 'http:// ' | |
); |
OlderNewer