Skip to content

Commit fc96319

Browse files
committed
Docs: Various improvements to inline documentation.
See #62281 git-svn-id: https://develop.svn.wordpress.org/trunk@59861 602fd350-edb4-49c9-b593-d223f7449a82
1 parent de302c6 commit fc96319

File tree

8 files changed

+45
-46
lines changed

8 files changed

+45
-46
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ public function clear_destination( $remote_destination ) {
486486
* @since 6.2.0 Use move_dir() instead of copy_dir() when possible.
487487
*
488488
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
489-
* @global array $wp_theme_directories
489+
* @global string[] $wp_theme_directories
490490
*
491491
* @param array|string $args {
492492
* Optional. Array or string of arguments for installing a package. Default empty array.

src/wp-admin/includes/update-core.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*
1919
* @since 2.7.0
2020
*
21-
* @global array $_old_files
22-
* @var array
21+
* @global string[] $_old_files
22+
* @var string[]
2323
* @name $_old_files
2424
*/
2525
global $_old_files;
@@ -840,8 +840,8 @@
840840
*
841841
* @since 6.2.0
842842
*
843-
* @global array $_old_requests_files
844-
* @var array
843+
* @global string[] $_old_requests_files
844+
* @var string[]
845845
* @name $_old_requests_files
846846
*/
847847
global $_old_requests_files;
@@ -937,8 +937,8 @@
937937
* upgrade. New themes are now installed again. To disable new
938938
* themes from being installed on upgrade, explicitly define
939939
* CORE_UPGRADE_SKIP_NEW_BUNDLED as true.
940-
* @global array $_new_bundled_files
941-
* @var array
940+
* @global string[] $_new_bundled_files
941+
* @var string[]
942942
* @name $_new_bundled_files
943943
*/
944944
global $_new_bundled_files;
@@ -977,13 +977,14 @@
977977
*
978978
* The steps for the upgrader for after the new release is downloaded and
979979
* unzipped is:
980+
*
980981
* 1. Test unzipped location for select files to ensure that unzipped worked.
981982
* 2. Create the .maintenance file in current WordPress base.
982983
* 3. Copy new WordPress directory over old WordPress files.
983984
* 4. Upgrade WordPress to new version.
984-
* 4.1. Copy all files/folders other than wp-content
985-
* 4.2. Copy any language files to WP_LANG_DIR (which may differ from WP_CONTENT_DIR
986-
* 4.3. Copy any new bundled themes/plugins to their respective locations
985+
* 1. Copy all files/folders other than wp-content
986+
* 2. Copy any language files to `WP_LANG_DIR` (which may differ from `WP_CONTENT_DIR`
987+
* 3. Copy any new bundled themes/plugins to their respective locations
987988
* 5. Delete new WordPress directory path.
988989
* 6. Delete .maintenance file.
989990
* 7. Remove old files.
@@ -1005,9 +1006,9 @@
10051006
* @since 2.7.0
10061007
*
10071008
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
1008-
* @global array $_old_files
1009-
* @global array $_old_requests_files
1010-
* @global array $_new_bundled_files
1009+
* @global string[] $_old_files
1010+
* @global string[] $_old_requests_files
1011+
* @global string[] $_new_bundled_files
10111012
* @global wpdb $wpdb WordPress database abstraction object.
10121013
*
10131014
* @param string $from New release unzipped path.
@@ -1603,7 +1604,7 @@ function update_core( $from, $to ) {
16031604
*
16041605
* @since 6.2.0
16051606
*
1606-
* @global array $_old_requests_files Requests files to be preloaded.
1607+
* @global string[] $_old_requests_files Requests files to be preloaded.
16071608
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
16081609
* @global string $wp_version The WordPress version string.
16091610
*
@@ -1715,7 +1716,7 @@ function _redirect_to_about_wordpress( $new_version ) {
17151716
*
17161717
* @since 4.2.2
17171718
*
1718-
* @global array $wp_theme_directories
1719+
* @global string[] $wp_theme_directories
17191720
* @global WP_Filesystem_Base $wp_filesystem
17201721
*/
17211722
function _upgrade_422_remove_genericons() {
@@ -1761,7 +1762,7 @@ function _upgrade_422_remove_genericons() {
17611762
* @since 4.2.2
17621763
*
17631764
* @param string $directory Directory path. Expects trailingslashed.
1764-
* @return array
1765+
* @return string[]
17651766
*/
17661767
function _upgrade_422_find_genericons_files_in_folder( $directory ) {
17671768
$directory = trailingslashit( $directory );

src/wp-admin/includes/update.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ function update_right_now_message() {
401401
*
402402
* @since 2.9.0
403403
*
404-
* @return array
404+
* @return object[]
405405
*/
406406
function get_plugin_updates() {
407407
$all_plugins = get_plugins();
@@ -624,7 +624,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
624624
*
625625
* @since 2.9.0
626626
*
627-
* @return array
627+
* @return WP_Theme[]
628628
*/
629629
function get_theme_updates() {
630630
$current = get_site_transient( 'update_themes' );

src/wp-admin/includes/upgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2860,7 +2860,7 @@ function deslash( $content ) {
28602860
* semicolons. Default empty string.
28612861
* @param bool $execute Optional. Whether or not to execute the query right away.
28622862
* Default true.
2863-
* @return array Strings containing the results of the various update queries.
2863+
* @return string[] Strings containing the results of the various update queries.
28642864
*/
28652865
function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
28662866
global $wpdb;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ protected function get_link_ttl() {
338338
*
339339
* @since 5.2.0
340340
*
341-
* @global array $wp_theme_directories
341+
* @global string[] $wp_theme_directories
342342
*
343343
* @param array $error Error details from `error_get_last()`.
344344
* @return array|false {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ final class WP_Theme implements ArrayAccess {
242242
*
243243
* @since 3.4.0
244244
*
245-
* @global array $wp_theme_directories
245+
* @global string[] $wp_theme_directories
246246
*
247247
* @param string $theme_dir Directory of the theme within the theme_root.
248248
* @param string $theme_root Theme root.

src/wp-includes/theme.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* @since 3.4.0
1616
*
17-
* @global array $wp_theme_directories
17+
* @global string[] $wp_theme_directories
1818
*
1919
* @param array $args {
2020
* Optional. The search arguments.
@@ -105,7 +105,7 @@ function wp_get_themes( $args = array() ) {
105105
*
106106
* @since 3.4.0
107107
*
108-
* @global array $wp_theme_directories
108+
* @global string[] $wp_theme_directories
109109
*
110110
* @param string $stylesheet Optional. Directory name for the theme. Defaults to active theme.
111111
* @param string $theme_root Optional. Absolute path of the theme root to look in.
@@ -380,7 +380,7 @@ function get_template_directory_uri() {
380380
*
381381
* @since 2.9.0
382382
*
383-
* @global array $wp_theme_directories
383+
* @global string[] $wp_theme_directories
384384
*
385385
* @return array|string An array of theme roots keyed by template/stylesheet
386386
* or a single theme root if all themes have the same root.
@@ -405,7 +405,7 @@ function get_theme_roots() {
405405
*
406406
* @since 2.9.0
407407
*
408-
* @global array $wp_theme_directories
408+
* @global string[] $wp_theme_directories
409409
*
410410
* @param string $directory Either the full filesystem path to a theme folder
411411
* or a folder within WP_CONTENT_DIR.
@@ -441,7 +441,7 @@ function register_theme_directory( $directory ) {
441441
*
442442
* @since 2.9.0
443443
*
444-
* @global array $wp_theme_directories
444+
* @global string[] $wp_theme_directories
445445
*
446446
* @param bool $force Optional. Whether to force a new directory scan. Default false.
447447
* @return array|false Valid themes found on success, false on failure.
@@ -591,7 +591,7 @@ function search_theme_directories( $force = false ) {
591591
*
592592
* @since 1.5.0
593593
*
594-
* @global array $wp_theme_directories
594+
* @global string[] $wp_theme_directories
595595
*
596596
* @param string $stylesheet_or_template Optional. The stylesheet or template name of the theme.
597597
* Default is to leverage the main theme root.
@@ -636,7 +636,7 @@ function get_theme_root( $stylesheet_or_template = '' ) {
636636
*
637637
* @since 1.5.0
638638
*
639-
* @global array $wp_theme_directories
639+
* @global string[] $wp_theme_directories
640640
*
641641
* @param string $stylesheet_or_template Optional. The stylesheet or template name of the theme.
642642
* Default is to leverage the main theme root.
@@ -687,7 +687,7 @@ function get_theme_root_uri( $stylesheet_or_template = '', $theme_root = '' ) {
687687
*
688688
* @since 3.1.0
689689
*
690-
* @global array $wp_theme_directories
690+
* @global string[] $wp_theme_directories
691691
*
692692
* @param string $stylesheet_or_template The stylesheet or template name of the theme.
693693
* @param bool $skip_cache Optional. Whether to skip the cache.
@@ -750,7 +750,7 @@ function locale_stylesheet() {
750750
*
751751
* @since 2.5.0
752752
*
753-
* @global array $wp_theme_directories
753+
* @global string[] $wp_theme_directories
754754
* @global WP_Customize_Manager $wp_customize
755755
* @global array $sidebars_widgets
756756
* @global array $wp_registered_sidebars

src/wp-includes/update.php

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -488,19 +488,19 @@ function wp_update_plugins( $extra_stats = array() ) {
488488
* @param array|false $update {
489489
* The plugin update data with the latest details. Default false.
490490
*
491-
* @type string $id Optional. ID of the plugin for update purposes, should be a URI
492-
* specified in the `Update URI` header field.
493-
* @type string $slug Slug of the plugin.
494-
* @type string $version The version of the plugin.
495-
* @type string $url The URL for details of the plugin.
496-
* @type string $package Optional. The update ZIP for the plugin.
497-
* @type string $tested Optional. The version of WordPress the plugin is tested against.
498-
* @type string $requires_php Optional. The version of PHP which the plugin requires.
499-
* @type bool $autoupdate Optional. Whether the plugin should automatically update.
500-
* @type array $icons Optional. Array of plugin icons.
501-
* @type array $banners Optional. Array of plugin banners.
502-
* @type array $banners_rtl Optional. Array of plugin RTL banners.
503-
* @type array $translations {
491+
* @type string $id Optional. ID of the plugin for update purposes, should be a URI
492+
* specified in the `Update URI` header field.
493+
* @type string $slug Slug of the plugin.
494+
* @type string $version The version of the plugin.
495+
* @type string $url The URL for details of the plugin.
496+
* @type string $package Optional. The update ZIP for the plugin.
497+
* @type string $tested Optional. The version of WordPress the plugin is tested against.
498+
* @type string $requires_php Optional. The version of PHP which the plugin requires.
499+
* @type bool $autoupdate Optional. Whether the plugin should automatically update.
500+
* @type string[] $icons Optional. Array of plugin icons.
501+
* @type string[] $banners Optional. Array of plugin banners.
502+
* @type string[] $banners_rtl Optional. Array of plugin RTL banners.
503+
* @type array $translations {
504504
* Optional. List of translation updates for the plugin.
505505
*
506506
* @type string $language The language the translation update is for.
@@ -974,7 +974,7 @@ function wp_get_update_data() {
974974
* @param array $update_data {
975975
* Fetched update data.
976976
*
977-
* @type array $counts An array of counts for available plugin, theme, and WordPress updates.
977+
* @type int[] $counts An array of counts for available plugin, theme, and WordPress updates.
978978
* @type string $update_title Titles of available updates.
979979
* }
980980
* @param array $titles An array of update counts and UI strings for available updates.
@@ -986,8 +986,6 @@ function wp_get_update_data() {
986986
* Determines whether core should be updated.
987987
*
988988
* @since 2.8.0
989-
*
990-
* @global string $wp_version The WordPress version string.
991989
*/
992990
function _maybe_update_core() {
993991
$current = get_site_transient( 'update_core' );

0 commit comments

Comments
 (0)