wpseo_pre_schema_block_type_(block_type)
Filter: 'wpseo_pre_schema_block_type_<block-type>' - Allows hooking things to change graph output based on the blocks on the page.
Использование
add_action( 'wpseo_pre_schema_block_type_(block_type)', 'wp_kama_wpseo_pre_schema_block_type_action', 10, 2 ); /** * Function for `wpseo_pre_schema_block_type_(block_type)` action-hook. * * @param string $block_type The block type. * @param WP_Block_Parser_Block[] $blocks All the blocks of this block type. * * @return void */ function wp_kama_wpseo_pre_schema_block_type_action( $block_type, $blocks ){ // action... }
- $block_type(строка)
- The block type.
- $blocks(WP_Block_Parser_Block[])
- All the blocks of this block type.
Где вызывается хук
wpseo_pre_schema_block_type_(block_type)
yoast/src/generators/schema-generator.php 64
\do_action( 'wpseo_pre_schema_block_type_' . $block_type, $context->blocks[ $block_type ], $context );