Changeset 23416 for trunk/wp-includes/nav-menu.php
- Timestamp:
- 02/14/2013 10:51:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu.php
r22399 r23416 370 370 $menu_item_db_id = (int) $menu_item_db_id; 371 371 372 update_post_meta( $menu_item_db_id, '_menu_item_type', sanitize_key($args['menu-item-type']) );373 update_post_meta( $menu_item_db_id, '_menu_item_menu_item_parent', strval( (int) $args['menu-item-parent-id'] ) );374 update_post_meta( $menu_item_db_id, '_menu_item_object_id', strval( (int) $args['menu-item-object-id'] ) );375 update_post_meta( $menu_item_db_id, '_menu_item_object', sanitize_key($args['menu-item-object']) );376 update_post_meta( $menu_item_db_id, '_menu_item_target', sanitize_key($args['menu-item-target']) );372 wp_update_post_meta( $menu_item_db_id, '_menu_item_type', sanitize_key($args['menu-item-type']) ); 373 wp_update_post_meta( $menu_item_db_id, '_menu_item_menu_item_parent', strval( (int) $args['menu-item-parent-id'] ) ); 374 wp_update_post_meta( $menu_item_db_id, '_menu_item_object_id', strval( (int) $args['menu-item-object-id'] ) ); 375 wp_update_post_meta( $menu_item_db_id, '_menu_item_object', sanitize_key($args['menu-item-object']) ); 376 wp_update_post_meta( $menu_item_db_id, '_menu_item_target', sanitize_key($args['menu-item-target']) ); 377 377 378 378 $args['menu-item-classes'] = array_map( 'sanitize_html_class', explode( ' ', $args['menu-item-classes'] ) ); 379 379 $args['menu-item-xfn'] = implode( ' ', array_map( 'sanitize_html_class', explode( ' ', $args['menu-item-xfn'] ) ) ); 380 update_post_meta( $menu_item_db_id, '_menu_item_classes', $args['menu-item-classes'] );381 update_post_meta( $menu_item_db_id, '_menu_item_xfn', $args['menu-item-xfn'] );382 update_post_meta( $menu_item_db_id, '_menu_item_url', esc_url_raw($args['menu-item-url']) );380 wp_update_post_meta( $menu_item_db_id, '_menu_item_classes', $args['menu-item-classes'] ); 381 wp_update_post_meta( $menu_item_db_id, '_menu_item_xfn', $args['menu-item-xfn'] ); 382 wp_update_post_meta( $menu_item_db_id, '_menu_item_url', esc_url_raw($args['menu-item-url']) ); 383 383 384 384 if ( 0 == $menu_id ) 385 update_post_meta( $menu_item_db_id, '_menu_item_orphaned', (string) time() );385 wp_update_post_meta( $menu_item_db_id, '_menu_item_orphaned', (string) time() ); 386 386 elseif ( get_post_meta( $menu_item_db_id, '_menu_item_orphaned' ) ) 387 387 delete_post_meta( $menu_item_db_id, '_menu_item_orphaned' );
Note: See TracChangeset
for help on using the changeset viewer.