wpseo_terms
Allows filtering of the terms list used to replace %%category%%, %%tag%% and %%ct_<custom-tax-name>%% variables.
Использование
add_filter( 'wpseo_terms', 'wp_kama_wpseo_terms_filter', 10, 2 );
/**
* Function for `wpseo_terms` filter-hook.
*
* @param string $output Comma-delimited string containing the terms.
* @param string $taxonomy The taxonomy of the terms.
*
* @return string
*/
function wp_kama_wpseo_terms_filter( $output, $taxonomy ){
// filter...
return $output;
}
- $output(строка)
- Comma-delimited string containing the terms.
- $taxonomy(строка)
- The taxonomy of the terms.
Где вызывается хук
wpseo_terms
yoast/inc/class-wpseo-replace-vars.php 1600
return apply_filters( 'wpseo_terms', $output, $taxonomy );