wppaste
WordPress

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:3423wp_count_posts()
  • wp-includes/post.php:3480wp_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 be

History

Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 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.