Handle screen arg in WP_Comments_List_Table constructor. Avoids warning when calling WP_Screen::get() later. fixes #22039

git-svn-id: https://develop.svn.wordpress.org/trunk@22085 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-09-29 10:05:15 +00:00
parent 7b00e4b156
commit 43e28ec704

View File

@ -21,7 +21,7 @@ class WP_Comments_List_Table extends WP_List_Table {
var $pending_count = array(); var $pending_count = array();
function __construct() { function __construct( $args = array() ) {
global $post_id; global $post_id;
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0; $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
@ -33,6 +33,7 @@ class WP_Comments_List_Table extends WP_List_Table {
'plural' => 'comments', 'plural' => 'comments',
'singular' => 'comment', 'singular' => 'comment',
'ajax' => true, 'ajax' => true,
'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
) ); ) );
} }