acf/schema/block_field_objects/block_name=(name)
Filters the field objects for a specific block name/type.
The dynamic portion of the hook name, $block['name'], refers to the block type name. For example, 'acf/schema/block_field_objects/block_name=acf/testimonial' for the testimonial block.
Usage
add_filter( 'acf/schema/block_field_objects/block_name=(name)', 'wp_kama_acf_schema_block_field_objects_name_filter', 10, 4 );
/**
* Function for `acf/schema/block_field_objects/block_name=(name)` filter-hook.
*
* @param array|null $field_objects The field objects array, or null to use default behavior.
* @param array $block The block props.
* @param array $block_type The block type settings.
* @param int $post_id The current post ID.
*
* @return array|null
*/
function wp_kama_acf_schema_block_field_objects_name_filter( $field_objects, $block, $block_type, $post_id ){
// filter...
return $field_objects;
}
- $field_objects(array|null)
- The field objects array, or null to use default behavior.
- $block(array)
- The block props.
- $block_type(array)
- The block type settings.
- $post_id(int)
- The current post ID.
Changelog
| Since 6.8.0 | Introduced. |
Where the hook is called
acf/schema/block_field_objects/block_name=(name)
acf/src/Pro/AI/GEO/Outputs/Blocks.php 215
$field_objects = apply_filters( 'acf/schema/block_field_objects/block_name=' . $block['name'], $field_objects, $block, $block_type, $post_id );