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
/** | |
* Remove unviewable post types from customizer | |
*/ | |
add_filter( | |
'blocksy:custom_post_types:supported_list', | |
function ( $post_types ) { | |
foreach ( $post_types as $key => $post_type ) { | |
if ( ! is_post_type_viewable( $post_type ) ) { | |
unset( $post_types[ $key ] ); | |
} |
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
/* | |
* Set the default meta description in SEOPress if a post/page is built with Bricks | |
*/ | |
add_filter('seopress_titles_desc', 'seopress_set_bricks_default_description'); | |
function seopress_set_bricks_default_description($description) | |
{ | |
if (!empty(trim($description))) { | |
return $description; | |
} |
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
/** | |
* Enqueue the Kadence lightbox styles and scripts | |
*/ | |
add_action('wp_enqueue_scripts', function() { | |
if ( !is_plugin_active( 'kadence-blocks/kadence-blocks.php' ) ) { | |
return; | |
} | |
if ( is_singular('post') ) { | |
wp_enqueue_style('kadence-glightbox', KADENCE_BLOCKS_URL . 'includes/assets/css/kb-glightbox.min.css', array(), KADENCE_BLOCKS_VERSION); |
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
/** | |
* Set the colors from Blocksy to match those of Kadence blocks | |
*/ | |
add_filter('kadence_blocks_pattern_global_colors', function($kadence_colors) { | |
if ( !function_exists('blocksy_get_theme_mod') ) { | |
return $kadence_colors; | |
} | |
$colorPalette = (array) blocksy_get_theme_mod('colorPalette'); |