wpseo_metabox_entries_(tab) хук-фильтр . Yoast 1.0
Filter the WPSEO metabox form field definitions for a tab. {tab} can be 'general', 'advanced' or 'social'.
Использование
add_filter( 'wpseo_metabox_entries_(tab)', 'filter_function_name_4046', 10, 2 ); function filter_function_name_4046( $field_defs, $post_type ){ // filter... return $field_defs; }
- $field_defs(массив)
- Metabox form field definitions.
- $post_type(строка)
- Post type of the post the metabox is for.
По умолчанию: 'post'
Где вызывается хук
wpseo_metabox_entries_(tab)
yoast/inc/class-wpseo-meta.php 412
return apply_filters( 'wpseo_metabox_entries_' . $tab, $field_defs, $post_type );
Где используется хук в ядре Yoast SEO
yoast/src/integrations/estimated-reading-time.php 30
\add_filter( 'wpseo_metabox_entries_general', [ $this, 'add_estimated_reading_time_hidden_fields' ] );