Make WordPress Core


Ignore:
Timestamp:
05/13/2010 04:10:17 AM (16 years ago)
Author:
nacin
Message:

Move taxonomy object properties for capabilities into a cap object. Capabilities can be specified via capabilities (an array keyed by the generic cap name) for register_taxonomy. fixes #13358.

File:
1 edited

Legend:

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

    r14585 r14593  
    9090                        continue;
    9191
    92                 $submenu['edit.php'][$i++] = array( esc_attr($tax->label), $tax->manage_cap, 'edit-tags.php?taxonomy=' . $tax->name );
     92                $submenu['edit.php'][$i++] = array( esc_attr($tax->label), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );
    9393        }
    9494        unset($tax);
     
    139139                        continue;
    140140
    141                 $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr($tax->label), $tax->manage_cap, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
     141                $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr($tax->label), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
    142142        }
    143143}
Note: See TracChangeset for help on using the changeset viewer.