ACF_Admin_Email_Opt_In_Banner::is_supported_screenpublicACF 6.8.6

Returns true on the ACF Free admin screens the banner supports: the Field Groups, Post Types and Taxonomies list screens, and the Options Pages preview.

Метод класса: ACF_Admin_Email_Opt_In_Banner{}

Хуков нет.

Возвращает

boolean.

Использование

$ACF_Admin_Email_Opt_In_Banner = new ACF_Admin_Email_Opt_In_Banner();
$ACF_Admin_Email_Opt_In_Banner->is_supported_screen();

Список изменений

С версии 6.8.6 Введена.

Код ACF_Admin_Email_Opt_In_Banner::is_supported_screen() ACF 6.8.8

public function is_supported_screen() {
	$screens = array(
		'edit-acf-field-group',
		'edit-acf-post-type',
		'edit-acf-taxonomy',
	);

	foreach ( $screens as $screen ) {
		if ( acf_is_screen( $screen ) ) {
			return true;
		}
	}

	// The Options Pages preview is a submenu page rather than a list screen.
	if ( 'acf_options_preview' === acf_request_arg( 'page', '' ) ) {
		return true;
	}

	return false;
}