WordPress.org

Make WordPress Core

Ticket #13936: 13936.diff

File 13936.diff, 1.2 KB (added by wojtek.szkutnik, 5 years ago)
  • menu.php

     
    8585        $submenu['edit.php'][10]  = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' ); 
    8686 
    8787        $i = 15; 
    88         foreach ( $wp_taxonomies as $tax ) { 
     88        foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { 
    8989                if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) ) 
    9090                        continue; 
    9191 
     
    109109        /* translators: add new page */ 
    110110        $submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' ); 
    111111        $i = 15; 
    112         foreach ( $wp_taxonomies as $tax ) { 
     112        foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { 
    113113                if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) ) 
    114114                        continue; 
    115115 
     
    143143        $submenu["edit.php?post_type=$ptype"][10]  = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" ); 
    144144 
    145145        $i = 15; 
    146         foreach ( $wp_taxonomies as $tax ) { 
     146        foreach ( get_taxonomies( array(), 'objects' ) as $tax ) { 
    147147                if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) ) 
    148148                        continue; 
    149149