WordPress.org

Make WordPress Core

Ticket #22965: 22965.1.diff

File 22965.1.diff, 2.4 KB (added by obenland, 13 months ago)

Refresh of Helen's patch. Additionally aligns the number selector vertically.

  • wp-admin/css/wp-admin.css

     
    249249        box-sizing: border-box; 
    250250} 
    251251 
     252/* Vertically align the number selector with the input. */ 
     253input[type="number"] { 
     254        line-height: inherit; 
     255} 
     256 
    252257input[type="checkbox"], 
    253258input[type="radio"] { 
    254259        vertical-align: text-top; 
     
    888893        width: 60px; 
    889894} 
    890895 
     896input.tiny-text { 
     897        width: 35px; 
     898} 
     899 
     900input[type="number"].tiny-text { 
     901        width: 45px; 
     902} 
     903 
    891904#doaction, 
    892905#doaction2, 
    893906#post-query-submit { 
  • wp-admin/includes/dashboard.php

     
    765765 
    766766        $number = isset( $widget_options['dashboard_recent_comments']['items'] ) ? (int) $widget_options['dashboard_recent_comments']['items'] : ''; 
    767767 
    768         echo '<p><label for="comments-number">' . __('Number of comments to show:') . '</label>'; 
    769         echo '<input id="comments-number" name="widget-recent-comments[items]" type="text" value="' . $number . '" size="3" /></p>'; 
     768        echo '<p><label for="comments-number">' . __( 'Number of comments to show:' ) . '</label>'; 
     769        echo ' <input id="comments-number" class="small-text" name="widget-recent-comments[items]" type="number" step="1" min="1" value="' . $number . '" size="3" /></p>'; 
    770770} 
    771771 
    772772function wp_dashboard_incoming_links() { 
  • wp-includes/default-widgets.php

     
    728728                <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></p> 
    729729 
    730730                <p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of comments to show:' ); ?></label> 
    731                 <input id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>" size="3" /></p> 
     731                <input id="<?php echo $this->get_field_id( 'number' ); ?>" class="tiny-text" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $number; ?>" size="3" /></p> 
    732732<?php 
    733733        } 
    734734}