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
/* WP Visual slidebox builder compatibility */ | |
// don't load wp-visual-slidebox plugin bootstrap js | |
add_action('wp_print_scripts', 'remove_bootstrap_js'); | |
function remove_bootstrap_js(){ | |
if ( is_admin() ) return; | |
wp_dequeue_script('bootstrap_js'); | |
} | |
// don't load wp-visual-slidebox plugin bootstrap.css | |
add_action('wp_print_styles', 'remove_bootstrap_css'); | |
function remove_bootstrap_css(){ |
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_skins_to_randomize', 'exclude_skins'); | |
function exclude_skins( $_skins ){ | |
$_my_excluded = array( | |
'grey.css', | |
'grey2.css' | |
); | |
foreach ( $_my_excluded as $key ) | |
if ( array_key_exists( $key, $_skins ) ) | |
unset( $_skins[$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
add_action('after_setup_theme', 'prevent_creation_unwanted_imagesizes', 20); | |
function prevent_creation_unwanted_imagesizes(){ | |
remove_image_size('slider-full'); /* full slider */ | |
remove_image_size('tc-thumb'); /* post list alternate layout and featured pages */ | |
remove_image_size('tc-rectangular-thumb'); /* alternate layout rectangular thumbs and post featured image */ | |
remove_image_size('tc-grid'); /* grid for more than one column */ | |
} |
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('fpc_block_display' , 'html_after_fpc'); | |
function html_after_fpc( $html) { | |
$_my_html = 'some html here'; | |
return $html . $_my_html . '<hr class="featurette-divider">'; | |
} |
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_default_widgets' , 'add_featured_page_widget' ); | |
function add_featured_page_widget( $defaults ) { | |
$defaults['fp_widgets'] = array( | |
'name' => __( 'Featured Pages Widget' , 'customizr' ), | |
'description' => __( 'Above the featured pages area on home' , 'customizr' ) | |
); | |
return $defaults; | |
} | |
add_filter('fpc_block_display' , 'display_my_fp_widget'); |
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_action('pre_get_posts', 'display_pages_in_home'); | |
function display_pages_in_home( $query ){ | |
if ( ! ( $query -> is_main_query() && $query -> is_home() ) ) | |
return; | |
//do not show sticky post, since we display pages | |
add_filter('tc_grid_expand_featured', '__return_false'); | |
$query-> set('post_type' , 'page' ); | |
} |
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_action('wp_footer', 'fancybox_inline_iframe'); | |
function fancybox_inline_iframe(){ | |
?> | |
<script type="text/javascript"> | |
( function($){ | |
"use strict"; | |
if ( 1 != TCParams.FancyBoxState || 'function' != typeof($.fn.fancybox) ) | |
return; |
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_default_widgets' , 'add_my_hap_widget_area' ); | |
function add_my_hap_widget_area( $defaults ) { | |
$defaults['hap-widget-area'] = array( | |
'name' => 'Home Widget Area', | |
'description' => 'Extra widget area after posts', | |
'before_widget' => '<div class="widget my-hap-widget">', | |
'after_widget' => '</div>', | |
); | |
return $defaults; | |
} |