List Tables: AJAX actions for List Tables do not need to declare global $wp_list_table. List tables on admin screens are in global scope, and they contain hooks that don't pass the the list table as context, hence using globals there so that functions can import them. That problem does not exist in the AJAX actions, which are virtually impossible to hook into as is.

See #37699.

Built from https://develop.svn.wordpress.org/trunk@38455


git-svn-id: http://core.svn.wordpress.org/trunk@38396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2016-08-30 20:07:29 +00:00
parent 800fb85d1e
commit 5d94d97b29
3 changed files with 20 additions and 38 deletions

View File

@@ -63,7 +63,7 @@ function _get_list_table( $class, $args = array() ) {
* @see get_column_headers(), print_column_headers(), get_hidden_columns()
*/
function register_column_headers($screen, $columns) {
$wp_list_table = new _WP_List_Table_Compat($screen, $columns);
new _WP_List_Table_Compat( $screen, $columns );
}
/**