apply_filters( 'wp_count_posts', stdClass $counts, string $type, string $perm )
- Since
- 3.7.0
Filters the post counts by status for the current post type.
Parameters
$countsstdClass- An object containing the current post_type's post counts by status.
$typestring- Post type.
$permstring- The permission to determine if the posts are 'readable' by the current user.
Fired at · 2
wp-includes/post.php:3421wp_count_posts()wp-includes/post.php:3478wp_count_posts()
Source
<?php * @param stdClass $counts An object containing the current post_type's post * counts by status. * @param string $type Post type. * @param string $perm The permission to determine if the posts are 'readable' * by the current user. */ return apply_filters( 'wp_count_posts', $counts, $type, $perm );} /** * Counts number of attachments for the mime type(s). * * If you set the optional mime_type parameter, then an array will still beHistory
Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.