From f22f958bb5a7468cafcef9cbe8c92998931c4404 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Sun, 9 Jul 2023 14:49: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. Built from https://develop.svn.wordpress.org/trunk@56171 git-svn-id: http://core.svn.wordpress.org/trunk@55683 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/update-core.php | 23 +++++++++++++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index 3aefbb89ba..ab8294809e 100644 --- a/wp-admin/update-core.php +++ b/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 ) { ?>

-

+