Widgets: use input[type="number"] for the number prop in the Recent Posts and Recent Comments widget forms.

Props helen, obenland, mordauk.
Fixes #22965.

Built from https://develop.svn.wordpress.org/trunk@34514


git-svn-id: http://core.svn.wordpress.org/trunk@34478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-24 19:53:26 +00:00
parent 949b6ee1df
commit bf04b211a4
9 changed files with 35 additions and 9 deletions

View File

@ -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 {

View File

@ -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 {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34513';
$wp_version = '4.4-alpha-34514';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -164,7 +164,7 @@ class WP_Widget_Recent_Comments extends WP_Widget {
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p>
<p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of comments to show:' ); ?></label>
<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>
<input class="tiny-text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $number; ?>" size="3" /></p>
<?php
}
}

View File

@ -106,7 +106,7 @@ class WP_Widget_Recent_Posts extends WP_Widget {
<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>
<p><label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:' ); ?></label>
<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>
<input class="tiny-text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="number" step="1" min="1" value="<?php echo $number; ?>" size="3" /></p>
<p><input class="checkbox" type="checkbox"<?php checked( $show_date ); ?> id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" />
<label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Display post date?' ); ?></label></p>