WordPress.org

Make WordPress Core

Changeset 16695


Ignore:
Timestamp:
12/02/2010 09:32:19 PM (10 years ago)
Author:
markjaquith
Message:

Use get_taxonomies() when iterating taxonomies for menus. props wojtek.szkutnik. fixes #13936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r16453 r16695  
    6464
    6565    $i = 15;
    66     foreach ( $wp_taxonomies as $tax ) {
     66    foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
    6767        if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) )
    6868            continue;
     
    8888    $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' );
    8989    $i = 15;
    90     foreach ( $wp_taxonomies as $tax ) {
     90    foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
    9191        if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) )
    9292            continue;
     
    128128
    129129    $i = 15;
    130     foreach ( $wp_taxonomies as $tax ) {
     130    foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
    131131        if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) )
    132132            continue;
Note: See TracChangeset for help on using the changeset viewer.