This filter is documented in wp-includes/post.php return apply_filters( 'wp_count_posts', $counts, $type, $perm );
$mime_type = ''
Sortie :
@param stdClass $counts An object containing the current post_type's post @param string $type Post type. @param string $perm The permission to determine if the posts are 'readable' @param string|string[] $mime_type Optional. Array or comma-separated list of @return stdClass An object containing the attachment counts by mime type.
// Utilisation de la fonction wp_count_attachments
$result = wp_count_attachments($mime_type = '');
if ($result) {
// Votre logique ici
}
Chargement des actualités...