Changeset 55593
- Timestamp:
- 03/26/2023 10:04:40 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/nav-menu.php
r55293 r55593 939 939 $items_saved = array(); 940 940 941 if ( 0 == $menu_id || is_nav_menu( $menu_id ) ) {941 if ( 0 === $menu_id || is_nav_menu( $menu_id ) ) { 942 942 943 943 // Loop through all the menu items' POST values. … … 965 965 empty( $_item_object_data['menu-item-db-id'] ) || 966 966 ( 0 > $_possible_db_id ) || 967 $_possible_db_id != $_item_object_data['menu-item-db-id']967 $_possible_db_id !== (int) $_item_object_data['menu-item-db-id'] 968 968 ) { 969 969 $_actual_db_id = 0; … … 1212 1212 } 1213 1213 1214 $menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][ $_key ] != $_key ? 0 : $_key ), $args ); 1214 $menu_item_db_id = wp_update_nav_menu_item( 1215 $nav_menu_selected_id, 1216 ( (int) $_POST['menu-item-db-id'][ $_key ] !== $_key ? 0 : $_key ), 1217 $arg 1218 ); 1215 1219 1216 1220 if ( is_wp_error( $menu_item_db_id ) ) { … … 1302 1306 // Build the new array value from leaf to trunk. 1303 1307 for ( $i = count( $array_bits ) - 1; $i >= 0; $i-- ) { 1304 if ( count( $array_bits ) - 1 == $i ) {1308 if ( count( $array_bits ) - 1 === $i ) { 1305 1309 $new_post_data[ $array_bits[ $i ] ] = wp_slash( $post_input_data->value ); 1306 1310 } else {
Note: See TracChangeset
for help on using the changeset viewer.