wpseo_typecount_where
Filter WHERE query part for type count of post type.
Использование
add_filter( 'wpseo_typecount_where', 'wp_kama_wpseo_typecount_where_filter', 10, 2 ); /** * Function for `wpseo_typecount_where` filter-hook. * * @param string $where SQL part. * @param string $post_type Post type name. * * @return string */ function wp_kama_wpseo_typecount_where_filter( $where, $post_type ){ // filter... return $where; }
- $where(строка)
- SQL part.
По умолчанию: empty string - $post_type(строка)
- Post type name.
Где вызывается хук
wpseo_typecount_where
yoast/inc/sitemaps/class-post-type-sitemap-provider.php 336
$where_filter = apply_filters( 'wpseo_typecount_where', '', $post_type );