wpseo_indexing_get_limited_unindexed_count
Filter: wpseo_indexing_get_limited_unindexed_count Allow changing the amount of unindexed objects, and allow for a maximum number of items counted to improve performance.
Использование
add_filter( 'wpseo_indexing_get_limited_unindexed_count', 'wp_kama_wpseo_indexing_get_limited_unindexed_count_filter', 10, 2 );
/**
* Function for `wpseo_indexing_get_limited_unindexed_count` filter-hook.
*
* @param int $unindexed_count The amount of unindexed objects.
* @param int|false $limit Limit the number of unindexed objects that need to be counted.
* False if it doesn't need to be limited.
*
* @return int
*/
function wp_kama_wpseo_indexing_get_limited_unindexed_count_filter( $unindexed_count, $limit ){
// filter...
return $unindexed_count;
}
- $unindexed_count(int)
- The amount of unindexed objects.
- $limit(int|false)
- Limit the number of unindexed objects that need to be counted. False if it doesn't need to be limited.
Где вызывается хук
wpseo_indexing_get_limited_unindexed_count
yoast/src/helpers/indexing-helper.php 368
return \apply_filters( 'wpseo_indexing_get_limited_unindexed_count', $unindexed_count, $limit );