Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use number type for post menu_order inputs #8308

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-posts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ public function inline_edit() {

<label>
<span class="title"><?php _e( 'Order' ); ?></span>
<span class="input-text-wrap"><input type="text" name="menu_order" class="inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
<span class="input-text-wrap"><input type="number" name="menu_order" class="tiny-text inline-edit-menu-order-input" value="<?php echo $post->menu_order; ?>" /></span>
</label>

<?php endif; // ! $bulk ?>
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ function page_attributes_meta_box( $post ) {
<?php endif; ?>
<?php if ( post_type_supports( $post->post_type, 'page-attributes' ) ) : ?>
<p class="post-attributes-label-wrapper menu-order-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php _e( 'Order' ); ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr( $post->menu_order ); ?>" />
<input name="menu_order" type="number" id="menu_order" class="small-text" value="<?php echo esc_attr( $post->menu_order ); ?>" />
<?php
/**
* Fires before the help hint text in the 'Page Attributes' meta box.
Expand Down
Loading