List Tables: Define the global `$mode` variable for Quick Edit savings.

Also remove two unused global imports for `$mode`.

Fixes #34577.
Built from https://develop.svn.wordpress.org/trunk@35518


git-svn-id: http://core.svn.wordpress.org/trunk@35482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-11-04 21:29:25 +00:00
parent 5d87e7d2b8
commit 122f38f748
3 changed files with 5 additions and 16 deletions

View File

@ -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;

View File

@ -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();

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta2-35517';
$wp_version = '4.4-beta2-35518';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.