diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 59e9fc3f7a..5efa971aff 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -510,7 +510,44 @@ function post_categories_meta_box( $post, $box ) { - $tax_name, 'hide_empty' => 0, 'name' => 'new' . $tax_name . '_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —' ) ); ?> + $tax_name, + 'hide_empty' => 0, + 'name' => 'new' . $tax_name . '_parent', + 'orderby' => 'name', + 'hierarchical' => 1, + 'show_option_none' => '— ' . $taxonomy->labels->parent_item . ' —', + ); + + /** + * Filters the arguments for the taxonomy parent dropdown on the Post Edit page. + * + * @since 4.4.0 + * + * @param array $parent_dropdown_args { + * Optional. Array of arguments to generate parent dropdown. + * + * @type string $taxonomy Name of the taxonomy to retrieve. + * @type bool $hide_if_empty True to skip generating markup if no + * categories are found. Default 0. + * @type string $name Value for the 'name' attribute + * of the select element. + * Default "new{$tax_name}_parent". + * @type string $orderby Which column to use for ordering + * terms. Default 'name'. + * @type bool|int $hierarchical Whether to traverse the taxonomy + * hierarchy. Default 1. + * @type string $show_option_none Text to display for the "none" option. + * Default "— {$parent} —", + * where `$parent` is 'parent_item' + * taxonomy label. + * } + * + */ + $parent_dropdown_args = apply_filters( 'post_edit_category_parent_dropdown_args', $parent_dropdown_args ); + wp_dropdown_categories( $parent_dropdown_args ); + ?> diff --git a/wp-includes/version.php b/wp-includes/version.php index 92b210f4f8..c542fa0a41 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33681'; +$wp_version = '4.4-alpha-33682'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.