acf/schema/block_jsonld_enabled filter-hookACF 6.8.0

Filters whether JSON-LD output is enabled for this specific block.

Usage

add_filter( 'acf/schema/block_jsonld_enabled', 'wp_kama_acf_schema_block_jsonld_enabled_filter', 10, 3 );

/**
 * Function for `acf/schema/block_jsonld_enabled` filter-hook.
 * 
 * @param boolean $auto_jsonld Whether JSON-LD is enabled for this block.
 * @param array   $block       The block props.
 * @param array   $block_type  The block type settings.
 *
 * @return boolean
 */
function wp_kama_acf_schema_block_jsonld_enabled_filter( $auto_jsonld, $block, $block_type ){
	// filter...
	return $auto_jsonld;
}
$auto_jsonld(true|false)
Whether JSON-LD is enabled for this block.
$block(array)
The block props.
$block_type(array)
The block type settings.

Changelog

Since 6.8.0 Introduced.

Where the hook is called

Blocks::output_block_jsonld_data()
acf/schema/block_jsonld_enabled
acf/src/Pro/AI/GEO/Outputs/Blocks.php 177
$auto_jsonld = apply_filters( 'acf/schema/block_jsonld_enabled', $auto_jsonld, $block, $block_type );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.