Skip to content

Commit c47f438

Browse files
committed
Docs: Various corrections and improvements to inline documentation.
See #55646 git-svn-id: https://develop.svn.wordpress.org/trunk@53827 602fd350-edb4-49c9-b593-d223f7449a82
1 parent bd6f081 commit c47f438

13 files changed

Lines changed: 29 additions & 27 deletions

src/wp-admin/authorize-application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@
250250
* The array of request data. All arguments are optional and may be empty.
251251
*
252252
* @type string $app_name The suggested name of the application.
253-
* @type string $success_url The url the user will be redirected to after approving the application.
254-
* @type string $reject_url The url the user will be redirected to after rejecting the application.
253+
* @type string $success_url The URL the user will be redirected to after approving the application.
254+
* @type string $reject_url The URL the user will be redirected to after rejecting the application.
255255
* }
256256
* @param WP_User $user The user authorizing the application.
257257
*/

src/wp-admin/edit-tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
* @param array $dropdown_args {
487487
* An array of taxonomy parent drop-down arguments.
488488
*
489-
* @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false.
489+
* @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0.
490490
* @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false.
491491
* @type string $taxonomy The taxonomy slug.
492492
* @type string $name Value of the name attribute to use for the drop-down select element.

src/wp-includes/category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function sanitize_category( $category, $context = 'display' ) {
269269
* @param mixed $value Category value to sanitize.
270270
* @param int $cat_id Category ID.
271271
* @param string $context What filter to use, 'raw', 'display', etc.
272-
* @return mixed Same type as $value after $value has been sanitized.
272+
* @return mixed Value after $value has been sanitized.
273273
*/
274274
function sanitize_category_field( $field, $value, $cat_id, $context ) {
275275
return sanitize_term_field( $field, $value, $cat_id, 'category', $context );

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public function __call( $name, $arguments ) {
159159
* Default null.
160160
* @type string $fields Comment fields to return. Accepts 'ids' for comment IDs
161161
* only or empty for all fields. Default empty.
162-
* @type int $ID Currently unused.
163162
* @type array $include_unapproved Array of IDs or email addresses of users whose unapproved
164163
* comments will be returned by the query regardless of
165164
* `$status`. Default empty.
@@ -223,7 +222,6 @@ public function __call( $name, $arguments ) {
223222
* Default empty.
224223
* @type int[] $post_author__not_in Array of author IDs *not* to retrieve comments for.
225224
* Default empty.
226-
* @type int $post_ID Currently unused.
227225
* @type int $post_id Limit results to those affiliated with a given post ID.
228226
* Default 0.
229227
* @type int[] $post__in Array of post IDs to include affiliated comments for.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,8 @@ public static function processResponse( $response ) { // phpcs:ignore WordPress.
687687
* then a numbered array is returned as the value of that header-key.
688688
*
689689
* @type array $response {
690-
* @type int $code The response status code. Default 0.
691-
* @type string $message The response message. Default empty.
690+
* @type int $code The response status code. Default 0.
691+
* @type string $message The response message. Default empty.
692692
* }
693693
* @type array $newheaders The processed header data as a multidimensional array.
694694
* @type WP_Http_Cookie[] $cookies If the original headers contain the 'Set-Cookie' key,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ public function fill_query_vars( $query_vars ) {
665665
* excludes stickies from 'post__in'. Accepts 1|true, 0|false.
666666
* Default false.
667667
* @type int $m Combination YearMonth. Accepts any four-digit year and month
668-
* numbers 1-12. Default empty.
668+
* numbers 01-12. Default empty.
669669
* @type string|string[] $meta_key Meta key or keys to filter by.
670670
* @type string|string[] $meta_value Meta value or values to filter by.
671671
* @type string $meta_compare MySQL operator used for comparing the meta value.

src/wp-includes/link-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4016,7 +4016,7 @@ function wp_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true ) {
40164016
/**
40174017
* Filters whether to preempt generating a shortlink for the given post.
40184018
*
4019-
* Returning a truthy value from the filter will effectively short-circuit
4019+
* Returning a value other than false from the filter will short-circuit
40204020
* the shortlink generation process, returning that value instead.
40214021
*
40224022
* @since 3.0.0

src/wp-includes/media.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4535,9 +4535,8 @@ function wp_enqueue_media( $args = array() ) {
45354535
*
45364536
* @link https://core.trac.wordpress.org/ticket/31071
45374537
*
4538-
* @param array|null $months An array of objects with `month` and `year`
4539-
* properties, or `null` (or any other non-array value)
4540-
* for default behavior.
4538+
* @param stdClass[]|null $months An array of objects with `month` and `year`
4539+
* properties, or `null` for default behavior.
45414540
*/
45424541
$months = apply_filters( 'media_library_months_with_files', null );
45434542
if ( ! is_array( $months ) ) {

src/wp-includes/meta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,15 +1635,15 @@ function unregister_meta_key( $object_type, $meta_key, $object_subtype = '' ) {
16351635
}
16361636

16371637
/**
1638-
* Retrieves a list of registered meta keys for an object type.
1638+
* Retrieves a list of registered metadata args for an object type, keyed by their meta keys.
16391639
*
16401640
* @since 4.6.0
16411641
* @since 4.9.8 The `$object_subtype` parameter was added.
16421642
*
16431643
* @param string $object_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
16441644
* or any other object type with an associated meta table.
16451645
* @param string $object_subtype Optional. The subtype of the object type.
1646-
* @return string[] List of registered meta keys.
1646+
* @return array[] List of registered metadata args, keyed by their meta keys.
16471647
*/
16481648
function get_registered_meta_keys( $object_type, $object_subtype = '' ) {
16491649
global $wp_meta_keys;

src/wp-includes/option.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ function get_option( $option, $default = false ) {
114114
*
115115
* The dynamic portion of the hook name, `$option`, refers to the option name.
116116
*
117-
* Returning a truthy value from the filter will effectively short-circuit retrieval
118-
* and return the passed value instead.
117+
* Returning a value other than false from the filter will short-circuit retrieval
118+
* and return that value instead.
119119
*
120120
* @since 1.5.0
121121
* @since 4.4.0 The `$option` parameter was added.
@@ -832,8 +832,8 @@ function get_transient( $transient ) {
832832
*
833833
* The dynamic portion of the hook name, `$transient`, refers to the transient name.
834834
*
835-
* Returning a truthy value from the filter will effectively short-circuit retrieval
836-
* and return the passed value instead.
835+
* Returning a value other than false from the filter will short-circuit retrieval
836+
* and return that value instead.
837837
*
838838
* @since 2.8.0
839839
* @since 4.4.0 The `$transient` parameter was added
@@ -1004,6 +1004,8 @@ function set_transient( $transient, $value, $expiration = 0 ) {
10041004
/**
10051005
* Deletes all expired transients.
10061006
*
1007+
* Note that this function won't do anything if an external object cache is in use.
1008+
*
10071009
* The multi-table delete syntax is used to delete the transient record
10081010
* from table a, and the corresponding transient_timeout record from table b.
10091011
*
@@ -1132,9 +1134,9 @@ function get_user_setting( $name, $default = false ) {
11321134
/**
11331135
* Adds or updates user interface setting.
11341136
*
1135-
* Both $name and $value can contain only ASCII letters, numbers, hyphens, and underscores.
1137+
* Both `$name` and `$value` can contain only ASCII letters, numbers, hyphens, and underscores.
11361138
*
1137-
* This function has to be used before any output has started as it calls setcookie().
1139+
* This function has to be used before any output has started as it calls `setcookie()`.
11381140
*
11391141
* @since 2.8.0
11401142
*
@@ -1159,7 +1161,7 @@ function set_user_setting( $name, $value ) {
11591161
*
11601162
* Deleting settings would reset them to the defaults.
11611163
*
1162-
* This function has to be used before any output has started as it calls setcookie().
1164+
* This function has to be used before any output has started as it calls `setcookie()`.
11631165
*
11641166
* @since 2.7.0
11651167
*
@@ -1389,8 +1391,8 @@ function get_network_option( $network_id, $option, $default = false ) {
13891391
*
13901392
* The dynamic portion of the hook name, `$option`, refers to the option name.
13911393
*
1392-
* Returning a truthy value from the filter will effectively short-circuit retrieval
1393-
* and return the passed value instead.
1394+
* Returning a value other than false from the filter will short-circuit retrieval
1395+
* and return that value instead.
13941396
*
13951397
* @since 2.9.0 As 'pre_site_option_' . $key
13961398
* @since 3.0.0
@@ -1420,7 +1422,7 @@ function get_network_option( $network_id, $option, $default = false ) {
14201422
if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) {
14211423

14221424
/**
1423-
* Filters a specific default network option.
1425+
* Filters the value of a specific default network option.
14241426
*
14251427
* The dynamic portion of the hook name, `$option`, refers to the option name.
14261428
*

0 commit comments

Comments
 (0)