diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-admin/network/themes.php --- a/wp/wp-admin/network/themes.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-admin/network/themes.php Tue Dec 15 13:49:49 2020 +0100 @@ -8,7 +8,7 @@ */ /** Load WordPress Administration Bootstrap */ -require_once( dirname( __FILE__ ) . '/admin.php' ); +require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'manage_network_themes' ) ) { wp_die( __( 'Sorry, you are not allowed to manage network themes.' ) ); @@ -22,7 +22,15 @@ $s = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : ''; // Clean up request URI from temporary args for screen options/paging uri's to work as expected. -$temp_args = array( 'enabled', 'disabled', 'deleted', 'error' ); +$temp_args = array( + 'enabled', + 'disabled', + 'deleted', + 'error', + 'enabled-auto-update', + 'disabled-auto-update', +); + $_SERVER['REQUEST_URI'] = remove_query_arg( $temp_args, $_SERVER['REQUEST_URI'] ); $referer = remove_query_arg( $temp_args, wp_get_referer() ); @@ -76,7 +84,7 @@ $title = __( 'Update Themes' ); $parent_file = 'themes.php'; - require_once( ABSPATH . 'wp-admin/admin-header.php' ); + require_once ABSPATH . 'wp-admin/admin-header.php'; echo '
' . __( '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.' ) . '
' . + '' . __( 'Please note: Third-party themes and plugins, or custom code, may override WordPress scheduling.' ) . '
', + ) + ); + + $help_sidebar_autoupdates = '' . __( 'Learn more: Auto-updates documentation' ) . '
'; +} + get_current_screen()->set_help_sidebar( '' . __( 'For more information:' ) . '
' . '' . __( 'Documentation on Network Themes' ) . '
' . + $help_sidebar_autoupdates . '' . __( 'Support' ) . '
' ); @@ -261,7 +339,7 @@ wp_enqueue_script( 'updates' ); wp_enqueue_script( 'theme-preview' ); -require_once( ABSPATH . 'wp-admin/admin-header.php' ); +require_once ABSPATH . 'wp-admin/admin-header.php'; ?> @@ -274,7 +352,7 @@ ' . __( 'Search results for “%s”' ) . '', esc_html( $s ) ); } ?> @@ -284,31 +362,52 @@' . sprintf( $message, number_format_i18n( $enabled ) ) . '
'; } elseif ( isset( $_GET['disabled'] ) ) { $disabled = absint( $_GET['disabled'] ); - if ( 1 == $disabled ) { + if ( 1 === $disabled ) { $message = __( 'Theme disabled.' ); } else { + /* translators: %s: Number of themes. */ $message = _n( '%s theme disabled.', '%s themes disabled.', $disabled ); } echo '' . sprintf( $message, number_format_i18n( $disabled ) ) . '
' . sprintf( $message, number_format_i18n( $deleted ) ) . '
' . sprintf( $message, number_format_i18n( $enabled ) ) . '
' . sprintf( $message, number_format_i18n( $disabled ) ) . '
' . __( 'No theme selected.' ) . '
' . __( 'You cannot delete a theme while it is active on the main site.' ) . '
' . __( 'The following themes are installed but incomplete.' ) . '
'; } ?> @@ -340,4 +439,4 @@ wp_print_admin_notice_templates(); wp_print_update_row_templates(); -include( ABSPATH . 'wp-admin/admin-footer.php' ); +require_once ABSPATH . 'wp-admin/admin-footer.php';