From c7f03167a7a16fe93a84be8bd1f8b005f8256bc2 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 19 Jun 2020 22:15:36 +0000 Subject: [PATCH] Docs: Corrections and improvements to inline docs related to plugin and theme auto-updates. See #50052, #49572 git-svn-id: https://develop.svn.wordpress.org/trunk@48097 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-automatic-updater.php | 12 ++++++------ src/wp-admin/includes/update.php | 10 +++++----- src/wp-admin/themes.php | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php index 77a4149406..dee1490dfd 100644 --- a/src/wp-admin/includes/class-wp-automatic-updater.php +++ b/src/wp-admin/includes/class-wp-automatic-updater.php @@ -870,7 +870,7 @@ class WP_Automatic_Updater { * * @since 5.5.0 * - * @param object $results The result of updates tasks. + * @param array $update_results The result of updates tasks. */ protected function after_plugin_theme_update( $update_results ) { $successful_updates = array(); @@ -932,7 +932,7 @@ class WP_Automatic_Updater { * * @since 5.5.0 * - * @param string $type The type of email to send. Can be one of 'success', 'failure', 'mixed'. + * @param string $type The type of email to send. Can be one of 'success', 'fail', 'mixed'. * @param array $successful_updates A list of updates that succeeded. * @param array $failed_updates A list of updates that failed. */ @@ -1024,11 +1024,11 @@ class WP_Automatic_Updater { $email = compact( 'to', 'subject', 'body', 'headers' ); /** - * Filters the email sent following an automatic background plugin update. + * Filters the email sent following an automatic background update for plugins and themes. * * @since 5.5.0 * - * @param array $email { + * @param array $email { * Array of email arguments that will be passed to wp_mail(). * * @type string $to The email recipient. An array of emails @@ -1039,8 +1039,8 @@ class WP_Automatic_Updater { * } * @param string $type The type of email being sent. Can be one of * 'success', 'fail', 'mixed'. - * @param object $successful_updates The updates that succeeded. - * @param object $failed_updates The updates that failed. + * @param array $successful_updates The updates that succeeded. + * @param array $failed_updates The updates that failed. */ $email = apply_filters( 'auto_plugin_theme_update_email', $email, $type, $successful_updates, $failed_updates ); diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 6990542072..29d5261212 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -944,14 +944,14 @@ function wp_recovery_mode_nag() { * * @since 5.5.0 * - * @param string $type The type of update being checked: 'theme' or 'plugin'. + * @param string $type The type of update being checked: 'theme' or 'plugin'. * @return bool True if auto-updates are enabled for `$type`, false otherwise. */ function wp_is_auto_update_enabled_for_type( $type ) { switch ( $type ) { case 'plugin': /** - * Filters whether plugins manual auto-update is enabled. + * Filters whether plugins auto-update is enabled. * * @since 5.5.0 * @@ -960,11 +960,11 @@ function wp_is_auto_update_enabled_for_type( $type ) { return apply_filters( 'plugins_auto_update_enabled', true ); case 'theme': /** - * Filters whether plugins manual auto-update is enabled. + * Filters whether themes auto-update is enabled. * * @since 5.5.0 * - * @param bool True if themes auto-update is enabled, false otherwise. + * @param bool $enabled True if themes auto-update is enabled, false otherwise. */ return apply_filters( 'themes_auto_update_enabled', true ); } @@ -973,7 +973,7 @@ function wp_is_auto_update_enabled_for_type( $type ) { } /** - * Determines the appropriate update message to be displayed. + * Determines the appropriate auto-update message to be displayed. * * @since 5.5.0 * diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index 2a41dbd054..c1e5618bab 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -556,7 +556,7 @@ if ( ! is_multisite() && $broken_themes ) { * * @since 5.5.0 * - * @return string Template + * @return string The template for displaying the auto-update setting link. */ function wp_theme_auto_update_setting_template() { $template = '