List Tables: Define the global $mode
variable for Quick Edit savings.
Also remove two unused global imports for `$mode`. Fixes #34577. git-svn-id: https://develop.svn.wordpress.org/trunk@35518 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8cbd66ca86
commit
5ee5029109
@ -1586,7 +1586,7 @@ function wp_ajax_sample_permalink() {
|
||||
* @global WP_List_Table $wp_list_table
|
||||
*/
|
||||
function wp_ajax_inline_save() {
|
||||
global $wp_list_table;
|
||||
global $wp_list_table, $mode;
|
||||
|
||||
check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
|
||||
|
||||
@ -1659,6 +1659,8 @@ function wp_ajax_inline_save() {
|
||||
|
||||
$wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) );
|
||||
|
||||
$mode = $_POST['post_view'] === 'excerpt' ? 'excerpt' : 'list';
|
||||
|
||||
$level = 0;
|
||||
$request_post = array( get_post( $_POST['post_ID'] ) );
|
||||
$parent = $request_post[0]->post_parent;
|
||||
|
@ -490,7 +490,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
* list table.
|
||||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
*
|
||||
* @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
|
||||
*/
|
||||
do_action( 'manage_posts_extra_tablenav', $which );
|
||||
@ -507,16 +507,6 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
return parent::current_action();
|
||||
}
|
||||
|
||||
/**
|
||||
* @global string $mode
|
||||
* @param string $which
|
||||
*/
|
||||
protected function pagination( $which ) {
|
||||
global $mode;
|
||||
|
||||
parent::pagination( $which );
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return array
|
||||
@ -647,13 +637,10 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
/**
|
||||
* @global string $mode
|
||||
* @param array $posts
|
||||
* @param int $level
|
||||
*/
|
||||
private function _display_rows( $posts, $level = 0 ) {
|
||||
global $mode;
|
||||
|
||||
// Create array of post IDs.
|
||||
$post_ids = array();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user