acf/get_object_type
Filters the object type.
Использование
add_filter( 'acf/get_object_type', 'wp_kama_acf_get_object_type_filter', 10, 3 ); /** * Function for `acf/get_object_type` filter-hook. * * @param object $object The object props. * @param string $object_type The object type (post, term, user, etc). * @param string $object_subtype Optional object subtype (post type, taxonomy). * * @return object */ function wp_kama_acf_get_object_type_filter( $object, $object_type, $object_subtype ){ // filter... return $object; }
- $object(объект)
- The object props.
- $object_type(строка)
- The object type (post, term, user, etc).
- $object_subtype(строка)
- Optional object subtype (post type, taxonomy).
Список изменений
С версии 5.9.0 | Введена. |
Где вызывается хук
acf/get_object_type
acf/includes/acf-wp-functions.php 107
return apply_filters( 'acf/get_object_type', $object, $object_type, $object_subtype );