Make WordPress Core

Ticket #45954: 45954.diff

File 45954.diff, 2.2 KB (added by desrosj, 4 years ago)
  • src/wp-admin/includes/class-wp-ms-sites-list-table.php

     
    231231        }
    232232
    233233        /**
     234         * Extra controls to be displayed between bulk actions and pagination.
     235         *
     236         * @since 5.3.0
     237         *
     238         * @param string $which
     239         */
     240        protected function extra_tablenav( $which ) {
     241                ?>
     242                <div class="alignleft actions">
     243                <?php
     244                if ( 'top' === $which ) {
     245                        ob_start();
     246
     247                        /**
     248                         * Fires before the Filter button on the MS sites list table.
     249                         *
     250                         * @since 5.3.0
     251                         *
     252                         * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
     253                         */
     254                        do_action( 'restrict_manage_sites', $which );
     255                        $output = ob_get_clean();
     256                        if ( ! empty( $output ) ) {
     257                                echo $output;
     258                                submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'site-query-submit' ) );
     259                        }
     260                }
     261                ?>
     262                </div>
     263                <?php
     264                /**
     265                 * Fires immediately following the closing "actions" div in the tablenav for the
     266                 * MS sites list table.
     267                 *
     268                 * @since 5.3.0
     269                 *
     270                 * @param string $which The location of the extra table nav markup: 'top' or 'bottom'.
     271                 */
     272                do_action( 'manage_sites_extra_tablenav', $which );
     273        }
     274
     275        /**
    234276         * @return array
    235277         */
    236278        public function get_columns() {
  • src/wp-admin/network/sites.php

     
    231231                                        wp_safe_redirect( $redirect_to );
    232232                                        exit();
    233233                                }
    234                         } else {
    235                                 $location = network_admin_url( 'sites.php' );
    236                                 if ( ! empty( $_REQUEST['paged'] ) ) {
    237                                         $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
    238                                 }
    239                                 wp_redirect( $location );
    240                                 exit();
     234                        } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
     235                                // process query defined by WP_MS_Site_List_Table::extra_table_nav().
     236                                wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
     237                                exit;
    241238                        }
     239
    242240                        break;
    243241
    244242                case 'archiveblog':