acf/schema/auto_add_author filter-hookACF 1.0

Filter whether to automatically add author to JSON-LD output

Usage

add_filter( 'acf/schema/auto_add_author', 'wp_kama_acf_schema_auto_add_author_filter', 10, 3 );

/**
 * Function for `acf/schema/auto_add_author` filter-hook.
 * 
 * @param bool    $add_author Whether to add the author.
 * @param WP_Post $post       The post object.
 * @param string  $post_type  The post type.
 *
 * @return bool
 */
function wp_kama_acf_schema_auto_add_author_filter( $add_author, $post, $post_type ){
	// filter...
	return $add_author;
}
$add_author(true|false)
Whether to add the author.
Default: true
$post(WP_Post)
The post object.
$post_type(string)
The post type.

Where the hook is called

Posts::output_jsonld_data()
acf/schema/auto_add_author
acf/src/AI/GEO/Outputs/Posts.php 235
$add_author = apply_filters( 'acf/schema/auto_add_author', true, $post, $post_type );

Where the hook is used in Advanced Custom Fields PRO

Usage not found.