Skip to content

Commit c19f567

Browse files
committed
Docs: Various docblock corrections and improvements.
See #50768 git-svn-id: https://develop.svn.wordpress.org/trunk@49597 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 36f47ff commit c19f567

File tree

8 files changed

+36
-35
lines changed

8 files changed

+36
-35
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You will need a basic understanding of how to use the command line on your compu
1616
You will need Node and npm installed on your computer. Node is a JavaScript runtime used for developer tooling, and npm is the package manager included with Node. If you have a package manager installed for your operating system, setup can be as straightforward as:
1717

1818
* macOS: `brew install node`
19-
* Windows: `choco install nodejs`
19+
* Windows: `choco install node`
2020
* Ubuntu: `apt install nodejs npm`
2121

2222
If you are not using a package manager, see the [Node.js download page](https://nodejs.org/en/download/) for installers and binaries.

src/wp-includes/category-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ function get_tag_link( $tag ) {
11531153
*
11541154
* @since 2.3.0
11551155
*
1156-
* @param int $post_id Post ID.
1156+
* @param int|WP_Post $post_id Post ID or object.
11571157
* @return WP_Term[]|false|WP_Error Array of WP_Term objects on success, false if there are no terms
11581158
* or the post does not exist, WP_Error on failure.
11591159
*/

src/wp-includes/class-wp-http-streams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function request( $url, $args = array() ) {
9494
$ssl_verify = isset( $parsed_args['sslverify'] ) && $parsed_args['sslverify'];
9595
if ( $is_local ) {
9696
/**
97-
* Filters whether SSL should be verified for local requests.
97+
* Filters whether SSL should be verified for local HTTP API requests.
9898
*
9999
* @since 2.8.0
100100
* @since 5.1.0 The `$url` parameter was added.

src/wp-includes/deprecated.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,7 @@ function get_attachment_icon_src( $id = 0, $fullsize = false ) {
19111911
} elseif ( $src = wp_mime_type_icon( $post->ID ) ) {
19121912
// No thumb, no image. We'll look for a mime-related icon instead.
19131913

1914+
/** This filter is documented in wp-includes/post.php */
19141915
$icon_dir = apply_filters( 'icon_dir', get_template_directory() . '/images' );
19151916
$src_file = $icon_dir . '/' . wp_basename($src);
19161917
}

src/wp-includes/general-template.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,7 +2585,7 @@ function the_modified_date( $format = '', $before = '', $after = '', $echo = tru
25852585
*
25862586
* @param string $format Optional. PHP date format. Defaults to the 'date_format' option.
25872587
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
2588-
* @return string|false Date the current post was modified. False on failure.
2588+
* @return string|int|false Date the current post was modified. False on failure.
25892589
*/
25902590
function get_the_modified_date( $format = '', $post = null ) {
25912591
$post = get_post( $post );
@@ -2605,9 +2605,9 @@ function get_the_modified_date( $format = '', $post = null ) {
26052605
* @since 2.1.0
26062606
* @since 4.6.0 Added the `$post` parameter.
26072607
*
2608-
* @param string|false $the_time The formatted date or false if no post is found.
2609-
* @param string $format PHP date format.
2610-
* @param WP_Post|null $post WP_Post object or null if no post is found.
2608+
* @param string|int|false $the_time The formatted date or false if no post is found.
2609+
* @param string $format PHP date format.
2610+
* @param WP_Post|null $post WP_Post object or null if no post is found.
26112611
*/
26122612
return apply_filters( 'get_the_modified_date', $the_time, $format, $post );
26132613
}
@@ -2831,7 +2831,7 @@ function the_modified_time( $format = '' ) {
28312831
* was modified. Accepts 'G', 'U', or PHP date format.
28322832
* Defaults to the 'time_format' option.
28332833
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default current post.
2834-
* @return string|false Formatted date string or Unix timestamp. False on failure.
2834+
* @return string|int|false Formatted date string or Unix timestamp. False on failure.
28352835
*/
28362836
function get_the_modified_time( $format = '', $post = null ) {
28372837
$post = get_post( $post );
@@ -2851,10 +2851,10 @@ function get_the_modified_time( $format = '', $post = null ) {
28512851
* @since 2.0.0
28522852
* @since 4.6.0 Added the `$post` parameter.
28532853
*
2854-
* @param string|false $the_time The formatted time or false if no post is found.
2855-
* @param string $format Format to use for retrieving the time the post
2856-
* was modified. Accepts 'G', 'U', or PHP date format.
2857-
* @param WP_Post|null $post WP_Post object or null if no post is found.
2854+
* @param string|int|false $the_time The formatted time or false if no post is found.
2855+
* @param string $format Format to use for retrieving the time the post
2856+
* was modified. Accepts 'G', 'U', or PHP date format.
2857+
* @param WP_Post|null $post WP_Post object or null if no post is found.
28582858
*/
28592859
return apply_filters( 'get_the_modified_time', $the_time, $format, $post );
28602860
}
@@ -2908,10 +2908,10 @@ function get_post_modified_time( $format = 'U', $gmt = false, $post = null, $tra
29082908
*
29092909
* @since 2.8.0
29102910
*
2911-
* @param string $time The formatted time.
2912-
* @param string $format Format to use for retrieving the time the post was modified.
2913-
* Accepts 'G', 'U', or PHP date format. Default 'U'.
2914-
* @param bool $gmt Whether to retrieve the GMT time. Default false.
2911+
* @param string|int $time Formatted date string or Unix timestamp if `$format` is 'U' or 'G'.
2912+
* @param string $format Format to use for retrieving the time the post was modified.
2913+
* Accepts 'G', 'U', or PHP date format. Default 'U'.
2914+
* @param bool $gmt Whether to retrieve the GMT time. Default false.
29152915
*/
29162916
return apply_filters( 'get_post_modified_time', $time, $format, $gmt );
29172917
}

src/wp-includes/media.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function wp_get_additional_image_sizes() {
4242
*
4343
* @since 2.5.0
4444
*
45-
* @global int $content_width
45+
* @global int $content_width
4646
*
4747
* @param int $width Width of the image in pixels.
4848
* @param int $height Height of the image in pixels.
@@ -1081,7 +1081,7 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f
10811081
*
10821082
* @since 2.8.0
10831083
*
1084-
* @param array $attr Array of attribute values for the image markup, keyed by attribute name.
1084+
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
10851085
* See wp_get_attachment_image().
10861086
* @param WP_Post $attachment Image attachment post.
10871087
* @param string|int[] $size Requested image size. Can be any registered image size name, or
@@ -1109,7 +1109,7 @@ function wp_get_attachment_image( $attachment_id, $size = 'thumbnail', $icon = f
11091109
* @param string|int[] $size Requested image size. Can be any registered image size name, or
11101110
* an array of width and height values in pixels (in that order).
11111111
* @param bool $icon Whether the image should be treated as an icon.
1112-
* @param array $attr Array of attribute values for the image markup, keyed by attribute name.
1112+
* @param string[] $attr Array of attribute values for the image markup, keyed by attribute name.
11131113
* See wp_get_attachment_image().
11141114
*/
11151115
return apply_filters( 'wp_get_attachment_image', $html, $attachment_id, $size, $icon, $attr );
@@ -1237,7 +1237,7 @@ function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $imag
12371237
* @param string $image_src The 'src' of the image.
12381238
* @param array $image_meta The image meta data as returned by 'wp_get_attachment_metadata()'.
12391239
* @param int $attachment_id Optional. The image attachment ID. Default 0.
1240-
* @return string|bool The 'srcset' attribute value. False on error or when only one source exists.
1240+
* @return string|false The 'srcset' attribute value. False on error or when only one source exists.
12411241
*/
12421242
function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attachment_id = 0 ) {
12431243
/**
@@ -1476,7 +1476,7 @@ function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image
14761476
* Default null.
14771477
* @param int $attachment_id Optional. Image attachment ID. Either `$image_meta` or `$attachment_id`
14781478
* is needed when using the image size name as argument for `$size`. Default 0.
1479-
* @return string|bool A valid source size value for use in a 'sizes' attribute or false.
1479+
* @return string|false A valid source size value for use in a 'sizes' attribute or false.
14801480
*/
14811481
function wp_calculate_image_sizes( $size, $image_src = null, $image_meta = null, $attachment_id = 0 ) {
14821482
$width = 0;

src/wp-includes/ms-site.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,8 @@ function wp_uninitialize_site( $site_id ) {
860860
*
861861
* @since MU (3.0.0)
862862
*
863-
* @param string $uploads['basedir'] Uploads path without subdirectory. @see wp_upload_dir()
864-
* @param int $site_id The site ID.
863+
* @param string $basedir Uploads path without subdirectory. @see wp_upload_dir()
864+
* @param int $site_id The site ID.
865865
*/
866866
$dir = apply_filters( 'wpmu_delete_blog_upload_dir', $uploads['basedir'], $site->id );
867867
$dir = rtrim( $dir, DIRECTORY_SEPARATOR );

src/wp-includes/taxonomy.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,8 +2048,8 @@ function wp_delete_category( $cat_ID ) {
20482048
* @param int|int[] $object_ids The ID(s) of the object(s) to retrieve.
20492049
* @param string|string[] $taxonomies The taxonomy names to retrieve terms from.
20502050
* @param array|string $args See WP_Term_Query::__construct() for supported arguments.
2051-
* @return array|WP_Error The requested term data or empty array if no terms found.
2052-
* WP_Error if any of the taxonomies don't exist.
2051+
* @return WP_Term[]|WP_Error Array of terms or empty array if no terms found.
2052+
* WP_Error if any of the taxonomies don't exist.
20532053
*/
20542054
function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
20552055
if ( empty( $object_ids ) || empty( $taxonomies ) ) {
@@ -2125,11 +2125,11 @@ function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
21252125
*
21262126
* @since 4.2.0
21272127
*
2128-
* @param array $terms Array of terms for the given object or objects.
2129-
* @param int[] $object_ids Array of object IDs for which terms were retrieved.
2130-
* @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
2131-
* @param array $args Array of arguments for retrieving terms for the given
2132-
* object(s). See wp_get_object_terms() for details.
2128+
* @param WP_Term[] $terms Array of terms for the given object or objects.
2129+
* @param int[] $object_ids Array of object IDs for which terms were retrieved.
2130+
* @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
2131+
* @param array $args Array of arguments for retrieving terms for the given
2132+
* object(s). See wp_get_object_terms() for details.
21332133
*/
21342134
$terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );
21352135

@@ -2144,11 +2144,11 @@ function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
21442144
*
21452145
* @since 2.8.0
21462146
*
2147-
* @param array $terms Array of terms for the given object or objects.
2148-
* @param int[] $object_ids Array of object IDs for which terms were retrieved.
2149-
* @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
2150-
* @param array $args Array of arguments for retrieving terms for the given
2151-
* object(s). See wp_get_object_terms() for details.
2147+
* @param WP_Term[] $terms Array of terms for the given object or objects.
2148+
* @param string $object_ids Comma separated list if object IDs for which terms were retrieved.
2149+
* @param string $taxonomies SQL fragment of taxonomy names from which terms were retrieved.
2150+
* @param array $args Array of arguments for retrieving terms for the given
2151+
* object(s). See wp_get_object_terms() for details.
21522152
*/
21532153
return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
21542154
}

0 commit comments

Comments
 (0)