acf/schema/auto_add_image хук-фильтрACF 1.0

Filter whether to automatically add featured image to JSON-LD output

Использование

add_filter( 'acf/schema/auto_add_image', 'wp_kama_acf_schema_auto_add_image_filter', 10, 3 );

/**
 * Function for `acf/schema/auto_add_image` filter-hook.
 * 
 * @param bool    $add_image Whether to add the featured image.
 * @param WP_Post $post      The post object.
 * @param string  $post_type The post type.
 *
 * @return bool
 */
function wp_kama_acf_schema_auto_add_image_filter( $add_image, $post, $post_type ){

	// filter...
	return $add_image;
}
$add_image(true|false)
Whether to add the featured image.
По умолчанию: true
$post(WP_Post)
The post object.
$post_type(строка)
The post type.

Где вызывается хук

Posts::output_jsonld_data()
acf/schema/auto_add_image
acf/src/AI/GEO/Outputs/Posts.php 204
$add_image = apply_filters( 'acf/schema/auto_add_image', true, $post, $post_type );

Где используется хук в Advanced Custom Fields PRO

Использование не найдено.