mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 15:47:05 +00:00
Output themes and theme-install infinite scrolling args in JS, rather than parsing query strings. props DH-Shredder, helenyhou. Make WP_Theme_Install_List_Table extend WP_Themes_List_Table. Doesn't help much yet, but we should be able to dry things up further. see #19815.
git-svn-id: https://develop.svn.wordpress.org/trunk@20094 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -484,7 +484,7 @@ class WP_List_Table {
|
||||
if ( empty( $this->_pagination_args ) )
|
||||
return;
|
||||
|
||||
extract( $this->_pagination_args );
|
||||
extract( $this->_pagination_args, EXTR_SKIP );
|
||||
|
||||
$output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
|
||||
|
||||
@@ -543,7 +543,10 @@ class WP_List_Table {
|
||||
'»'
|
||||
);
|
||||
|
||||
$output .= "\n<span class='pagination-links'>" . join( "\n", $page_links ) . '</span>';
|
||||
$pagination_links_class = 'pagination-links';
|
||||
if ( ! empty( $infinite_scroll ) )
|
||||
$pagination_links_class = ' hide-if-js';
|
||||
$output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
|
||||
|
||||
if ( $total_pages )
|
||||
$page_class = $total_pages < 2 ? ' one-page' : '';
|
||||
@@ -872,7 +875,7 @@ class WP_List_Table {
|
||||
$this->prepare_items();
|
||||
|
||||
extract( $this->_args );
|
||||
extract( $this->_pagination_args );
|
||||
extract( $this->_pagination_args, EXTR_SKIP );
|
||||
|
||||
ob_start();
|
||||
if ( ! empty( $_REQUEST['no_placeholder'] ) )
|
||||
|
||||
Reference in New Issue
Block a user