Help/About: Add help tabs to provide informations about plugin & themes auto-updates.

Adds language around how the feature works and includes links to the WordPress HelpHub pages.

Fixes: #50215.
Props: audrasjb, garrett-eclipse, paaljoachim, marybaum, pbiron, whyisjake.


Built from https://develop.svn.wordpress.org/trunk@48062


git-svn-id: http://core.svn.wordpress.org/trunk@47829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
whyisjake 2020-06-16 17:29:07 +00:00
parent 5e0879db84
commit 97e2b94f84
5 changed files with 73 additions and 5 deletions

View File

@ -302,10 +302,26 @@ 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(
'id' => 'plugins-themes-auto-updates',
'title' => __( 'Auto-updates' ),
'content' =>
'<p>' . __( '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.' ) . '</p>' .
'<p>' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '</p>',
)
);
$help_sidebar_autoupdates = '<p>' . __( '<a href="https://wordpress.org/support/article/plugins-themes-auto-updates/">Learn more: Auto-updates documentation</a>' ) . '</p>';
}
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin_Themes_Screen">Documentation on Network Themes</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' .
$help_sidebar_autoupdates
);
get_current_screen()->set_screen_reader_content(

View File

@ -565,10 +565,26 @@ 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(
'id' => 'plugins-themes-auto-updates',
'title' => __( 'Auto-updates' ),
'content' =>
'<p>' . __( 'Auto-updates can be enabled or disabled for each individual plugin. 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.' ) . '</p>' .
'<p>' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '</p>',
)
);
$help_sidebar_autoupdates = '<p>' . __( '<a href="https://wordpress.org/support/article/plugins-themes-auto-updates/">Learn more: Auto-updates documentation</a>' ) . '</p>';
}
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/support/article/managing-plugins/">Documentation on Managing Plugins</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' .
$help_sidebar_autoupdates
);
get_current_screen()->set_screen_reader_content(

View File

@ -182,10 +182,29 @@ if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' )
);
} // End if 'edit_theme_options' && 'customize'.
// Help tab: Auto-updates.
$help_sidebar_autoupdates = '';
if ( current_user_can( 'update_themes' ) && wp_is_auto_update_enabled_for_type( 'theme' ) ) {
$help_tab_autoupdates =
'<p>' . __( '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.' ) . '</p>' .
'<p>' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '</p>';
get_current_screen()->add_help_tab(
array(
'id' => 'plugins-themes-auto-updates',
'title' => __( 'Auto-updates' ),
'content' => $help_tab_autoupdates,
)
);
$help_sidebar_autoupdates = '<p>' . __( '<a href="https://wordpress.org/support/article/plugins-themes-auto-updates/">Learn more: Auto-updates documentation</a>' ) . '</p>';
} // End if 'update_themes' && 'wp_is_auto_update_enabled_for_type'.
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/support/article/using-themes/">Documentation on Using Themes</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' .
$help_sidebar_autoupdates
);
if ( current_user_can( 'switch_themes' ) ) {

View File

@ -745,10 +745,27 @@ 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 = '<p>' . __( '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.' ) . '</p>';
$help_tab_autoupdates .= '<p>' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '</p>';
get_current_screen()->add_help_tab(
array(
'id' => 'plugins-themes-auto-updates',
'title' => __( 'Auto-updates' ),
'content' => $help_tab_autoupdates,
)
);
$help_sidebar_autoupdates = '<p>' . __( '<a href="https://wordpress.org/support/article/plugins-themes-auto-updates/">Learn more: Auto-updates documentation</a>' ) . '</p>';
}
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://wordpress.org/support/article/dashboard-updates-screen/">Documentation on Updating WordPress</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' .
$help_sidebar_autoupdates
);
if ( 'upgrade-core' === $action ) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-48061';
$wp_version = '5.5-alpha-48062';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.