Skip to content

Commit 81a12a7

Browse files
committed
Docs: Another pass at some inline docs fixes mostly made by PHPCBF.
See #49572, #50744 git-svn-id: https://develop.svn.wordpress.org/trunk@48590 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1120269 commit 81a12a7

32 files changed

Lines changed: 217 additions & 215 deletions

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ class WP_Upgrader {
7777
* @since 2.8.0
7878
*
7979
* @var array|WP_Error $result {
80-
* @type string $source The full path to the source the files were installed from.
81-
* @type string $source_files List of all the files in the source directory.
82-
* @type string $destination The full path to the installation destination folder.
83-
* @type string $destination_name The name of the destination folder, or empty if `$destination`
84-
* and `$local_destination` are the same.
85-
* @type string $local_destination The full local path to the destination folder. This is usually
86-
* the same as `$destination`.
87-
* @type string $remote_destination The full remote path to the destination folder
88-
* (i.e., from `$wp_filesystem`).
89-
* @type bool $clear_destination Whether the destination folder was cleared.
80+
* @type string $source The full path to the source the files were installed from.
81+
* @type string $source_files List of all the files in the source directory.
82+
* @type string $destination The full path to the installation destination folder.
83+
* @type string $destination_name The name of the destination folder, or empty if `$destination`
84+
* and `$local_destination` are the same.
85+
* @type string $local_destination The full local path to the destination folder. This is usually
86+
* the same as `$destination`.
87+
* @type string $remote_destination The full remote path to the destination folder
88+
* (i.e., from `$wp_filesystem`).
89+
* @type bool $clear_destination Whether the destination folder was cleared.
9090
* }
9191
*/
9292
public $result = array();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5945,7 +5945,7 @@ public function _sanitize_header_textcolor( $color ) {
59455945
*
59465946
* @since 4.7.0
59475947
*
5948-
* @param string $value Repeat value.
5948+
* @param string $value Repeat value.
59495949
* @param WP_Customize_Setting $setting Setting.
59505950
* @return string|WP_Error Background value or validation error.
59515951
*/
@@ -5987,9 +5987,9 @@ public function _sanitize_background_setting( $value, $setting ) {
59875987
*
59885988
* @since 4.7.0
59895989
*
5990-
* @param array $response Response.
5990+
* @param array $response Response.
59915991
* @param WP_Customize_Selective_Refresh $selective_refresh Selective refresh component.
5992-
* @param array $partials Array of partials.
5992+
* @param array $partials Array of partials.
59935993
* @return array
59945994
*/
59955995
public function export_header_video_settings( $response, $selective_refresh, $partials ) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ final public function check_capabilities() {
848848
*
849849
* @param array $root
850850
* @param array $keys
851-
* @param bool $create Default false.
851+
* @param bool $create Default false.
852852
* @return array|void Keys are 'root', 'node', and 'key'.
853853
*/
854854
final protected function multidimensional( &$root, $keys, $create = false ) {

src/wp-includes/class-wp-recovery-mode-email-service.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ public function __construct( WP_Recovery_Mode_Link_Service $link_service ) {
4141
*
4242
* @param int $rate_limit Number of seconds before another email can be sent.
4343
* @param array $error Error details from {@see error_get_last()}
44-
* @param array $extension The extension that caused the error. {
45-
* @type string $slug The extension slug. The plugin or theme's directory.
46-
* @type string $type The extension type. Either 'plugin' or 'theme'.
44+
* @param array $extension {
45+
* The extension that caused the error.
46+
*
47+
* @type string $slug The extension slug. The plugin or theme's directory.
48+
* @type string $type The extension type. Either 'plugin' or 'theme'.
4749
* }
4850
* @return true|WP_Error True if email sent, WP_Error otherwise.
4951
*/

src/wp-includes/class-wp-recovery-mode.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,10 @@ protected function get_link_ttl() {
341341
*
342342
* @param array $error Error that was triggered.
343343
* @return array|false {
344-
* @type string $slug The extension slug. This is the plugin or theme's directory.
345-
* @type string $type The extension type. Either 'plugin' or 'theme'.
344+
* Extension details.
345+
*
346+
* @type string $slug The extension slug. This is the plugin or theme's directory.
347+
* @type string $type The extension type. Either 'plugin' or 'theme'.
346348
* }
347349
*/
348350
protected function get_extension_for_error( $error ) {

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ final class WP_Theme implements ArrayAccess {
181181
*
182182
* @global array $wp_theme_directories
183183
*
184-
* @param string $theme_dir Directory of the theme within the theme_root.
185-
* @param string $theme_root Theme root.
184+
* @param string $theme_dir Directory of the theme within the theme_root.
185+
* @param string $theme_root Theme root.
186186
* @param WP_Theme|null $_child If this theme is a parent theme, the child may be passed for validation purposes.
187187
*/
188188
public function __construct( $theme_dir, $theme_root, $_child = null ) {
@@ -681,7 +681,7 @@ public function parent() {
681681
*
682682
* @since 3.4.0
683683
*
684-
* @param string $key Type of data to store (theme, screenshot, headers, post_templates)
684+
* @param string $key Type of data to store (theme, screenshot, headers, post_templates)
685685
* @param array|string $data Data to store
686686
* @return bool Return value from wp_cache_add()
687687
*/
@@ -773,9 +773,9 @@ public function get( $header ) {
773773
*
774774
* @since 3.4.0
775775
*
776-
* @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
777-
* @param bool $markup Optional. Whether to mark up the header. Defaults to true.
778-
* @param bool $translate Optional. Whether to translate the header. Defaults to true.
776+
* @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
777+
* @param bool $markup Optional. Whether to mark up the header. Defaults to true.
778+
* @param bool $translate Optional. Whether to translate the header. Defaults to true.
779779
* @return string|array|false Processed header. An array for Tags if `$markup` is false, string otherwise.
780780
* False on failure.
781781
*/
@@ -1159,11 +1159,11 @@ public function get_screenshot( $uri = 'uri' ) {
11591159
*
11601160
* @since 3.4.0
11611161
*
1162-
* @param string[]|string $type Optional. Array of extensions to find, string of a single extension,
1163-
* or null for all extensions. Default null.
1164-
* @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth).
1165-
* -1 depth is infinite.
1166-
* @param bool $search_parent Optional. Whether to return parent files. Default false.
1162+
* @param string[]|string $type Optional. Array of extensions to find, string of a single extension,
1163+
* or null for all extensions. Default null.
1164+
* @param int $depth Optional. How deep to search for files. Defaults to a flat scan (0 depth).
1165+
* -1 depth is infinite.
1166+
* @param bool $search_parent Optional. Whether to return parent files. Default false.
11671167
* @return string[] Array of files, keyed by the path to the file relative to the theme's directory, with the values
11681168
* being absolute paths.
11691169
*/
@@ -1387,9 +1387,9 @@ public function load_textdomain() {
13871387
*
13881388
* @since 3.4.0
13891389
*
1390-
* @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site'
1391-
* settings, or 'both'. Defaults to 'both'.
1392-
* @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site.
1390+
* @param string $check Optional. Whether to check only the 'network'-wide settings, the 'site'
1391+
* settings, or 'both'. Defaults to 'both'.
1392+
* @param int $blog_id Optional. Ignored if only network-wide settings are checked. Defaults to current site.
13931393
* @return bool Whether the theme is allowed for the network. Returns true in single-site.
13941394
*/
13951395
public function is_allowed( $check = 'both', $blog_id = null ) {
@@ -1636,8 +1636,8 @@ public static function sort_by_name( &$themes ) {
16361636
*
16371637
* @since 3.4.0
16381638
*
1639-
* @param string $a First name.
1640-
* @param string $b Second name.
1639+
* @param WP_Theme $a First theme.
1640+
* @param WP_Theme $b Second theme.
16411641
* @return int Negative if `$a` falls lower in the natural order than `$b`. Zero if they fall equally.
16421642
* Greater than 0 if `$a` falls higher in the natural order than `$b`. Used with usort().
16431643
*/
@@ -1650,8 +1650,8 @@ private static function _name_sort( $a, $b ) {
16501650
*
16511651
* @since 3.4.0
16521652
*
1653-
* @param string $a First name.
1654-
* @param string $b Second name.
1653+
* @param WP_Theme $a First theme.
1654+
* @param WP_Theme $b Second theme.
16551655
* @return int Negative if `$a` falls lower in the natural order than `$b`. Zero if they fall equally.
16561656
* Greater than 0 if `$a` falls higher in the natural order than `$b`. Used with usort().
16571657
*/

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ public function get( $query_var ) {
680680
* @since 3.5.0
681681
*
682682
* @param string $query_var Query variable key.
683-
* @param mixed $value Query variable value.
683+
* @param mixed $value Query variable value.
684684
*/
685685
public function set( $query_var, $value ) {
686686
$this->query_vars[ $query_var ] = $value;
@@ -880,8 +880,8 @@ public function __unset( $name ) {
880880
*
881881
* @since 4.0.0
882882
*
883-
* @param string $name Method to call.
884-
* @param array $arguments Arguments to pass when calling.
883+
* @param string $name Method to call.
884+
* @param array $arguments Arguments to pass when calling.
885885
* @return mixed Return value of the callback, false otherwise.
886886
*/
887887
public function __call( $name, $arguments ) {

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ class WP_User {
115115
*
116116
* @since 2.0.0
117117
*
118-
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
119-
* @param string $name Optional. User's username
120-
* @param int $site_id Optional Site ID, defaults to current site.
118+
* @param int|string|stdClass|WP_User $id User's ID, a WP_User object, or a user object from the DB.
119+
* @param string $name Optional. User's username
120+
* @param int $site_id Optional Site ID, defaults to current site.
121121
*/
122122
public function __construct( $id = 0, $name = '', $site_id = '' ) {
123123
if ( ! isset( self::$back_compat_keys ) ) {
@@ -181,7 +181,7 @@ public function init( $data, $site_id = '' ) {
181181
*
182182
* @global wpdb $wpdb WordPress database abstraction object.
183183
*
184-
* @param string $field The field to query against: 'id', 'ID', 'slug', 'email' or 'login'.
184+
* @param string $field The field to query against: 'id', 'ID', 'slug', 'email' or 'login'.
185185
* @param string|int $value The field value
186186
* @return object|false Raw user object
187187
*/
@@ -439,8 +439,8 @@ public function to_array() {
439439
*
440440
* @since 4.3.0
441441
*
442-
* @param string $name Method to call.
443-
* @param array $arguments Arguments to pass when calling.
442+
* @param string $name Method to call.
443+
* @param array $arguments Arguments to pass when calling.
444444
* @return mixed|false Return value of the callback, false otherwise.
445445
*/
446446
public function __call( $name, $arguments ) {
@@ -637,7 +637,7 @@ public function set_role( $role ) {
637637
*
638638
* @since 2.0.0
639639
*
640-
* @param int $max Max level of user.
640+
* @param int $max Max level of user.
641641
* @param string $item Level capability name.
642642
* @return int Max Level.
643643
*/
@@ -672,8 +672,8 @@ public function update_user_level_from_caps() {
672672
*
673673
* @since 2.0.0
674674
*
675-
* @param string $cap Capability name.
676-
* @param bool $grant Whether to grant capability to user.
675+
* @param string $cap Capability name.
676+
* @param bool $grant Whether to grant capability to user.
677677
*/
678678
public function add_cap( $cap, $grant = true ) {
679679
$this->caps[ $cap ] = $grant;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public function get_number_of_root_elements( $elements ) {
425425
* @since 2.7.0
426426
*
427427
* @param object $e
428-
* @param array $children_elements
428+
* @param array $children_elements
429429
*/
430430
public function unset_children( $e, &$children_elements ) {
431431
if ( ! $e || ! $children_elements ) {

src/wp-includes/class-wp-xmlrpc-server.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ public function __construct() {
171171
*
172172
* @since 4.0.0
173173
*
174-
* @param string $name Method to call.
175-
* @param array $arguments Arguments to pass when calling.
174+
* @param string $name Method to call.
175+
* @param array $arguments Arguments to pass when calling.
176176
* @return array|IXR_Error|false Return value of the callback, false otherwise.
177177
*/
178178
public function __call( $name, $arguments ) {
@@ -369,8 +369,8 @@ public function get_custom_fields( $post_id ) {
369369
*
370370
* @since 2.5.0
371371
*
372-
* @param int $post_id Post ID.
373-
* @param array $fields Custom fields.
372+
* @param int $post_id Post ID.
373+
* @param array $fields Custom fields.
374374
*/
375375
public function set_custom_fields( $post_id, $fields ) {
376376
$post_id = (int) $post_id;
@@ -436,8 +436,8 @@ public function get_term_custom_fields( $term_id ) {
436436
*
437437
* @since 4.9.0
438438
*
439-
* @param int $term_id Term ID.
440-
* @param array $fields Custom fields.
439+
* @param int $term_id Term ID.
440+
* @param array $fields Custom fields.
441441
*/
442442
public function set_term_custom_fields( $term_id, $fields ) {
443443
$term_id = (int) $term_id;
@@ -744,7 +744,7 @@ protected function minimum_args( $args, $count ) {
744744
* Prepares taxonomy data for return in an XML-RPC object.
745745
*
746746
* @param object $taxonomy The unprepared taxonomy data.
747-
* @param array $fields The subset of taxonomy fields to return.
747+
* @param array $fields The subset of taxonomy fields to return.
748748
* @return array The prepared taxonomy data.
749749
*/
750750
protected function _prepare_taxonomy( $taxonomy, $fields ) {
@@ -5603,7 +5603,7 @@ public function add_enclosure_if_new( $post_ID, $enclosure ) {
56035603
*
56045604
* @global wpdb $wpdb WordPress database abstraction object.
56055605
*
5606-
* @param int $post_ID Post ID.
5606+
* @param int $post_ID Post ID.
56075607
* @param string $post_content Post Content for attachment.
56085608
*/
56095609
public function attach_uploads( $post_ID, $post_content ) {

0 commit comments

Comments
 (0)