Changeset 14569 for trunk/wp-admin/includes/nav-menu.php
- Timestamp:
- 05/11/2010 06:55:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/nav-menu.php
r14568 r14569 662 662 function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { 663 663 $taxonomy_name = $taxonomy['args']->name; 664 if ( ! $term_count = wp_count_terms( $taxonomy_name ) ) { 665 echo '<p>' . __( 'No items.' ) . '</p>'; 666 return; 667 } 664 668 665 // paginate browsing for large numbers of objects 669 666 $per_page = 50; … … 685 682 ); 686 683 687 $num_pages = ceil( $term_count / $per_page ); 684 $terms = get_terms( $taxonomy_name, $args ); 685 686 if ( ! $terms || is_wp_error($terms) ) { 687 echo '<p>' . __( 'No items.' ) . '</p>'; 688 return; 689 } 690 691 $num_pages = ceil( count($terms) / $per_page ); 688 692 689 693 $page_links = paginate_links( array( … … 702 706 703 707 $walker = new Walker_Nav_Menu_Checklist; 704 // @todo transient caching of these results with proper invalidation on updating of a tax of this type705 $terms = get_terms( $taxonomy_name, $args );706 707 if ( ! $terms || is_wp_error($terms) )708 $error = '<li id="error">'. sprintf( __( 'No %s exists' ), $taxonomy['args']->label ) .'</li>';709 708 710 709 $current_tab = 'most-used';
Note: See TracChangeset
for help on using the changeset viewer.