wp_register_ability_category_args хук-фильтрWP 6.9.0

Filters the ability category arguments before they are validated and used to instantiate the ability category.

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

add_filter( 'wp_register_ability_category_args', 'wp_kama_register_ability_category_args_filter', 10, 2 );

/**
 * Function for `wp_register_ability_category_args` filter-hook.
 * 
 * @param array $args The arguments used to instantiate the ability category.
 * @param string               $slug The slug of the ability category.
 *
 * @return array
 */
function wp_kama_register_ability_category_args_filter( $args, $slug ){
	// filter...
	return $args;
}
$args(array<string, mixed>)

The arguments used to instantiate the ability category.

  • label(строка)
    The human-readable label for the ability category.

  • description(строка)
    A description of the ability category.

  • mixed>(array<string,)
    $meta Optional. Additional metadata for the ability category.
$slug(строка)
The slug of the ability category.

Список изменений

С версии 6.9.0 Введена.

Где вызывается хук

WP_Ability_Categories_Registry::register()
wp_register_ability_category_args
wp-includes/abilities-api/class-wp-ability-categories-registry.php 91
$args = apply_filters( 'wp_register_ability_category_args', $args, $slug );

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

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