acf/schema/post_field_objects/post_type=(post_type)
Filters the field objects for a specific post type.
The dynamic portion of the hook name, $post_type, refers to the post type name. For example, 'acf/schema/post_field_objects/post_type=product' for the product post type.
Usage
add_filter( 'acf/schema/post_field_objects/post_type=(post_type)', 'wp_kama_acf_schema_post_field_objects_type_filter', 10, 2 );
/**
* Function for `acf/schema/post_field_objects/post_type=(post_type)` filter-hook.
*
* @param array|null $field_objects The field objects array, or null to use default behavior.
* @param WP_Post $post The post object.
*
* @return array|null
*/
function wp_kama_acf_schema_post_field_objects_type_filter( $field_objects, $post ){
// filter...
return $field_objects;
}
- $field_objects(array|null)
- The field objects array, or null to use default behavior.
- $post(WP_Post)
- The post object.
Changelog
| Since 6.8.0 | Introduced. |
Where the hook is called
acf/schema/post_field_objects/post_type=(post_type)
acf/src/AI/GEO/Outputs/Posts.php 137
$field_objects = apply_filters( 'acf/schema/post_field_objects/post_type=' . $post_type, $field_objects, $post );