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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38455 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2016-08-30 20:06:30 +00:00
parent 7ca480cc4e
commit 6d894b4274
2 changed files with 19 additions and 37 deletions
+1 -1
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 );
}
/**