Astra_Meta_Boxes::check_page_header_availability()
Checking the page headers are available and have some posts with it.
Description
Return
(bool) true|false.
Source
File: inc/metabox/class-astra-meta-boxes.php
public function check_page_header_availability() {
if ( ! defined( 'ASTRA_EXT_VER' ) ) {
return false;
}
if ( class_exists( 'Astra_Ext_Extension' ) && ! Astra_Ext_Extension::is_active( 'advanced-headers' ) ) {
return false;
}
/** @psalm-suppress UndefinedClass */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
$page_headers = Astra_Target_Rules_Fields::get_post_selection( 'astra_adv_header' );
/** @psalm-suppress UndefinedClass */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
if ( empty( $page_headers ) ) {
return false;
}
return true;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 3.8.0 | Introduced. |