global_terms_enabled
Filters whether global terms are enabled.
Returning a non-null value from the filter will effectively short-circuit the function and return the value of the global_terms_enabled option instead.
Использование
add_filter( 'global_terms_enabled', 'wp_kama_global_terms_enabled_filter' ); /** * Function for `global_terms_enabled` filter-hook. * * @param null $enabled Whether global terms are enabled. * * @return null */ function wp_kama_global_terms_enabled_filter( $enabled ){ // filter... return $enabled; }
- $enabled(null)
- Whether global terms are enabled.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
global_terms_enabled
wp-cli/php/utils-wp.php 513
$filter = apply_filters( 'global_terms_enabled', null ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound