Ticket #27055: 27055.34.diff
| File 27055.34.diff, 1.9 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/theme-install.php
33 33 'new' => __( 'Newest Themes' ), 34 34 ); 35 35 36 $installed_themes = search_theme_directories(); 37 foreach ( $installed_themes as $k => $v ) { 38 if ( false !== strpos( $k, '/' ) ) { 39 unset( $installed_themes[ $k ] ); 40 } 41 } 42 36 43 wp_localize_script( 'theme', '_wpThemeSettings', array( 37 44 'themes' => false, 38 45 'settings' => array( … … 51 58 'back' => __( 'Back' ), 52 59 'error' => ( 'There was a problem trying to load the themes. Please, try again.' ), // @todo improve 53 60 ), 61 'installedThemes' => array_keys( $installed_themes ), 54 62 'browse' => array( 55 63 'sections' => $sections, 56 64 ), … … 187 195 <h3 class="theme-name">{{ data.name }}</h3> 188 196 189 197 <div class="theme-actions"> 198 <# if ( -1 === _.indexOf( _wpThemeSettings.installedThemes, data.slug ) ) { #> 190 199 <a class="button button-primary" href="{{ data.installURI }}"><?php esc_html_e( 'Install' ); ?></a> 200 <# } else { #> 201 <a class="button button-primary disabled" href="#"><?php esc_html_e( 'Installed' ); ?></a> 202 <# } #> 191 203 <a class="button button-secondary preview install-theme-preview" href="#"><?php esc_html_e( 'Preview' ); ?></a> 192 204 </div> 193 205 </script> … … 196 208 <div class="wp-full-overlay-sidebar"> 197 209 <div class="wp-full-overlay-header"> 198 210 <a href="#" class="close-full-overlay button-secondary"><?php _e( 'Close' ); ?></a> 211 <# if ( -1 === _.indexOf( _wpThemeSettings.installedThemes, data.slug ) ) { #> 199 212 <a href="{{ data.installURI }}" class="button button-primary theme-install"><?php _e( 'Install' ); ?></a> 213 <# } else { #> 214 <a class="button button-primary theme-install disabled" href="#"><?php esc_html_e( 'Installed' ); ?></a> 215 <# } #> 200 216 </div> 201 217 <div class="wp-full-overlay-sidebar-content"> 202 218 <div class="install-theme-info">