Make WordPress Core

Changeset 35518


Ignore:
Timestamp:
11/04/2015 09:28:55 PM (11 years ago)
Author:
ocean90
Message:

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

Also remove two unused global imports for $mode.

Fixes #34577.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r35382 r35518  
    15871587 */
    15881588function wp_ajax_inline_save() {
    1589         global $wp_list_table;
     1589        global $wp_list_table, $mode;
    15901590
    15911591        check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
    … …  
    16591659
    16601660        $wp_list_table = _get_list_table( 'WP_Posts_List_Table', array( 'screen' => $_POST['screen'] ) );
     1661
     1662        $mode = $_POST['post_view'] === 'excerpt' ? 'excerpt' : 'list';
    16611663
    16621664        $level = 0;
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r35357 r35518  
    491491                 *
    492492                 * @since 4.4.0
    493                  * 
     493                 *
    494494                 * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
    495495                 */
    … …  
    506506
    507507                return parent::current_action();
    508         }
    509 
    510         /**
    511          * @global string $mode
    512          * @param string $which
    513          */
    514         protected function pagination( $which ) {
    515                 global $mode;
    516 
    517                 parent::pagination( $which );
    518508        }
    519509
    … …  
    648638
    649639        /**
    650          * @global string $mode
    651640         * @param array $posts
    652641         * @param int $level
    653642         */
    654643        private function _display_rows( $posts, $level = 0 ) {
    655                 global $mode;
    656 
    657644                // Create array of post IDs.
    658645                $post_ids = array();
Note: See TracChangeset for help on using the changeset viewer.