Make WordPress Core


Ignore:
Timestamp:
03/18/2010 08:17:15 PM (15 years ago)
Author:
nacin
Message:

Account for old type=link (now taxonomy=link_category) in wp_dropdown_categories(). Don't use the deprecated argument in options-writing. Sprinkle in some deprecated warnings. fixes #12630

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r13553 r13754  
    319319 *     'class' (string) - The class attribute value for select element.
    320320 *     'selected' (int) - Which category ID is selected.
     321 *     'taxonomy' (string) - The name of the taxonomy to retrieve. Defaults to category.
    321322 *
    322323 * The 'hierarchical' argument, which is disabled by default, will override the
     
    345346
    346347    $defaults['selected'] = ( is_category() ) ? get_query_var( 'cat' ) : 0;
     348
     349    // Back compat.
     350    if ( isset( $args['type'] ) && 'link' == $args['type'] ) {
     351        _deprecated_argument( __FUNCTION__, '3.0', '' );
     352        $args['taxonomy'] = 'link_category';
     353    }
    347354
    348355    $r = wp_parse_args( $args, $defaults );
Note: See TracChangeset for help on using the changeset viewer.