wpseo_replacement_variables_custom_fields
Filters the custom fields that are auto-completed and replaced as replacement variables in the meta box and sidebar.
Использование
add_filter( 'wpseo_replacement_variables_custom_fields', 'wp_kama_wpseo_replacement_variables_custom_fields_filter' );
/**
* Function for `wpseo_replacement_variables_custom_fields` filter-hook.
*
* @param string[] $fields The custom field names.
*
* @return string[]
*/
function wp_kama_wpseo_replacement_variables_custom_fields_filter( $fields ){
// filter...
return $fields;
}
- $fields(string[])
- The custom field names.
Где вызывается хук
yoast/inc/class-wpseo-custom-fields.php 71
$fields = apply_filters( 'wpseo_replacement_variables_custom_fields', $fields );