From 82cfc3f62dcb96a83c602c00770d0b216ed7277f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 19 Jun 2020 21:12:34 +0000 Subject: [PATCH] Help/About: Move "Learn more: Auto-updates documentation" link about "Support", for consistency with other screens. Follow-up to [48062]. See #50215. git-svn-id: https://develop.svn.wordpress.org/trunk@48095 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/network/themes.php | 5 +++-- src/wp-admin/plugins.php | 5 +++-- src/wp-admin/themes.php | 7 ++++--- src/wp-admin/update-core.php | 5 +++-- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/network/themes.php b/src/wp-admin/network/themes.php index 2236f1ca92..730ab906b1 100644 --- a/src/wp-admin/network/themes.php +++ b/src/wp-admin/network/themes.php @@ -303,6 +303,7 @@ get_current_screen()->add_help_tab( ); $help_sidebar_autoupdates = ''; + if ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( 'theme' ) ) { get_current_screen()->add_help_tab( array( @@ -320,8 +321,8 @@ if ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( get_current_screen()->set_help_sidebar( '

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

' . '

' . __( 'Documentation on Network Themes' ) . '

' . - '

' . __( 'Support' ) . '

' . - $help_sidebar_autoupdates + $help_sidebar_autoupdates . + '

' . __( 'Support' ) . '

' ); get_current_screen()->set_screen_reader_content( diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php index a2a771c4c3..42f196f15a 100644 --- a/src/wp-admin/plugins.php +++ b/src/wp-admin/plugins.php @@ -566,6 +566,7 @@ get_current_screen()->add_help_tab( ); $help_sidebar_autoupdates = ''; + if ( current_user_can( 'update_plugins' ) && wp_is_auto_update_enabled_for_type( 'plugin' ) ) { get_current_screen()->add_help_tab( array( @@ -583,8 +584,8 @@ if ( current_user_can( 'update_plugins' ) && wp_is_auto_update_enabled_for_type( get_current_screen()->set_help_sidebar( '

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

' . '

' . __( 'Documentation on Managing Plugins' ) . '

' . - '

' . __( 'Support' ) . '

' . - $help_sidebar_autoupdates + $help_sidebar_autoupdates . + '

' . __( 'Support' ) . '

' ); get_current_screen()->set_screen_reader_content( diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php index fa442bb5e2..2a41dbd054 100644 --- a/src/wp-admin/themes.php +++ b/src/wp-admin/themes.php @@ -182,8 +182,9 @@ if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ); } // End if 'edit_theme_options' && 'customize'. -// Help tab: Auto-updates. $help_sidebar_autoupdates = ''; + +// Help tab: Auto-updates. if ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( 'theme' ) ) { $help_tab_autoupdates = '

' . __( 'Auto-updates can be enabled or disabled for each individual theme. Themes with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

' . @@ -203,8 +204,8 @@ if ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( get_current_screen()->set_help_sidebar( '

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

' . '

' . __( 'Documentation on Using Themes' ) . '

' . - '

' . __( 'Support' ) . '

' . - $help_sidebar_autoupdates + $help_sidebar_autoupdates . + '

' . __( 'Support' ) . '

' ); if ( current_user_can( 'switch_themes' ) ) { diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index 40c72ebe59..1af08bb9b2 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -746,6 +746,7 @@ get_current_screen()->add_help_tab( ); $help_sidebar_autoupdates = ''; + if ( ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( 'theme' ) ) || ( current_user_can( 'update_plugins' ) && wp_is_auto_update_enabled_for_type( 'plugin' ) ) ) { $help_tab_autoupdates = '

' . __( 'Auto-updates can be enabled or disabled for each individual theme or plugin. Themes or plugins with auto-updates enabled will display the estimated date of the next auto-update. Auto-updates depends on the WP-Cron task scheduling system.' ) . '

'; $help_tab_autoupdates .= '

' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '

'; @@ -764,8 +765,8 @@ if ( ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type get_current_screen()->set_help_sidebar( '

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

' . '

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

' . - '

' . __( 'Support' ) . '

' . - $help_sidebar_autoupdates + $help_sidebar_autoupdates . + '

' . __( 'Support' ) . '

' ); if ( 'upgrade-core' === $action ) {