From 890f982250ae2f9b75898d7d8db5ac675adc3124 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Sun, 9 Jul 2023 14:47:22 +0000 Subject: [PATCH] Help/About: Add Help text for Rollback feature. This changeset adds a new Help text for Rollback feature in the WordPress Updates screen. Also adds a link to the "Common Errors" HelpHub documentation page. Follow-up to [51857]. Props costdev, afragen, audrasjb, kebbet, marybaum. Fixes #58199. git-svn-id: https://develop.svn.wordpress.org/trunk@56171 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/update-core.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 3aefbb89ba..ab8294809e 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -1017,11 +1017,30 @@ if ( ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type $help_sidebar_autoupdates = '

' . __( 'Documentation on Auto-updates' ) . '

'; } +$help_sidebar_rollback = ''; + +if ( current_user_can( 'update_themes' ) || current_user_can( 'update_plugins' ) ) { + $rollback_help = '

' . __( 'This feature will create a temporary backup of a plugin or theme before it is upgraded. This backup is used to restore the plugin or theme back to its previous state if there is an error during the update process.' ) . '

'; + + $rollback_help .= '

' . __( 'On systems with fewer resources, this may lead to server timeouts or resource limits being reached. If you encounter an issue during the update process, please create a support forum ticket and reference Rollback in the issue title.' ) . '

'; + + get_current_screen()->add_help_tab( + array( + 'id' => 'rollback-plugins-themes', + 'title' => __( 'Restore Plugin or Theme' ), + 'content' => $rollback_help, + ) + ); + + $help_sidebar_rollback = '

' . __( 'Common Errors' ) . '

'; +} + get_current_screen()->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . '

' . __( 'Documentation on Updating WordPress' ) . '

' . $help_sidebar_autoupdates . - '

' . __( 'Support forums' ) . '

' + '

' . __( 'Support forums' ) . '

' . + $help_sidebar_rollback ); if ( 'upgrade-core' === $action ) { @@ -1033,7 +1052,7 @@ if ( 'upgrade-core' === $action ) { ?>

-

+