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', 'wp_kama_post_edit_category_parent_dropdown_args_filter' );

/**
 * Function for `post_edit_category_parent_dropdown_args` filter-hook.
 * 
 * @param array $parent_dropdown_args Optional. Array of arguments to generate parent dropdown.
 *
 * @return array
 */
function wp_kama_post_edit_category_parent_dropdown_args_filter( $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|int)
    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_categories_meta_box()
post_edit_category_parent_dropdown_args
wp-admin/includes/meta-boxes.php 724
$parent_dropdown_args = apply_filters( 'post_edit_category_parent_dropdown_args', $parent_dropdown_args );

Где используется хук в WordPress

Использование не найдено.