WordPress.org

Make WordPress Core

Ticket #19469: 19469.diff

File 19469.diff, 1.5 KB (added by solarissmoke, 6 years ago)

Add per_page screen option to themes.php

  • wp-admin/includes/misc.php

     
    347347                        case 'upload_per_page':
    348348                        case 'edit_tags_per_page':
    349349                        case 'plugins_per_page':
     350                        case 'themes_per_page':
    350351                        // Network admin
    351352                        case 'sites_network_per_page':
    352353                        case 'users_network_per_page':
  • wp-admin/includes/class-wp-themes-list-table.php

     
    4747                unset( $themes[$ct->name] );
    4848                uksort( $themes, "strnatcasecmp" );
    4949
    50                 $per_page = 24;
     50                $per_page = $this->get_items_per_page( str_replace( '-', '_', get_current_screen()->id . '_per_page' ), 24 );;
    5151                $page = $this->get_pagenum();
    5252
    5353                $start = ( $page - 1 ) * $per_page;
  • wp-admin/themes.php

     
    4646        'content' => $help_manage,
    4747) );
    4848
     49add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ), 'default' => 24 ) );
     50
    4951if ( current_user_can( 'install_themes' ) ) {
    5052        if ( is_multisite() ) {
    5153                $help_install = '<p>' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '</p>';