wpseo_post_edit_values
Filter: wpseo_post_edit_values Allows changing the values Yoast SEO uses inside the post editor.
Использование
add_filter( 'wpseo_post_edit_values', 'wp_kama_wpseo_post_edit_values_filter', 10, 2 );
/**
* Function for `wpseo_post_edit_values` filter-hook.
*
* @param array $values The key-value map Yoast SEO uses inside the post editor.
* @param WP_Post $post The post opened in the editor.
*
* @return array
*/
function wp_kama_wpseo_post_edit_values_filter( $values, $post ){
// filter...
return $values;
}
- $values(массив)
- The key-value map Yoast SEO uses inside the post editor.
- $post(WP_Post)
- The post opened in the editor.
Где вызывается хук
wpseo_post_edit_values
yoast/admin/formatter/class-post-metabox-formatter.php 84
return apply_filters( 'wpseo_post_edit_values', $values, $this->post );