Docs: Miscellaneous inline documentation improvements, including:

* Document the post statuses global as an array of `stdClass` objects
* Document the taxonomies global as an array of `WP_Taxonomy` objects
* Document the return value of the post count functions as `stdClass` objects
* Fix some typos

See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@51885 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2021-10-04 20:42:54 +00:00
parent c69c34273a
commit 4bf908449a
5 changed files with 24 additions and 24 deletions

View File

@@ -949,7 +949,7 @@ function get_post_mime_type( $post = null ) {
*
* @since 2.0.0
*
* @param int|WP_Post $post Optional. Post ID or post object. Defaults to global $post..
* @param int|WP_Post $post Optional. Post ID or post object. Defaults to global $post.
* @return string|false Post status on success, false on failure.
*/
function get_post_status( $post = null ) {
@@ -1077,7 +1077,7 @@ function _wp_privacy_statuses() {
*
* @since 3.0.0
*
* @global array $wp_post_statuses Inserts new post status object into the list
* @global stdClass[] $wp_post_statuses Inserts new post status object into the list
*
* @param string $post_status Name of the post status.
* @param array|string $args {
@@ -1201,12 +1201,12 @@ function register_post_status( $post_status, $args = array() ) {
*
* @since 3.0.0
*
* @global array $wp_post_statuses List of post statuses.
* @global stdClass[] $wp_post_statuses List of post statuses.
*
* @see register_post_status()
*
* @param string $post_status The name of a registered post status.
* @return object|null A post status object.
* @return stdClass|null A post status object.
*/
function get_post_status_object( $post_status ) {
global $wp_post_statuses;
@@ -1223,7 +1223,7 @@ function get_post_status_object( $post_status ) {
*
* @since 3.0.0
*
* @global array $wp_post_statuses List of post statuses.
* @global stdClass[] $wp_post_statuses List of post statuses.
*
* @see register_post_status()
*
@@ -2817,7 +2817,7 @@ 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 object Number of posts for each status.
* @return stdClass Number of posts for each status.
*/
function wp_count_posts( $type = 'post', $perm = '' ) {
global $wpdb;
@@ -2870,11 +2870,11 @@ function wp_count_posts( $type = 'post', $perm = '' ) {
*
* @since 3.7.0
*
* @param object $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.
* @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 );
}
@@ -2893,7 +2893,7 @@ function wp_count_posts( $type = 'post', $perm = '' ) {
*
* @param string|string[] $mime_type Optional. Array or comma-separated list of
* MIME patterns. Default empty.
* @return object An object containing the attachment counts by mime type.
* @return stdClass An object containing the attachment counts by mime type.
*/
function wp_count_attachments( $mime_type = '' ) {
global $wpdb;
@@ -2912,7 +2912,7 @@ function wp_count_attachments( $mime_type = '' ) {
*
* @since 3.7.0
*
* @param object $counts An object containing the attachment counts by
* @param stdClass $counts An object containing the attachment counts by
* mime type.
* @param string|string[] $mime_type Array or comma-separated list of MIME patterns.
*/