get_object_subtype_user
Filters the object subtype identifier for a non-standard object type.
Это один из вариантов динамического хука get_object_subtype_(object_type)
Использование
add_filter( 'get_object_subtype_user', 'wp_kama_get_object_subtype_user_filter', 10, 2 ); /** * Function for `get_object_subtype_user` filter-hook. * * @param string $object_subtype Empty string to override. * @param int $object_id ID of the object to get the subtype for. * * @return string */ function wp_kama_get_object_subtype_user_filter( $object_subtype, $object_id ){ // filter... return $object_subtype; }
- $object_subtype(строка)
- Empty string to override.
- $object_id(int)
- ID of the object to get the subtype for.
Список изменений
С версии 4.9.8 | Введена. |
Где вызывается хук
get_object_subtype_user
wp-includes/meta.php 1823
return apply_filters( "get_object_subtype_{$object_type}", $object_subtype, $object_id );