Astra_Customizer_Notices_Configs::is_custom_layout_header()
Decide if Notice for Header Built using Custom Layout should be displayed.
Description
This runs teh target rules to check if the page neing previewed has a header built using Custom Layout.
Return
(boolean) True - If the notice should be displayed, False - If the notice should be hidden.
Source
File: classes/customizer/class-astra-customizer-notices-configs.php
public function is_custom_layout_header() { $option = array( 'location' => 'ast-advanced-hook-location', 'exclusion' => 'ast-advanced-hook-exclusion', 'users' => 'ast-advanced-hook-users', ); $advanced_hooks = Astra_Target_Rules_Fields::get_instance()->get_posts_by_conditions( ASTRA_ADVANCED_HOOKS_POST_TYPE, $option ); foreach ( $advanced_hooks as $post_id => $post_data ) { $layout = get_post_meta( $post_id, 'ast-advanced-hook-layout', false ); if ( isset( $layout[0] ) && 'header' == $layout[0] ) { return true; } } return false; }
Expand full source code Collapse full source code View on Trac