From bea55db921f11b85ba205570fba71e266e44f821 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 5 Oct 2020 13:44:11 +0000 Subject: [PATCH] Docs: Add missing `@return` tag to `Language_Pack_Upgrader::check_package()`. Synchronize documentation of the `::check_package()` method between `Plugin_Upgrader`, `Theme_Upgrader`, and `Language_Pack_Upgrader`. Props ankitmaru, mukesh27, desrosj. Fixes #51448. Built from https://develop.svn.wordpress.org/trunk@49091 git-svn-id: http://core.svn.wordpress.org/trunk@48853 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-language-pack-upgrader.php | 9 +++++---- wp-admin/includes/class-plugin-upgrader.php | 8 +++----- wp-admin/includes/class-theme-upgrader.php | 8 +++----- wp-includes/version.php | 2 +- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/wp-admin/includes/class-language-pack-upgrader.php b/wp-admin/includes/class-language-pack-upgrader.php index e88db55848..2ac6e76329 100644 --- a/wp-admin/includes/class-language-pack-upgrader.php +++ b/wp-admin/includes/class-language-pack-upgrader.php @@ -309,17 +309,18 @@ class Language_Pack_Upgrader extends WP_Upgrader { } /** - * Check the package source to make sure there are .mo and .po files. + * Checks that the package source contains .mo and .po files. * * Hooked to the {@see 'upgrader_source_selection'} filter by * Language_Pack_Upgrader::bulk_upgrade(). * * @since 3.7.0 * - * @global WP_Filesystem_Base $wp_filesystem Subclass + * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * - * @param string|WP_Error $source - * @param string $remote_source + * @param string|WP_Error $source The path to the downloaded package source. + * @param string $remote_source Remote file source location. + * @return string|WP_Error The source as passed, or a WP_Error object on failure. */ public function check_package( $source, $remote_source ) { global $wp_filesystem; diff --git a/wp-admin/includes/class-plugin-upgrader.php b/wp-admin/includes/class-plugin-upgrader.php index c750399277..b171f9228b 100644 --- a/wp-admin/includes/class-plugin-upgrader.php +++ b/wp-admin/includes/class-plugin-upgrader.php @@ -398,10 +398,9 @@ class Plugin_Upgrader extends WP_Upgrader { } /** - * Check a source package to be sure it contains a plugin. + * Checks that the source package contains a valid plugin. * - * This function is added to the {@see 'upgrader_source_selection'} filter by - * Plugin_Upgrader::install(). + * Hooked to the {@see 'upgrader_source_selection'} filter by Plugin_Upgrader::install(). * * @since 3.3.0 * @@ -409,8 +408,7 @@ class Plugin_Upgrader extends WP_Upgrader { * @global string $wp_version The WordPress version string. * * @param string $source The path to the downloaded package source. - * @return string|WP_Error The source as passed, or a WP_Error object - * if no plugins were found. + * @return string|WP_Error The source as passed, or a WP_Error object on failure. */ public function check_package( $source ) { global $wp_filesystem, $wp_version; diff --git a/wp-admin/includes/class-theme-upgrader.php b/wp-admin/includes/class-theme-upgrader.php index 3c8f2d9abf..229a8115bd 100644 --- a/wp-admin/includes/class-theme-upgrader.php +++ b/wp-admin/includes/class-theme-upgrader.php @@ -510,19 +510,17 @@ class Theme_Upgrader extends WP_Upgrader { } /** - * Check that the package source contains a valid theme. + * Checks that the package source contains a valid theme. * * Hooked to the {@see 'upgrader_source_selection'} filter by Theme_Upgrader::install(). - * It will return an error if the theme doesn't have style.css or index.php - * files. * * @since 3.3.0 * * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. * @global string $wp_version The WordPress version string. * - * @param string $source The full path to the package source. - * @return string|WP_Error The source or a WP_Error. + * @param string $source The path to the downloaded package source. + * @return string|WP_Error The source as passed, or a WP_Error object on failure. */ public function check_package( $source ) { global $wp_filesystem, $wp_version; diff --git a/wp-includes/version.php b/wp-includes/version.php index 8d11ea92b5..ac5a8c9b27 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49090'; +$wp_version = '5.6-alpha-49091'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.