Make WordPress Core

Ticket #31349: 31349.4.patch

File 31349.4.patch, 8.5 KB (added by afercia, 10 years ago)
  • src/wp-admin/css/common.css

     
    15061506        display: none;
    15071507}
    15081508
     1509.metabox-prefs .screen-options {
     1510        padding-top: 10px;
     1511}
     1512
     1513.metabox-prefs .screen-options input,
     1514.metabox-prefs .screen-options label {
     1515        margin-top: 0;
     1516        margin-bottom: 0;
     1517        vertical-align: middle;
     1518}
     1519
     1520.metabox-prefs .screen-options .screen-per-page {
     1521        margin-right: 15px;
     1522}
     1523
     1524.metabox-prefs .screen-options label {
     1525        line-height: 28px;
     1526        padding-right: 0;
     1527}
     1528
    15091529/*------------------------------------------------------------------------------
    15101530  6.2 - Help Menu
    15111531------------------------------------------------------------------------------*/
  • src/wp-admin/edit-comments.php

     
    109109else
    110110        $title = __('Comments');
    111111
    112 add_screen_option( 'per_page', array('label' => _x( 'Comments', 'comments per page (screen options)' )) );
     112add_screen_option( 'per_page' );
    113113
    114114get_current_screen()->add_help_tab( array(
    115115'id'            => 'overview',
  • src/wp-admin/edit-tags.php

     
    3939        $submenu_file = "edit-tags.php?taxonomy=$taxonomy";
    4040}
    4141
    42 add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
     42add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
    4343
    4444$location = false;
    4545
  • src/wp-admin/edit.php

     
    165165wp_enqueue_script('inline-edit-post');
    166166wp_enqueue_script('heartbeat');
    167167
    168 $title = $post_type_object->labels->name;
    169 
    170168if ( 'post' == $post_type ) {
    171169        get_current_screen()->add_help_tab( array(
    172170        'id'            => 'overview',
     
    234232        );
    235233}
    236234
    237 add_screen_option( 'per_page', array( 'label' => $title, 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
     235add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page' ) );
    238236
    239237$bulk_counts = array(
    240238        'updated'   => isset( $_REQUEST['updated'] )   ? absint( $_REQUEST['updated'] )   : 0,
  • src/wp-admin/includes/screen.php

     
    11271127         * @since 3.3.0
    11281128         */
    11291129        public function render_per_page_options() {
    1130                 if ( ! $this->get_option( 'per_page' ) )
     1130                if ( null === $this->get_option( 'per_page' ) )
    11311131                        return;
    11321132
    11331133                $per_page_label = $this->get_option( 'per_page', 'label' );
     1134                if ( null === $per_page_label ) {
     1135                        $per_page_label = __( 'Number of items per page:' );
     1136                }
    11341137
    11351138                $option = $this->get_option( 'per_page', 'option' );
    11361139                if ( ! $option )
     
    11641167
    11651168                ?>
    11661169                <div class="screen-options">
    1167                         <?php if ( $per_page_label ) : ?>
     1170                        <?php if ( null !== $per_page_label ) : ?>
     1171                                <label for="<?php echo esc_attr( $option ); ?>"><?php echo $per_page_label; ?></label>
    11681172                                <input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]"
    11691173                                        id="<?php echo esc_attr( $option ); ?>" maxlength="3"
    11701174                                        value="<?php echo esc_attr( $per_page ); ?>" />
    1171                                 <label for="<?php echo esc_attr( $option ); ?>">
    1172                                         <?php echo esc_html( $per_page_label ); ?>
    1173                                 </label>
    11741175                        <?php endif;
    11751176
    11761177                        echo get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ); ?>
  • src/wp-admin/network/site-themes.php

     
    127127}
    128128
    129129add_thickbox();
    130 add_screen_option( 'per_page', array( 'label' => _x( 'Themes', 'themes per page (screen options)' ) ) );
     130add_screen_option( 'per_page' );
    131131
    132132$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
    133133$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
  • src/wp-admin/network/site-users.php

     
    155155        exit();
    156156}
    157157
    158 add_screen_option( 'per_page', array( 'label' => _x( 'Users', 'users per page (screen options)' ) ) );
     158add_screen_option( 'per_page' );
    159159
    160160$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) );
    161161$title_site_url_linked = sprintf( __('Edit Site: <a href="%1$s">%2$s</a>'), get_blogaddress_by_id( $id ), $site_url_no_http );
  • src/wp-admin/network/sites.php

     
    2222$title = __( 'Sites' );
    2323$parent_file = 'sites.php';
    2424
    25 add_screen_option( 'per_page', array( 'label' => _x( 'Sites', 'sites per page (screen options)' ) ) );
     25add_screen_option( 'per_page' );
    2626
    2727get_current_screen()->add_help_tab( array(
    2828        'id'      => 'overview',
  • src/wp-admin/network/themes.php

     
    217217
    218218add_thickbox();
    219219
    220 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) );
     220add_screen_option( 'per_page' );
    221221
    222222get_current_screen()->add_help_tab( array(
    223223        'id'      => 'overview',
  • src/wp-admin/network/users.php

     
    2929        <?php else : ?>
    3030                <p><?php _e( 'You have chosen to delete the user from all networks and sites.' ); ?></p>
    3131        <?php endif; ?>
    32        
     32
    3333        <form action="users.php?action=dodelete" method="post">
    3434        <input type="hidden" name="dodelete" />
    3535        <?php
     
    108108        <?php else : ?>
    109109                <p><?php _e( 'Once you hit &#8220;Confirm Deletion&#8221;, the user will be permanently removed.' ); ?></p>
    110110        <?php endif;
    111        
     111
    112112        submit_button( __('Confirm Deletion'), 'delete' );
    113113        ?>
    114114        </form>
     
    252252$title = __( 'Users' );
    253253$parent_file = 'users.php';
    254254
    255 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
     255add_screen_option( 'per_page' );
    256256
    257257get_current_screen()->add_help_tab( array(
    258258        'id'      => 'overview',
  • src/wp-admin/plugins.php

     
    358358wp_enqueue_script('plugin-install');
    359359add_thickbox();
    360360
    361 add_screen_option( 'per_page', array('label' => _x( 'Plugins', 'plugins per page (screen options)' ), 'default' => 999 ) );
     361add_screen_option( 'per_page', array( 'default' => 999 ) );
    362362
    363363get_current_screen()->add_help_tab( array(
    364364'id'            => 'overview',
  • src/wp-admin/upload.php

     
    173173
    174174wp_enqueue_script( 'media' );
    175175
    176 add_screen_option( 'per_page', array('label' => _x( 'Media items', 'items per page (screen options)' )) );
     176add_screen_option( 'per_page' );
    177177
    178178get_current_screen()->add_help_tab( array(
    179179'id'            => 'overview',
  • src/wp-admin/users.php

     
    1717$title = __('Users');
    1818$parent_file = 'users.php';
    1919
    20 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) );
     20add_screen_option( 'per_page' );
    2121
    2222// contextual help - choose Help on the top right of admin panel to preview this.
    2323get_current_screen()->add_help_tab( array(