X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/784f914b1e4b1c62d6657e86397c2e83bcee4295..refs/heads/pristine:/wp-admin/theme-install.php diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 97f42ce3..dadef0dd 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -13,7 +13,7 @@ require( ABSPATH . 'wp-admin/includes/theme-install.php' ); wp_reset_vars( array( 'tab' ) ); if ( ! current_user_can('install_themes') ) - wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) ); + wp_die( __( 'Sorry, you are not allowed to install themes on this site.' ) ); if ( is_multisite() && ! is_network_admin() ) { wp_redirect( network_admin_url( 'theme-install.php' ) ); @@ -37,27 +37,34 @@ foreach ( $installed_themes as $k => $v ) { wp_localize_script( 'theme', '_wpThemeSettings', array( 'themes' => false, 'settings' => array( - 'isInstall' => true, - 'canInstall' => current_user_can( 'install_themes' ), - 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, - 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) + 'isInstall' => true, + 'canInstall' => current_user_can( 'install_themes' ), + 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, + 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) ), 'l10n' => array( - 'addNew' => __( 'Add New Theme' ), - 'search' => __( 'Search Themes' ), - 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) - 'upload' => __( 'Upload Theme' ), - 'back' => __( 'Back' ), - 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), - 'themesFound' => __( 'Number of Themes found: %d' ), - 'noThemesFound' => __( 'No themes found. Try a different search.' ), - 'collapseSidebar' => __( 'Collapse Sidebar' ), - 'expandSidebar' => __( 'Expand Sidebar' ), + 'addNew' => __( 'Add New Theme' ), + 'search' => __( 'Search Themes' ), + 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) + 'upload' => __( 'Upload Theme' ), + 'back' => __( 'Back' ), + 'error' => sprintf( + /* translators: %s: support forums URL */ + __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums.' ), + __( 'https://wordpress.org/support/' ) + ), + 'themesFound' => __( 'Number of Themes found: %d' ), + 'noThemesFound' => __( 'No themes found. Try a different search.' ), + 'collapseSidebar' => __( 'Collapse Sidebar' ), + 'expandSidebar' => __( 'Expand Sidebar' ), + /* translators: hidden accessibility text */ + 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), ), 'installedThemes' => array_keys( $installed_themes ), ) ); wp_enqueue_script( 'theme' ); +wp_enqueue_script( 'updates' ); if ( $tab ) { /** @@ -75,7 +82,7 @@ if ( $tab ) { $help_overview = '

' . sprintf( /* translators: %s: Theme Directory URL */ - __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress.org Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ), + __( 'You can find additional themes for your site by using the Theme Browser/Installer on this screen, which will display themes from the WordPress Theme Directory. These themes are designed and developed by third parties, are available free of charge, and are compatible with the license WordPress uses.' ), __( 'https://wordpress.org/themes/' ) ) . '

' . '

' . __( 'You can Search for themes by keyword, author, or tag, or can get more specific and search by criteria listed in the feature filter.' ) . ' ' . __( 'The search results will be updated as you type.' ) . '

' . @@ -104,8 +111,8 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . - '

' . __('Documentation on Adding New Themes') . '

' . - '

' . __('Support Forums') . '

' + '

' . __('Documentation on Adding New Themes') . '

' . + '

' . __('Support Forums') . '

' ); include(ABSPATH . 'wp-admin/admin-header.php'); @@ -116,10 +123,9 @@ include(ABSPATH . 'wp-admin/admin-header.php'); echo esc_html( $title ); /** - * Filter the tabs shown on the Add Themes screen. + * Filters the tabs shown on the Add Themes screen. * - * This filter is for backwards compatibility only, for the suppression - * of the upload tab. + * This filter is for backward compatibility only, for the suppression of the upload tab. * * @since 2.8.0 * @@ -127,18 +133,20 @@ include(ABSPATH . 'wp-admin/admin-header.php'); */ $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { - echo ' ' . __( 'Upload Theme' ) . ''; - echo ' ' . _x( 'Browse', 'themes' ) . ''; + echo ' '; } ?> +
+

+
-

+

-
+
@@ -150,7 +158,7 @@ include(ABSPATH . 'wp-admin/admin-header.php');
  • - +
    @@ -170,14 +178,14 @@ include(ABSPATH . 'wp-admin/admin-header.php'); - +

    - - + +
    '; } ?> +
    + + +
    - +
    -

    +

    @@ -236,68 +248,100 @@ if ( $tab ) {
    <# } #> -
    +
    + +

    {{ data.name }}

    - - + <# if ( data.installed ) { #> + + <# if ( data.activate_url ) { #> + + <# } #> + <# if ( data.customize_url ) { #> + + <# } else { #> + + <# } #> + <# } else { #> + + + + <# } #>
    <# if ( data.installed ) { #> -
    +

    <# } #>