wpseo_metabox_entries_(tab)
Filter the WPSEO metabox form field definitions for a tab. {tab} can be 'general', 'advanced' or 'social'.
Использование
add_filter( 'wpseo_metabox_entries_(tab)', 'wp_kama_wpseo_metabox_entries_tab_filter', 10, 2 );
/**
* Function for `wpseo_metabox_entries_(tab)` filter-hook.
*
* @param array $field_defs Metabox form field definitions.
* @param string $post_type Post type of the post the metabox is for.
*
* @return array
*/
function wp_kama_wpseo_metabox_entries_tab_filter( $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 423
return apply_filters( 'wpseo_metabox_entries_' . $tab, $field_defs, $post_type );