Make WordPress Core


Ignore:
Timestamp:
05/29/2010 04:46:46 PM (16 years ago)
Author:
nacin
Message:

Use show_in_nav_menus for attachments. Also add it to register_taxonomy for consistency and have it default to public, not show_ui, like post types. see #13621.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/taxonomy.php

    r14934 r15056  
    4646        'show_ui' => false,
    4747        '_builtin' => true,
     48        'show_in_nav_menus' => false,
    4849    ) ) ;
    4950
     
    233234 * defaults to public.
    234235 *
     236 * show_in_nav_menus - true makes this taxonomy available for selection in navigation menus.
     237 * Defaults to public.
     238 *
    235239 * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget;
    236240 * defaults to show_ui which defalts to public.
     
    265269                        'labels' => array(),
    266270                        'capabilities' => array(),
     271                        'show_in_nav_menus' => null,
    267272                    );
    268273    $args = wp_parse_args($args, $defaults);
     
    286291    if ( is_null($args['show_ui']) )
    287292        $args['show_ui'] = $args['public'];
     293
     294    // Whether to show this type in nav-menus.php. Defaults to the setting for public.
     295    if ( null === $args['show_in_nav_menus'] )
     296        $args['show_in_nav_menus'] = $args['public'];
    288297
    289298    if ( is_null($args['show_tagcloud']) )
Note: See TracChangeset for help on using the changeset viewer.