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
This commit is contained in:
parent
bfce253d49
commit
262ee531cb
|
@ -43,8 +43,10 @@ function _get_list_table( $class, $args = array() ) {
|
||||||
|
|
||||||
if ( isset( $args['screen'] ) )
|
if ( isset( $args['screen'] ) )
|
||||||
$args['screen'] = convert_to_screen( $args['screen'] );
|
$args['screen'] = convert_to_screen( $args['screen'] );
|
||||||
else
|
elseif ( isset( $GLOBALS['hook_suffix'] ) )
|
||||||
$args['screen'] = get_current_screen();
|
$args['screen'] = get_current_screen();
|
||||||
|
else
|
||||||
|
$args['screen'] = null;
|
||||||
|
|
||||||
return new $class( $args );
|
return new $class( $args );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue