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
This commit is contained in:
parent
1651342d2b
commit
bea55db921
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue