Move the "Add Home Link" functionality to a checkbox on the View All tab of the Pages metabox. Also makes it work non-JS. props filosofo, fixes #13213.

git-svn-id: https://develop.svn.wordpress.org/trunk@14971 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-05-27 02:24:33 +00:00
parent fdf4f195df
commit 9b4a85cdaf
7 changed files with 51 additions and 27 deletions
+7 -2
View File
@@ -157,8 +157,13 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
$output .= $indent . '<li>';
$output .= '<label class="menu-item-title">';
$output .= '<input type="checkbox" class="menu-item-checkbox" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> ';
$output .= esc_html( $item->title ) .'</label>';
$output .= '<input type="checkbox" class="menu-item-checkbox';
if ( ! empty( $item->_add_to_top ) ) {
$output .= ' add-to-top';
}
$output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> ';
$output .= empty( $item->label ) ? esc_html( $item->title ) : esc_html( $item->label );
$output .= '</label>';
// Menu item hidden fields
$output .= '<input type="hidden" class="menu-item-db-id" name="menu-item[' . $possible_object_id . '][menu-item-db-id]" value="' . $possible_db_id . '" />';