X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/7f1521bf193b382565eb753043c161f4cb3fcda7..784f914b1e4b1c62d6657e86397c2e83bcee4295:/wp-admin/network/themes.php
diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php
index 2b77f188..fbc2aa03 100644
--- a/wp-admin/network/themes.php
+++ b/wp-admin/network/themes.php
@@ -53,7 +53,7 @@ if ( $action ) {
wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
exit;
}
- foreach( (array) $themes as $theme )
+ foreach ( (array) $themes as $theme )
$allowed_themes[ $theme ] = true;
update_site_option( 'allowedthemes', $allowed_themes );
wp_safe_redirect( add_query_arg( 'enabled', count( $themes ), $referer ) );
@@ -65,7 +65,7 @@ if ( $action ) {
wp_safe_redirect( add_query_arg( 'error', 'none', $referer ) );
exit;
}
- foreach( (array) $themes as $theme )
+ foreach ( (array) $themes as $theme )
unset( $allowed_themes[ $theme ] );
update_site_option( 'allowedthemes', $allowed_themes );
wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
@@ -86,7 +86,7 @@ if ( $action ) {
require_once(ABSPATH . 'wp-admin/admin-header.php');
echo '
';
- echo '
' . esc_html( $title ) . '
';
+ echo '
' . esc_html( $title ) . '
';
$url = self_admin_url('update.php?action=update-selected-themes&themes=' . urlencode( join(',', $themes) ));
$url = wp_nonce_url($url, 'bulk-update-themes');
@@ -116,27 +116,9 @@ if ( $action ) {
exit;
}
- $files_to_delete = $theme_info = array();
- $theme_translations = wp_get_installed_translations( 'themes' );
+ $theme_info = array();
foreach ( $themes as $key => $theme ) {
$theme_info[ $theme ] = wp_get_theme( $theme );
-
- // Locate all the files in that folder.
- $files = list_files( $theme_info[ $theme ]->get_stylesheet_directory() );
- if ( $files ) {
- $files_to_delete = array_merge( $files_to_delete, $files );
- }
-
- // Add translation files.
- $theme_slug = $theme_info[ $theme ]->get_stylesheet();
- if ( ! empty( $theme_translations[ $theme_slug ] ) ) {
- $translations = $theme_translations[ $theme_slug ];
-
- foreach ( $translations as $translation => $data ) {
- $files_to_delete[] = $theme_slug . '-' . $translation . '.po';
- $files_to_delete[] = $theme_slug . '-' . $translation . '.mo';
- }
- }
}
include(ABSPATH . 'wp-admin/update.php');
@@ -150,19 +132,23 @@ if ( $action ) {
?>
-
+
-
+
', sprintf( __('%1$s by %2$s' ), $theme->display('Name'), $theme->display('Author') ), '';
+ echo '- ' . sprintf(
+ /* translators: 1: theme name, 2: theme author */
+ _x( '%1$s by %2$s', 'theme' ),
+ '' . $theme->display( 'Name' ) . '',
+ '' . $theme->display( 'Author' ) . ''
+ ) . '
';
}
?>
@@ -182,9 +168,9 @@ if ( $action ) {
wp_nonce_field( 'bulk-themes' );
if ( 1 == $themes_to_delete ) {
- submit_button( __( 'Yes, Delete this theme' ), 'button', 'submit', false );
+ submit_button( __( 'Yes, delete this theme' ), 'button', 'submit', false );
} else {
- submit_button( __( 'Yes, Delete these themes' ), 'button', 'submit', false );
+ submit_button( __( 'Yes, delete these themes' ), 'button', 'submit', false );
}
?>
@@ -192,19 +178,8 @@ if ( $action ) {
$referer = wp_get_referer();
?>
-
-
-
-
- ' . esc_html( str_replace( WP_CONTENT_DIR . '/themes', '', $file ) ) . '';
- }
- ?>
-
-
set_help_sidebar(
'
' . __('Support Forums') . '
'
);
+get_current_screen()->set_screen_reader_content( array(
+ 'heading_views' => __( 'Filter themes list' ),
+ 'heading_pagination' => __( 'Themes list navigation' ),
+ 'heading_list' => __( 'Themes list' ),
+) );
+
$title = __('Themes');
$parent_file = 'themes.php';
@@ -261,10 +242,13 @@ require_once(ABSPATH . 'wp-admin/admin-header.php');
?>
-
' . __('Search results for “%s”') . '', esc_html( $s ) ); ?>
-
+
' . __( 'Search results for “%s”' ) . '', esc_html( $s ) );
+}
+?>
+
views();
if ( 'broken' == $status )
- echo '
' . __('The following themes are installed but incomplete. Themes must have a stylesheet and a template.') . '
';
+ echo '
' . __( 'The following themes are installed but incomplete.' ) . '
';
?>