Implement the Cancel menu item link for no JS. props ocean90, see #13525.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4d5114ff86
commit
7eedc2359d
|
@ -93,8 +93,8 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
||||||
?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">↓</abbr></a>
|
?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">↓</abbr></a>
|
||||||
</span>
|
</span>
|
||||||
<a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php
|
<a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php
|
||||||
echo add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url( 'nav-menus.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 ) ) );
|
||||||
?>#menu-item-settings-<?php echo $item_id; ?>">Edit Menu Item</a>
|
?>">Edit Menu Item</a>
|
||||||
</span>
|
</span>
|
||||||
</dt>
|
</dt>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -168,7 +168,8 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
||||||
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
|
remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) )
|
||||||
),
|
),
|
||||||
'delete-menu_item_' . $item_id
|
'delete-menu_item_' . $item_id
|
||||||
); ?>"><?php _e('Remove'); ?></a> <span class="meta-sep"> | </span> <a class="item-cancel submitcancel" id="cancel-<?php echo $item_id; ?>" href="<?php echo admin_url( 'nav-menus.php' ); ?>"><?php _e('Cancel'); ?></a>
|
); ?>"><?php _e('Remove'); ?></a> <span class="meta-sep"> | </span> <a class="item-cancel submitcancel" id="cancel-<?php echo $item_id; ?>" href="<?php echo add_query_arg( array('edit-menu-item' => $item_id, 'cancel' => time()), remove_query_arg( $removed_args, admin_url( 'nav-menus.php' ) ) );
|
||||||
|
?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Cancel'); ?></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
|
<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
|
||||||
|
|
Loading…
Reference in New Issue