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;
		}

Changelog

Changelog
Version Description
3.8.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.