Skip to content

Commit 08efcf0

Browse files
committed
Docs: Various docblock corrections.
See #53399 git-svn-id: https://develop.svn.wordpress.org/trunk@52299 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6050e9a commit 08efcf0

10 files changed

Lines changed: 26 additions & 22 deletions

File tree

src/wp-admin/includes/image.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ function wp_exif_frac2dec( $str ) {
687687
*
688688
* @since 2.5.0
689689
*
690-
* @param string $str
691-
* @return int
690+
* @param string $str A date string expected to be in Exif format (Y:m:d H:i:s).
691+
* @return int|false The unix timestamp, or false on failure.
692692
*/
693693
function wp_exif_date2ts( $str ) {
694694
list( $date, $time ) = explode( ' ', trim( $str ) );

src/wp-admin/includes/post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
209209
*
210210
* @since 5.0.1
211211
*
212-
* @param array|null $post_data Optional. The array of post data to process.
213-
* Defaults to the `$_POST` superglobal.
212+
* @param array|WP_Error|null $post_data The array of post data to process, or an error object.
213+
* Defaults to the `$_POST` superglobal.
214214
* @return array|WP_Error Array of post data on success, WP_Error on failure.
215215
*/
216216
function _wp_get_allowed_postdata( $post_data = null ) {

src/wp-includes/class-wp-block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ public function __get( $name ) {
196196
* @since 5.5.0
197197
*
198198
* @param array $options {
199-
* Optional options object.
199+
* Optional options object.
200200
*
201-
* @type bool $dynamic Defaults to 'true'. Optionally set to false to avoid using the block's render_callback.
201+
* @type bool $dynamic Defaults to 'true'. Optionally set to false to avoid using the block's render_callback.
202202
* }
203203
* @return string Rendered block output.
204204
*/

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ class WP_HTTP_Proxy {
4444
/**
4545
* Whether proxy connection should be used.
4646
*
47-
* @since 2.8.0
47+
* Constants which control this behaviour:
48+
*
49+
* - `WP_PROXY_HOST`
50+
* - `WP_PROXY_PORT`
4851
*
49-
* @use WP_PROXY_HOST
50-
* @use WP_PROXY_PORT
52+
* @since 2.8.0
5153
*
5254
* @return bool
5355
*/
@@ -58,10 +60,12 @@ public function is_enabled() {
5860
/**
5961
* Whether authentication should be used.
6062
*
61-
* @since 2.8.0
63+
* Constants which control this behaviour:
64+
*
65+
* - `WP_PROXY_USERNAME`
66+
* - `WP_PROXY_PASSWORD`
6267
*
63-
* @use WP_PROXY_USERNAME
64-
* @use WP_PROXY_PASSWORD
68+
* @since 2.8.0
6569
*
6670
* @return bool
6771
*/

src/wp-includes/class-wp-query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ public function get_posts() {
28262826
* Filters all query clauses at once, for convenience.
28272827
*
28282828
* Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
2829-
* fields (SELECT), and LIMITS clauses.
2829+
* fields (SELECT), and LIMIT clauses.
28302830
*
28312831
* @since 3.1.0
28322832
*
@@ -2950,7 +2950,7 @@ public function get_posts() {
29502950
* For use by caching plugins.
29512951
*
29522952
* Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT,
2953-
* fields (SELECT), and LIMITS clauses.
2953+
* fields (SELECT), and LIMIT clauses.
29542954
*
29552955
* @since 3.1.0
29562956
*

src/wp-includes/comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ function get_lastcommentmodified( $timezone = 'server' ) {
366366
*
367367
* @param int $post_id Optional. Restrict the comment counts to the given post. Default 0, which indicates that
368368
* comment counts for the whole site will be retrieved.
369-
* @return array() {
369+
* @return array {
370370
* The number of comments keyed by their status.
371371
*
372372
* @type int $approved The number of approved comments.

src/wp-includes/media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4224,7 +4224,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
42244224
* @param array $args {
42254225
* Arguments for enqueuing media scripts.
42264226
*
4227-
* @type int|WP_Post A post object or ID.
4227+
* @type int|WP_Post $post A post object or ID.
42284228
* }
42294229
*/
42304230
function wp_enqueue_media( $args = array() ) {

src/wp-includes/ms-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ function wp_delete_signup_on_user_delete( $id, $reassign, $user ) {
13071307
* This function runs when a user self-registers as well as when
13081308
* a Super Admin creates a new user. Hook to {@see 'wpmu_new_user'} for events
13091309
* that should affect all new users, but only on Multisite (otherwise
1310-
* use {@see'user_register'}).
1310+
* use {@see 'user_register'}).
13111311
*
13121312
* @since MU (3.0.0)
13131313
*

src/wp-includes/pomo/entry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Translation_Entry {
1616
/**
1717
* Whether the entry contains a string and its plural form, default is false
1818
*
19-
* @var boolean
19+
* @var bool
2020
*/
2121
public $is_plural = false;
2222

src/wp-includes/taxonomy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4636,10 +4636,10 @@ function get_term_link( $term, $taxonomy = '' ) {
46364636
* Arguments about which post to use and how to format the output. Shares all of the arguments
46374637
* supported by get_the_taxonomies(), in addition to the following.
46384638
*
4639-
* @type int|WP_Post $post Post ID or object to get taxonomies of. Default current post.
4640-
* @type string $before Displays before the taxonomies. Default empty string.
4641-
* @type string $sep Separates each taxonomy. Default is a space.
4642-
* @type string $after Displays after the taxonomies. Default empty string.
4639+
* @type int|WP_Post $post Post ID or object to get taxonomies of. Default current post.
4640+
* @type string $before Displays before the taxonomies. Default empty string.
4641+
* @type string $sep Separates each taxonomy. Default is a space.
4642+
* @type string $after Displays after the taxonomies. Default empty string.
46434643
* }
46444644
*/
46454645
function the_taxonomies( $args = array() ) {

0 commit comments

Comments
 (0)