wpseo_posts_threshold
Filter wpseo_posts_threshold Allow filtering the minimum threshold for the amount of posts in the site, in order for Indexable lists to be relevant.
Использование
add_filter( 'wpseo_posts_threshold', 'wp_kama_wpseo_posts_threshold_filter', 10, 2 ); /** * Function for `wpseo_posts_threshold` filter-hook. * * @param int $post_threshold The minimum threshold for the amount of posts in the site, in order for Indexable lists to be relevant. * @param $string * * @return int */ function wp_kama_wpseo_posts_threshold_filter( $post_threshold, $string ){ // filter... return $post_threshold; }
- $post_threshold(int)
- The minimum threshold for the amount of posts in the site, in order for Indexable lists to be relevant.
- $string
- -
Где вызывается хук
wpseo_posts_threshold
yoast/src/deprecated/src/helpers/indexables-page-helper.php 121
return \apply_filters_deprecated( 'wpseo_posts_threshold', [ self::POSTS_THRESHOLD ], 'Yoast SEO 20.4' );