Make WordPress Core

Changeset 25123


Ignore:
Timestamp:
08/26/2013 05:30:46 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Add 'taxonomy_parent_dropdown_args' filter for the parent dropdown on taxonomy term editing screens. props leewillis77. fixes #18166.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r25034 r25123  
    372372<div class="form-field">
    373373    <label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label>
    374     <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'taxonomy' => $taxonomy, 'name' => 'parent', 'orderby' => 'name', 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
     374    <?php
     375    $dropdown_args = array(
     376        'hide_empty'       => 0,
     377        'hide_if_empty'    => false,
     378        'taxonomy'         => $taxonomy,
     379        'name'             => 'parent',
     380        'orderby'          => 'name',
     381        'hierarchical'     => true,
     382        'show_option_none' => __( 'None' ),
     383    );
     384
     385    $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy );
     386    wp_dropdown_categories( $dropdown_args );
     387    ?>
    375388    <?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?>
    376389        <p><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
Note: See TracChangeset for help on using the changeset viewer.