WordPress.org

Make WordPress Core

Changeset 14953


Ignore:
Timestamp:
05/26/10 19:03:46 (4 years ago)
Author:
ryan
Message:

Show taxonomies registered against the page type in the Pages submenus. Props markauk. fixes #13560

File:
1 edited

Legend:

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

    r14856 r14953  
    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' ); 
     111    $i = 15; 
     112    foreach ( $wp_taxonomies as $tax ) { 
     113        if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) ) 
     114            continue; 
     115 
     116        $submenu['edit.php?post_type=page'][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name ); 
     117    } 
     118    unset($tax); 
    111119 
    112120$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'div' ); 
Note: See TracChangeset for help on using the changeset viewer.