mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Docs: Correct @return description for wp_count_posts().
Add a note that `wp_count_posts()` returns an empty object if the post type passed to the function does not exist. Follow-up to [6730], [6808], [8081], [24826], [29093], [51885]. Props crstauf, Ov3rfly. Fixes #58685. git-svn-id: https://develop.svn.wordpress.org/trunk@56120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3034,7 +3034,8 @@ function _count_posts_cache_key( $type = 'post', $perm = '' ) {
|
||||
*
|
||||
* @param string $type Optional. Post type to retrieve count. Default 'post'.
|
||||
* @param string $perm Optional. 'readable' or empty. Default empty.
|
||||
* @return stdClass Number of posts for each status.
|
||||
* @return stdClass An object containing the number of posts for each status,
|
||||
* or an empty object if the post type does not exist.
|
||||
*/
|
||||
function wp_count_posts( $type = 'post', $perm = '' ) {
|
||||
global $wpdb;
|
||||
|
||||
Reference in New Issue
Block a user