wpseo_feature_toggles
Filter to add feature toggles from add-ons.
Использование
add_filter( 'wpseo_feature_toggles', 'wp_kama_wpseo_feature_toggles_filter' ); /** * Function for `wpseo_feature_toggles` filter-hook. * * @param array $feature_toggles Array with feature toggle objects where each object should have a `name`, `setting` and `label` property. * * @return array */ function wp_kama_wpseo_feature_toggles_filter( $feature_toggles ){ // filter... return $feature_toggles; }
- $feature_toggles(массив)
- Array with feature toggle objects where each object should have a name, setting and label property.
Где вызывается хук
wpseo_feature_toggles
yoast/admin/views/class-yoast-feature-toggles.php 224
$feature_toggles = apply_filters( 'wpseo_feature_toggles', $feature_toggles );