Changeset 13716
- Timestamp:
- 03/16/2010 05:22:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/nav-menu.php
r13714 r13716 17 17 if ( !$post_types ) 18 18 return false; 19 20 foreach ( $post_types as $post_type ) { 19 20 $allowed_types = apply_filters('post_types_allowed_in_menus', array('page')); 21 foreach ( $post_types as $post_type ) { 22 if ( !in_array($post_type->name, $allowed_types) ) 23 continue; 21 24 $id = sanitize_title_with_dashes( $post_type->label ); 22 25 … … 38 41 if ( !$taxonomies ) 39 42 return false; 40 43 44 $allowed_types = apply_filters('taxonomies_allowed_in_menus', array('category')); 41 45 foreach ( $taxonomies as $tax ) { 46 if ( !in_array($tax->name, $allowed_types) ) 47 continue; 42 48 $id = sanitize_title_with_dashes( $tax->label ); 49 43 50 44 51 // delete_transient( "nav_menu_items_{$tax->name}" );
Note: See TracChangeset
for help on using the changeset viewer.