Changeset 33734 for trunk/src/wp-admin/includes/nav-menu.php
- Timestamp:
- 08/25/2015 08:27:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/nav-menu.php
r33211 r33734 427 427 if ( empty( $terms ) || is_wp_error( $terms ) ) 428 428 return; 429 foreach ( (array) $terms as $term ) {429 foreach ( (array) $terms as $term ) { 430 430 if ( 'markup' == $response_format ) { 431 431 echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args ); … … 1082 1082 1083 1083 // Loop through all the menu items' POST values. 1084 foreach ( (array) $menu_data as $_possible_db_id => $_item_object_data ) {1084 foreach ( (array) $menu_data as $_possible_db_id => $_item_object_data ) { 1085 1085 if ( 1086 1086 // Checkbox is not checked. … … 1215 1215 1216 1216 $some_pending_menu_items = $some_invalid_menu_items = false; 1217 foreach ( (array) $menu_items as $menu_item ) {1217 foreach ( (array) $menu_items as $menu_item ) { 1218 1218 if ( isset( $menu_item->post_status ) && 'draft' == $menu_item->post_status ) 1219 1219 $some_pending_menu_items = true; … … 1272 1272 $menu_items_to_delete = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) ); 1273 1273 1274 foreach ( (array) $menu_items_to_delete as $menu_item_id )1274 foreach ( (array) $menu_items_to_delete as $menu_item_id ) 1275 1275 wp_delete_post( $menu_item_id, true ); 1276 1276 } … … 1303 1303 // Loop through all the menu items' POST variables 1304 1304 if ( ! empty( $_POST['menu-item-db-id'] ) ) { 1305 foreach ( (array) $_POST['menu-item-db-id'] as $_key => $k ) {1305 foreach ( (array) $_POST['menu-item-db-id'] as $_key => $k ) { 1306 1306 1307 1307 // Menu item title can't be blank
Note: See TracChangeset
for help on using the changeset viewer.