5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
22 if ( ! parent::is_admin() ) {
29 if ( ! (
$args = func_get_args() ) ) {
41 if( function_exists(
'\get_current_screen' ) || function_exists(
'get_current_screen' ) ) {
42 $current_screen = \get_current_screen();
44 $current_screen =
false;
47 if ( $current_screen && $current_screen->post_type ==
'gravityview' ) {
48 if (
'edit' === $current_screen->base ) {
50 } elseif (
'post' === $current_screen->base ) {
52 } elseif(
'gravityview_page_gv-changelog' === $current_screen->id ) {
53 $is_page =
'changelog';
54 } elseif(
'gravityview_page_gv-getting-started' === $current_screen->id ) {
55 $is_page =
'getting-started';
56 } elseif(
'gravityview_page_gv-credits' === $current_screen->id ) {
66 $is_page = apply_filters(
'gravityview_is_admin_page', $is_page, $hook );
69 if ( ! empty( $context ) ) {
70 return $is_page === $context;
If this file is called directly, abort.
If this file is called directly, abort.
static is_admin()
Check if WordPress is_admin(), and whether we have a GravityView page.
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.