acf/get_object_type filter-hookACF 5.9.0

Filters the object type.

Usage

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(object)
The object props.
$object_type(string)
The object type (post, term, user, etc).
$object_subtype(string)
Optional object subtype (post type, taxonomy).

Changelog

Since 5.9.0 Introduced.

Where the hook is called

acf_get_object_type()
acf/get_object_type
acf/includes/acf-wp-functions.php 119
return apply_filters( 'acf/get_object_type', $object, $object_type, $object_subtype );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.