From 395fc15df388d36ada4f13c2ce688c96d2473db2 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 24 Sep 2015 19:52:06 +0000 Subject: [PATCH] Widgets: use `input[type="number"]` for the `number` prop in the Recent Posts and Recent Comments widget forms. Props helen, obenland, mordauk. Fixes #22965. git-svn-id: https://develop.svn.wordpress.org/trunk@34514 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/css/forms.css | 13 +++++++++++++ .../widgets/class-wp-widget-recent-comments.php | 2 +- .../widgets/class-wp-widget-recent-posts.php | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index 6221af08da..84614ee7df 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -67,6 +67,11 @@ input[type="url"] { direction: ltr; } +/* Vertically align the number selector with the input. */ +input[type="number"] { + line-height: inherit; +} + input[type="checkbox"], input[type="radio"] { border: 1px solid #b4b9be; @@ -385,6 +390,14 @@ input[type="number"].small-text { width: 65px; } +input.tiny-text { + width: 35px; +} + +input[type="number"].tiny-text { + width: 45px; +} + #doaction, #doaction2, #post-query-submit { diff --git a/src/wp-includes/widgets/class-wp-widget-recent-comments.php b/src/wp-includes/widgets/class-wp-widget-recent-comments.php index ff37c7d16b..a9d07303a1 100644 --- a/src/wp-includes/widgets/class-wp-widget-recent-comments.php +++ b/src/wp-includes/widgets/class-wp-widget-recent-comments.php @@ -164,7 +164,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {

-

+

get_field_id( 'title' ); ?>" name="get_field_name( 'title' ); ?>" type="text" value="" />

-

+

id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" />