WordPress.org

Make WordPress Core

Ticket #22965: dashboard_comments_number.patch

File dashboard_comments_number.patch, 807 bytes (added by mordauk, 16 months ago)

Updates type to "number" and adds step and min attributes. Changes class to small-text

  • wp-admin/includes/dashboard.php

     
    766766        $number = isset( $widget_options['dashboard_recent_comments']['items'] ) ? (int) $widget_options['dashboard_recent_comments']['items'] : ''; 
    767767 
    768768        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>'; 
     769        echo '<input class="small-text" id="comments-number" name="widget-recent-comments[items]" type="number" step="1" min="1" value="' . $number . '" size="3" /></p>'; 
    770770} 
    771771 
    772772function wp_dashboard_incoming_links() {