post_edit_category_parent_dropdown_args хук-фильтр . WP 4.4.0
Filters the arguments for the taxonomy parent dropdown on the Post Edit page.
Использование
add_filter( 'post_edit_category_parent_dropdown_args', 'filter_function_name_758' ); function filter_function_name_758( $parent_dropdown_args ){ // filter... return $parent_dropdown_args; }
- $parent_dropdown_args(массив)
Optional. Array of arguments to generate parent dropdown.
-
$taxonomy (строка)
Name of the taxonomy to retrieve. -
$hide_if_empty (true/false)
True to skip generating markup if no categories are found. -
$name (строка)
Value for the 'name' attribute of the select element.
По умолчанию: "new{$tax_name}_parent" -
$orderby (строка)
Which column to use for ordering terms.
По умолчанию: 'name' -
$hierarchical (true/false/число)
Whether to traverse the taxonomy hierarchy.
По умолчанию: 1 - $show_option_none (строка)
Text to display for the "none" option.
По умолчанию: "— {$parent} —", where$parent
is 'parent_item' taxonomy label
-
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
post_edit_category_parent_dropdown_args
wp-admin/includes/meta-boxes.php 656
$parent_dropdown_args = apply_filters( 'post_edit_category_parent_dropdown_args', $parent_dropdown_args );