Changeset 36613
- Timestamp:
- 02/22/2016 07:54:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/nav-menus.php
r36510 r36613 60 60 // For input names that are arrays (e.g. `menu-item-db-id[3]`), derive the array path keys via regex. 61 61 if ( preg_match( '#(.*)(?:\[(\d+)\])#', $post_input_data->name, $matches ) ) { 62 if ( empty( $_POST[ $matches[1]] ) ) {63 $_POST[ $matches[1]] = array();62 if ( empty( $_POST[ $matches[1] ] ) ) { 63 $_POST[ $matches[1] ] = array(); 64 64 } 65 $_POST[ $matches[1]][(int)$matches[2]] = $post_input_data->value;65 $_POST[ $matches[1] ][ (int) $matches[2] ] = wp_slash( $post_input_data->value ); 66 66 } else { 67 $_POST[ $post_input_data->name] = $post_input_data->value;67 $_POST[ $post_input_data->name ] = wp_slash( $post_input_data->value ); 68 68 } 69 69 }
Note: See TracChangeset
for help on using the changeset viewer.