acf/pre_save_block
Filters the block attributes before saving.
Usage
add_filter( 'acf/pre_save_block', 'wp_kama_acf_pre_save_block_filter' );
/**
* Function for `acf/pre_save_block` filter-hook.
*
* @param array $attrs The block attributes.
*
* @return array
*/
function wp_kama_acf_pre_save_block_filter( $attrs ){
// filter...
return $attrs;
}
- $attrs(array)
- The block attributes.
Changelog
| Since 5.7.14 | Introduced. |
Where the hook is called
acf/pre_save_block
acf/pro/blocks.php 1604
$attrs = apply_filters( 'acf/pre_save_block', $attrs );