Changeset 13279
- Timestamp:
- 02/21/2010 10:51:34 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-navigation.php
r13271 r13279 97 97 $existing_term = get_term_by( 'name', $insert_menu_name, 'menu' ); 98 98 if ( $existing_term ) { 99 $messagesdiv = '<div id="message" class="error fade below-h2"><p>' .$insert_menu_name.' Menu has already created - please try another name</p></div>';99 $messagesdiv = '<div id="message" class="error fade below-h2"><p>' . $insert_menu_name . ' Menu has already created - please try another name</p></div>'; 100 100 } else { 101 101 $term = wp_insert_term( $insert_menu_name, 'menu' ); 102 if ( $term ) { 103 $custom_menus[$term['term_id']] = $term; 104 $menu_selected_id = $term['term_id']; 102 if ( !is_wp_error($term) ) { 103 $term = get_term($term['term_id'], 'menu'); 104 $custom_menus[$term->term_id] = $term; 105 $menu_selected_id = $term->term_id; 105 106 $menu_id_in_edit = $menu_selected_id; 106 $messagesdiv = '<div id="message" class="updated fade below-h2"><p>' .$term['name'].' Menu has been created!</p></div>';107 $messagesdiv = '<div id="message" class="updated fade below-h2"><p>' . $term->name . ' Menu has been created!</p></div>'; 107 108 108 109 $postCounter = 0;
Note: See TracChangeset
for help on using the changeset viewer.