wpseo_schema_graph_pieces хук-фильтрYoast 1.0

Filter: wpseo_schema_graph_pieces Allows adding pieces to the graph.

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

add_filter( 'wpseo_schema_graph_pieces', 'wp_kama_wpseo_schema_graph_pieces_filter', 10, 2 );

/**
 * Function for `wpseo_schema_graph_pieces` filter-hook.
 * 
 * @param array             $pieces  The schema pieces.
 * @param Meta_Tags_Context $context An object with context variables.
 *
 * @return array
 */
function wp_kama_wpseo_schema_graph_pieces_filter( $pieces, $context ){

	// filter...
	return $pieces;
}
$pieces(массив)
The schema pieces.
$context(Meta_Tags_Context)
An object with context variables.

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

Schema_Generator::get_graph_pieces()
wpseo_schema_graph_pieces
yoast/src/generators/schema-generator.php 325
return \apply_filters( 'wpseo_schema_graph_pieces', $schema_pieces, $context );

Где используется хук в Yoast SEO

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