diff --git a/src/wp-admin/includes/class-wp-screen.php b/src/wp-admin/includes/class-wp-screen.php index 7b7290011c..61217462eb 100644 --- a/src/wp-admin/includes/class-wp-screen.php +++ b/src/wp-admin/includes/class-wp-screen.php @@ -212,6 +212,7 @@ final class WP_Screen { return $hook_name; } + $id = ''; $post_type = null; $taxonomy = null; $in_admin = false; @@ -220,7 +221,7 @@ final class WP_Screen { if ( $hook_name ) { $id = $hook_name; - } else { + } elseif ( ! empty( $GLOBALS['hook_suffix'] ) ) { $id = $GLOBALS['hook_suffix']; }