X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/784f914b1e4b1c62d6657e86397c2e83bcee4295..refs/heads/pristine:/wp-admin/themes.php diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 67769ee8..6aa129d7 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -12,7 +12,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'switch_themes' ) && ! current_user_can( 'edit_theme_options' ) ) { wp_die( '

' . __( 'Cheatin’ uh?' ) . '

' . - '

' . __( 'You are not allowed to edit theme options on this site.' ) . '

', + '

' . __( 'Sorry, you are not allowed to edit theme options on this site.' ) . '

', 403 ); } @@ -40,7 +40,7 @@ if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) { if ( ! current_user_can( 'delete_themes' ) ) { wp_die( '

' . __( 'Cheatin’ uh?' ) . '

' . - '

' . __( 'You are not allowed to delete this item.' ) . '

', + '

' . __( 'Sorry, you are not allowed to delete this item.' ) . '

', 403 ); } @@ -89,7 +89,7 @@ if ( current_user_can( 'install_themes' ) ) { if ( is_multisite() ) { $help_install = '

' . __('Installing themes on Multisite can only be done from the Network Admin section.') . '

'; } else { - $help_install = '

' . sprintf( __('If you would like to see more themes to choose from, click on the “Add New” button and you will be able to browse or search for additional themes from the WordPress.org Theme Directory. Themes in the WordPress.org Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), 'https://wordpress.org/themes/' ) . '

'; + $help_install = '

' . sprintf( __('If you would like to see more themes to choose from, click on the “Add New” button and you will be able to browse or search for additional themes from the WordPress Theme Directory. Themes in the WordPress Theme Directory are designed and developed by third parties, and are compatible with the license WordPress uses. Oh, and they’re free!'), __( 'https://wordpress.org/themes/' ) ) . '

'; } get_current_screen()->add_help_tab( array( @@ -115,8 +115,8 @@ if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . - '

' . __( 'Support Forums' ) . '

' + '

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

' . + '

' . __( 'Support Forums' ) . '

' ); if ( current_user_can( 'switch_themes' ) ) { @@ -145,6 +145,7 @@ wp_localize_script( 'theme', '_wpThemeSettings', array( add_thickbox(); wp_enqueue_script( 'theme' ); +wp_enqueue_script( 'updates' ); wp_enqueue_script( 'customize-loader' ); require_once( ABSPATH . 'wp-admin/admin-header.php' ); @@ -176,7 +177,7 @@ endif; $ct = wp_get_theme(); if ( $ct->errors() && ( ! is_multisite() || current_user_can( 'manage_network_themes' ) ) ) { - echo '

' . sprintf( __( 'ERROR: %s' ), $ct->errors()->get_error_message() ) . '

'; + echo '

' . __( 'ERROR:' ) . ' ' . $ct->errors()->get_error_message() . '

'; } /* @@ -199,17 +200,17 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; else - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) { $menu_file = $item[2]; if ( current_user_can( 'customize' ) ) { if ( 'custom-header' === $menu_file ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } elseif ( 'custom-background' === $menu_file ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } @@ -218,9 +219,9 @@ if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() ) } if ( file_exists( ABSPATH . "wp-admin/$menu_file" ) ) { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } else { - $current_theme_actions[] = "{$item[0]}"; + $current_theme_actions[] = "{$item[0]}"; } } } @@ -248,6 +249,17 @@ foreach ( $themes as $theme ) :
+ + +
+ +

Update now' ); ?>

+ +

+ +
+ +
@@ -269,17 +281,17 @@ foreach ( $themes as $theme ) : - + + - - -
- @@ -325,7 +337,7 @@ $can_install = current_user_can( 'install_themes' ); ), admin_url( 'themes.php' ) ); $delete_url = wp_nonce_url( $delete_url, 'delete-theme_' . $stylesheet ); ?> - + - +
<# } #> + + <# if ( data.hasUpdate ) { #> + <# if ( data.hasPackage ) { #> +

Update now' ); ?>

+ <# } else { #> +

+ <# } #> + <# } #> + -
+
+ +
<# if ( data.active ) { #>

Active: %s' ), '{{{ data.name }}}' ); ?>

@@ -383,21 +409,19 @@ $can_install = current_user_can( 'install_themes' ); <# } #>
- - <# if ( data.active ) { #> - <# if ( data.actions.customize ) { #> - + <# if ( data.active ) { #> + <# if ( data.actions.customize ) { #> + + <# } #> + <# } else { #> + + + <# } #> - <# } else { #> - - - <# } #> -
- - <# if ( data.hasUpdate ) { #> -
- <# } #> - wp_get_update_data(), +) ); + +require( ABSPATH . 'wp-admin/admin-footer.php' );