WordPress 4.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-walker-nav-menu-edit.php
index 105e613a4f650d7366de387a0300e61b6bc045d6..7576de123fb76b433c6f19d15dd62d2fe4bddd0f 100644 (file)
@@ -80,7 +80,9 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
                        $original_title = get_the_title( $original_object->ID );
                } elseif ( 'post_type_archive' == $item->type ) {
                        $original_object = get_post_type_object( $item->object );
-                       $original_title = $original_object->labels->archives;
+                       if ( $original_object ) {
+                               $original_title = $original_object->labels->archives;
+                       }
                }
 
                $classes = array(
@@ -126,7 +128,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
                                                                        ),
                                                                        'move-menu_item'
                                                                );
-                                                       ?>" class="item-move-up"><abbr title="<?php esc_attr_e('Move up'); ?>">&#8593;</abbr></a>
+                                                       ?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ) ?>">&#8593;</a>
                                                        |
                                                        <a href="<?php
                                                                echo wp_nonce_url(
@@ -139,16 +141,16 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
                                                                        ),
                                                                        'move-menu_item'
                                                                );
-                                                       ?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">&#8595;</abbr></a>
+                                                       ?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ) ?>">&#8595;</a>
                                                </span>
-                                               <a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php esc_attr_e('Edit Menu Item'); ?>" href="<?php
+                                               <a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php
                                                        echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) );
-                                               ?>"><?php _e( 'Edit Menu Item' ); ?></a>
+                                               ?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a>
                                        </span>
                                </div>
                        </div>
 
-                       <div class="menu-item-settings" id="menu-item-settings-<?php echo $item_id; ?>">
+                       <div class="menu-item-settings wp-clearfix" id="menu-item-settings-<?php echo $item_id; ?>">
                                <?php if ( 'custom' == $item->type ) : ?>
                                        <p class="field-url description description-wide">
                                                <label for="edit-menu-item-url-<?php echo $item_id; ?>">
@@ -163,7 +165,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
                                                <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="field-title-attribute description description-wide">
+                               <p class="field-title-attribute field-attr-title 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 ); ?>" />