wp_count_posts

wp_count_posts

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.9

apply_filters('wp_count_posts') is found 2 times:

  • /wp-includes/post.php line 3423
    			}
    		}
    
    		/** This filter is documented in wp-includes/post.php */
    		return apply_filters( 'wp_count_posts', $counts, $type, $perm );
    	}
    
    	if (
    		'readable' === $perm &&
    		is_user_logged_in() &&
    		! current_user_can( get_post_type_object( $type )->cap->read_private_posts )
    
  • /wp-includes/post.php line 3480
    	 * @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
    

See this hook used in plugins: