diff --git a/src/wp-admin/edit-tag-form.php b/src/wp-admin/edit-tag-form.php
index 94a26bbdd2..73db25b00f 100644
--- a/src/wp-admin/edit-tag-form.php
+++ b/src/wp-admin/edit-tag-form.php
@@ -106,7 +106,22 @@ do_action( "{$taxonomy}_term_edit_form_tag" );
|
- 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
+ 0,
+ 'hide_if_empty' => false,
+ 'taxonomy' => $taxonomy,
+ 'name' => 'parent',
+ 'orderby' => 'name',
+ 'selected' => $tag->parent,
+ 'exclude_tree' => $tag->term_id,
+ 'hierarchical' => true,
+ 'show_option_none' => __( 'None' ),
+ );
+
+ /** This filter is documented in wp-admin/edit-tags.php */
+ $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit' );
+ wp_dropdown_categories( $dropdown_args ); ?>
diff --git a/src/wp-admin/edit-tags.php b/src/wp-admin/edit-tags.php
index e0cd746ed4..973d0ebf1e 100644
--- a/src/wp-admin/edit-tags.php
+++ b/src/wp-admin/edit-tags.php
@@ -478,6 +478,7 @@ do_action( "{$taxonomy}_term_new_form_tag" );
* Filter the taxonomy parent drop-down on the Edit Term page.
*
* @since 3.7.0
+ * @since 4.1.0 Added $context parameter.
*
* @param array $dropdown_args {
* An array of taxonomy parent drop-down arguments.
@@ -492,8 +493,9 @@ do_action( "{$taxonomy}_term_new_form_tag" );
* @type string $show_option_none Label to display if there are no terms. Default 'None'.
* }
* @param string $taxonomy The taxonomy slug.
+ * @param string $context Filter context. Accepts 'new' or 'edit'.
*/
- $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy );
+ $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
wp_dropdown_categories( $dropdown_args );
?>
|