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.

Method of the class: ACF_Admin_Email_Opt_In_Banner{}

No Hooks.

Returns

true|false.

Usage

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

Changelog

Since 6.8.6 Introduced.

ACF_Admin_Email_Opt_In_Banner::is_supported_screen() code 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;
}