Skip to content

Commit 2ae6561

Browse files
committed
Docs: Miscellaneous improvements and corrections to inline documentation.
See #64224 git-svn-id: https://develop.svn.wordpress.org/trunk@61387 602fd350-edb4-49c9-b593-d223f7449a82
1 parent bd48357 commit 2ae6561

20 files changed

+49
-45
lines changed

src/wp-admin/includes/class-wp-upgrader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ public function install_package( $args = array() ) {
590590
* Filters the source file location for the upgrade package.
591591
*
592592
* @since 2.8.0
593-
* @since 4.4.0 The $hook_extra parameter became available.
593+
* @since 4.4.0 The `$hook_extra` parameter became available.
594594
*
595595
* @param string $source File source location.
596596
* @param string $remote_source Remote file source location.

src/wp-admin/includes/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,7 @@ function _admin_notice_post_locked() {
18941894
* Fires inside the post locked dialog before the buttons are displayed.
18951895
*
18961896
* @since 3.6.0
1897-
* @since 5.4.0 The $user parameter was added.
1897+
* @since 5.4.0 The `$user` parameter was added.
18981898
*
18991899
* @param WP_Post $post Post object.
19001900
* @param WP_User $user The user with the lock for the post.

src/wp-includes/class-wp-customize-setting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public function value() {
765765
* functions for available hooks.
766766
*
767767
* @since 3.4.0
768-
* @since 4.6.0 Added the `$this` setting instance as the second parameter.
768+
* @since 4.6.0 Added the `$setting` instance as the second parameter.
769769
*
770770
* @param mixed $default_value The setting default value. Default empty.
771771
* @param WP_Customize_Setting $setting The setting instance.

src/wp-includes/class-wp-image-editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public function set_quality( $quality = null, $dims = array() ) {
255255
* The WP_Image_Editor::set_quality() method has priority over the filter.
256256
*
257257
* @since 3.5.0
258-
* @since 6.8.0 Added the size parameter.
258+
* @since 6.8.0 Added the `$size` parameter.
259259
*
260260
* @param int $quality Quality level between 1 (low) and 100 (high).
261261
* @param string $mime_type Image mime type.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,8 +1900,8 @@ public function get_posts() {
19001900
* Fires after the query variable object is created, but before the actual query is run.
19011901
*
19021902
* Note: If using conditional tags, use the method versions within the passed instance
1903-
* (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions
1904-
* like is_main_query() test against the global $wp_query instance, not the passed one.
1903+
* (e.g. `$query->is_main_query()` instead of `is_main_query()`). This is because the functions
1904+
* like `is_main_query()` test against the global `$wp_query` instance, not the passed one.
19051905
*
19061906
* @since 2.0.0
19071907
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ public function query() {
851851
* Filters SELECT FOUND_ROWS() query for the current WP_User_Query instance.
852852
*
853853
* @since 3.2.0
854-
* @since 5.1.0 Added the `$this` parameter.
854+
* @since 5.1.0 Added the `$query` parameter.
855855
*
856856
* @global wpdb $wpdb WordPress database abstraction object.
857857
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ public function set_role( $role ) {
654654
* Fires after the user's role has changed.
655655
*
656656
* @since 2.9.0
657-
* @since 3.6.0 Added $old_roles to include an array of the user's previous roles.
657+
* @since 3.6.0 Added `$old_roles` to include an array of the user's previous roles.
658658
*
659659
* @param int $user_id The user ID.
660660
* @param string $role The new role.

src/wp-includes/comment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ function wp_set_comment_cookies( $comment, $user, $cookies_consent = true ) {
598598
* Filters the lifetime of the comment cookie in seconds.
599599
*
600600
* @since 2.8.0
601-
* @since 6.6.0 The default $seconds value changed from 30000000 to YEAR_IN_SECONDS.
601+
* @since 6.6.0 The default `$seconds` value changed from 30000000 to YEAR_IN_SECONDS.
602602
*
603603
* @param int $seconds Comment cookie lifetime. Default YEAR_IN_SECONDS.
604604
*/

src/wp-includes/cron.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array(), $wp_error
7474
* Return true if the event was scheduled, false or a WP_Error if not.
7575
*
7676
* @since 5.1.0
77-
* @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned.
77+
* @since 5.7.0 The `$wp_error` parameter was added, and a WP_Error object can now be returned.
7878
*
7979
* @param null|bool|WP_Error $result The value to return instead. Default null to continue adding the event.
8080
* @param object $event {
@@ -385,7 +385,7 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array(), $
385385
* rescheduled, false or a WP_Error if not.
386386
*
387387
* @since 5.1.0
388-
* @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned.
388+
* @since 5.7.0 The `$wp_error` parameter was added, and a WP_Error object can now be returned.
389389
*
390390
* @param null|bool|WP_Error $pre Value to return instead. Default null to continue adding the event.
391391
* @param object $event {
@@ -482,7 +482,7 @@ function wp_unschedule_event( $timestamp, $hook, $args = array(), $wp_error = fa
482482
* unscheduled, false or a WP_Error if not.
483483
*
484484
* @since 5.1.0
485-
* @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned.
485+
* @since 5.7.0 The `$wp_error` parameter was added, and a WP_Error object can now be returned.
486486
*
487487
* @param null|bool|WP_Error $pre Value to return instead. Default null to continue unscheduling the event.
488488
* @param int $timestamp Unix timestamp (UTC) for when to run the event.
@@ -573,7 +573,7 @@ function wp_clear_scheduled_hook( $hook, $args = array(), $wp_error = false ) {
573573
* or a WP_Error if unscheduling one or more events fails.
574574
*
575575
* @since 5.1.0
576-
* @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned.
576+
* @since 5.7.0 The `$wp_error` parameter was added, and a WP_Error object can now be returned.
577577
*
578578
* @param null|int|false|WP_Error $pre Value to return instead. Default null to continue unscheduling the event.
579579
* @param string $hook Action hook, the execution of which will be unscheduled.
@@ -664,7 +664,7 @@ function wp_unschedule_hook( $hook, $wp_error = false ) {
664664
* on the value of the `$wp_error` parameter.
665665
*
666666
* @since 5.1.0
667-
* @since 5.7.0 The `$wp_error` parameter was added, and a `WP_Error` object can now be returned.
667+
* @since 5.7.0 The `$wp_error` parameter was added, and a WP_Error object can now be returned.
668668
*
669669
* @param null|int|false|WP_Error $pre Value to return instead. Default null to continue unscheduling the hook.
670670
* @param string $hook Action hook, the execution of which will be unscheduled.
@@ -853,6 +853,7 @@ function wp_next_scheduled( $hook, $args = array() ) {
853853
* @type int $interval Optional. The interval time in seconds for the schedule. Only
854854
* present for recurring events.
855855
* }
856+
* @param string $hook Action hook of the event.
856857
* @param array $args Array containing each separate argument to pass to the hook
857858
* callback function.
858859
*/

src/wp-includes/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3300,7 +3300,7 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
33003300
* Filters the "real" file type of the given file.
33013301
*
33023302
* @since 3.0.0
3303-
* @since 5.1.0 The $real_mime parameter was added.
3303+
* @since 5.1.0 The `$real_mime` parameter was added.
33043304
*
33053305
* @param array $wp_check_filetype_and_ext {
33063306
* Values for the extension, mime type, and corrected filename.
@@ -3610,7 +3610,7 @@ function wp_get_ext_types() {
36103610
*/
36113611
function wp_filesize( $path ) {
36123612
/**
3613-
* Filters the result of wp_filesize before the PHP function is run.
3613+
* Filters the result of wp_filesize() before the file_exists() PHP function is run.
36143614
*
36153615
* @since 6.0.0
36163616
*
@@ -6023,7 +6023,7 @@ function _doing_it_wrong( $function_name, $message, $version ) {
60236023
* Filters whether to trigger an error for _doing_it_wrong() calls.
60246024
*
60256025
* @since 3.1.0
6026-
* @since 5.1.0 Added the $function_name, $message and $version parameters.
6026+
* @since 5.1.0 Added the `$function_name`, `$message`, and `$version` parameters.
60276027
*
60286028
* @param bool $trigger Whether to trigger the error for _doing_it_wrong() calls. Default true.
60296029
* @param string $function_name The function that was called.

0 commit comments

Comments
 (0)