Nav menus: hide the title attribute field by default for new users and installs.
It is still available in screen options. This also gives the "Navigation Label", a crucial field, the room it really deserves. props paulwilde. fixes #32218. Built from https://develop.svn.wordpress.org/trunk@32691 git-svn-id: http://core.svn.wordpress.org/trunk@32661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9d0ab29bc4
commit
0e77b693ac
@ -147,13 +147,13 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
|||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p class="description description-thin">
|
<p class="description description-wide">
|
||||||
<label for="edit-menu-item-title-<?php echo $item_id; ?>">
|
<label for="edit-menu-item-title-<?php echo $item_id; ?>">
|
||||||
<?php _e( 'Navigation Label' ); ?><br />
|
<?php _e( 'Navigation Label' ); ?><br />
|
||||||
<input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" />
|
<input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" />
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p class="description description-thin">
|
<p class="field-title-attribute description description-wide">
|
||||||
<label for="edit-menu-item-attr-title-<?php echo $item_id; ?>">
|
<label for="edit-menu-item-attr-title-<?php echo $item_id; ?>">
|
||||||
<?php _e( 'Title Attribute' ); ?><br />
|
<?php _e( 'Title Attribute' ); ?><br />
|
||||||
<input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" />
|
<input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" />
|
||||||
@ -462,7 +462,7 @@ function wp_nav_menu_setup() {
|
|||||||
if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
|
if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
|
||||||
$user = wp_get_current_user();
|
$user = wp_get_current_user();
|
||||||
update_user_option($user->ID, 'managenav-menuscolumnshidden',
|
update_user_option($user->ID, 'managenav-menuscolumnshidden',
|
||||||
array( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn', 3 => 'description', ),
|
array( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn', 3 => 'description', 4 => 'title-attribute', ),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1233,6 +1233,7 @@ function wp_nav_menu_manage_columns() {
|
|||||||
return array(
|
return array(
|
||||||
'_title' => __('Show advanced menu properties'),
|
'_title' => __('Show advanced menu properties'),
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
|
'title-attribute' => __('Title Attribute'),
|
||||||
'link-target' => __('Link Target'),
|
'link-target' => __('Link Target'),
|
||||||
'css-classes' => __('CSS Classes'),
|
'css-classes' => __('CSS Classes'),
|
||||||
'xfn' => __('Link Relationship (XFN)'),
|
'xfn' => __('Link Relationship (XFN)'),
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-alpha-32690';
|
$wp_version = '4.3-alpha-32691';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user