Make WordPress Core


Ignore:
Timestamp:
12/29/2014 03:26:51 PM (10 years ago)
Author:
boonebgorges
Message:

Apply 'taxonomy_parent_dropdown_args' filter when editing terms.

Added in WP 3.7 [25123], the 'taxonomy_parent_dropdown_args' filter affected
only the term creation interface. This changeset introduces parity by ensuring
that it is applied when editing terms as well.

The new $context parameter indicates whether the filter is being applied in
a 'new' or 'edit' context.

Props TimothyBlynJacobs, DrewAPicture.
Fixes #29853.

File:
1 edited

Legend:

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

    r30842 r30998  
    479479     *
    480480     * @since 3.7.0
     481     * @since 4.1.0 Added $context parameter.
    481482     *
    482483     * @param array  $dropdown_args {
     
    493494     * }
    494495     * @param string $taxonomy The taxonomy slug.
     496     * @param string $context  Filter context. Accepts 'new' or 'edit'.
    495497     */
    496     $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy );
     498    $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
    497499    wp_dropdown_categories( $dropdown_args );
    498500    ?>
Note: See TracChangeset for help on using the changeset viewer.