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
This commit is contained in:
parent
44def76306
commit
c7f03167a7
@ -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 );
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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 = '
|
||||
|
Loading…
Reference in New Issue
Block a user