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. git-svn-id: https://develop.svn.wordpress.org/trunk@32691 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
112fc6d369
commit
6c51513a44
@ -147,13 +147,13 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
||||
</label>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<p class="description description-thin">
|
||||
<p class="description description-wide">
|
||||
<label for="edit-menu-item-title-<?php echo $item_id; ?>">
|
||||
<?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 ); ?>" />
|
||||
</label>
|
||||
</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; ?>">
|
||||
<?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 ); ?>" />
|
||||
@ -462,7 +462,7 @@ function wp_nav_menu_setup() {
|
||||
if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
|
||||
$user = wp_get_current_user();
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -1233,6 +1233,7 @@ function wp_nav_menu_manage_columns() {
|
||||
return array(
|
||||
'_title' => __('Show advanced menu properties'),
|
||||
'cb' => '<input type="checkbox" />',
|
||||
'title-attribute' => __('Title Attribute'),
|
||||
'link-target' => __('Link Target'),
|
||||
'css-classes' => __('CSS Classes'),
|
||||
'xfn' => __('Link Relationship (XFN)'),
|
||||
|
Loading…
Reference in New Issue
Block a user