wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
_count_posts_cache_key is private and should not be used in themes or plugins directly.
_count_posts_cache_key › WordPress Function
Desde3.9.0
Obsoleton/a
› _count_posts_cache_key ( $type = 'post', $perm = '' )
| Acesso: |
|
| Parâmetros: (2) |
|
| Retorna: |
|
| Definido em: |
|
| Codex: |
Returns the cache key for wp_count_posts() based on the passed arguments.
Funções relacionadas: clean_post_cache, update_post_cache, wp_count_posts, update_post_caches, get_next_posts_page_link
Fonte
function _count_posts_cache_key( $type = 'post', $perm = '' ) {
$cache_key = 'posts-' . $type;
if ( 'readable' === $perm && is_user_logged_in() ) {
$post_type_object = get_post_type_object( $type );
if ( $post_type_object && ! current_user_can( $post_type_object->cap->read_private_posts ) ) {
$cache_key .= '_' . $perm . '_' . get_current_user_id();
}
}
return $cache_key;
}