From 262ee531cbac1fe98ddcb110137a74d7bf82a63c Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 26 Nov 2012 03:39:29 +0000 Subject: [PATCH] Only pass the current screen to the list table constructor when we have a screen to work with. This is not the case for admin-ajax requests. fixes #22570. git-svn-id: http://core.svn.wordpress.org/trunk@22838 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/list-table.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/list-table.php b/wp-admin/includes/list-table.php index bccf0cab33..071df0dcc5 100644 --- a/wp-admin/includes/list-table.php +++ b/wp-admin/includes/list-table.php @@ -43,8 +43,10 @@ function _get_list_table( $class, $args = array() ) { if ( isset( $args['screen'] ) ) $args['screen'] = convert_to_screen( $args['screen'] ); - else + elseif ( isset( $GLOBALS['hook_suffix'] ) ) $args['screen'] = get_current_screen(); + else + $args['screen'] = null; return new $class( $args ); }