Docs: In various @return tags, list the expected type first, instead of WP_Error.
See #48303. Built from https://develop.svn.wordpress.org/trunk@46696 git-svn-id: http://core.svn.wordpress.org/trunk@46496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -450,7 +450,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
* @param string $local_destination
|
||||
* @param string $remote_destination
|
||||
* @param array $plugin
|
||||
* @return WP_Error|bool
|
||||
* @return bool|WP_Error
|
||||
*/
|
||||
public function delete_old_plugin( $removed, $local_destination, $remote_destination, $plugin ) {
|
||||
global $wp_filesystem;
|
||||
|
||||
@@ -76,7 +76,7 @@ class WP_Upgrader {
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @var WP_Error|array $result {
|
||||
* @var array|WP_Error $result {
|
||||
* @type string $source The full path to the source the files were installed from.
|
||||
* @type string $source_files List of all the files in the source directory.
|
||||
* @type string $destination The full path to the installation destination folder.
|
||||
|
||||
@@ -2086,7 +2086,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
|
||||
* @param string[] $types Types of connections.
|
||||
* @param array $credentials Credentials to connect with.
|
||||
* @param string $type Chosen filesystem method.
|
||||
* @param WP_Error|bool $error Error object or status.
|
||||
* @param bool|WP_Error $error Error object or status.
|
||||
* @param string $context Full path to the directory that is tested for being writable.
|
||||
*/
|
||||
$types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context );
|
||||
|
||||
@@ -613,7 +613,7 @@ function is_network_only_plugin( $plugin ) {
|
||||
* @param bool $network_wide Optional. Whether to enable the plugin for all sites in the network
|
||||
* or just the current site. Multisite only. Default false.
|
||||
* @param bool $silent Optional. Whether to prevent calling activation hooks. Default false.
|
||||
* @return WP_Error|null WP_Error on invalid file or null on success.
|
||||
* @return null|WP_Error WP_Error on invalid file or null on success.
|
||||
*/
|
||||
function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) {
|
||||
$plugin = plugin_basename( trim( $plugin ) );
|
||||
@@ -1071,7 +1071,7 @@ function validate_active_plugins() {
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string $plugin Path to the plugin file relative to the plugins directory.
|
||||
* @return WP_Error|int 0 on success, WP_Error on failure.
|
||||
* @return int|WP_Error 0 on success, WP_Error on failure.
|
||||
*/
|
||||
function validate_plugin( $plugin ) {
|
||||
if ( validate_file( $plugin ) ) {
|
||||
|
||||
@@ -880,7 +880,7 @@ $_new_bundled_files = array(
|
||||
*
|
||||
* @param string $from New release unzipped path.
|
||||
* @param string $to Path to old WordPress installation.
|
||||
* @return WP_Error|null WP_Error on failure, null on success.
|
||||
* @return null|WP_Error WP_Error on failure, null on success.
|
||||
*/
|
||||
function update_core( $from, $to ) {
|
||||
global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb;
|
||||
@@ -1314,7 +1314,7 @@ function update_core( $from, $to ) {
|
||||
* @param string $from Source directory.
|
||||
* @param string $to Destination directory.
|
||||
* @param string[] $skip_list Array of files/folders to skip copying.
|
||||
* @return WP_Error|true WP_Error on failure, true on success.
|
||||
* @return true|WP_Error WP_Error on failure, true on success.
|
||||
*/
|
||||
function _copy_dir( $from, $to, $skip_list = array() ) {
|
||||
global $wp_filesystem;
|
||||
|
||||
Reference in New Issue
Block a user