HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/www/wp-content/plugins/schema/includes/admin/admin-pages.php
<?php
/**
 *  Determines whether the current admin page is an Schema admin page.
 *
 *  Only works after the `wp_loaded` hook, & most effective
 *  starting on `admin_menu` hook.
 *
 *  @since 1.0
 *  @return bool True if Schema admin page.
 */
function schema_wp_is_admin_page() {

	if ( ! is_admin() || ! did_action( 'wp_loaded' ) ) {
		$ret = false;
	}

	if( ! isset( $_GET['page'] ) ) {
		$ret = false;
	}

	$page  = isset( $_GET['page'] ) ? $_GET['page'] : '';
	
	$pages = array(
		'schema',
		'schema-extensions',
		'schema-wp-getting-started',
		'schema-wp-what-is-new',
		'schema-wp-credits'
	);

	$ret = in_array( $page, $pages );

	return apply_filters( 'schema_wp_is_admin_page', $ret );
}