Ticket #42275: 42275.1.diff
| File 42275.1.diff, 11.2 KB (added by , 8 years ago) |
|---|
-
src/wp-admin/css/customize-controls.css
diff --git src/wp-admin/css/customize-controls.css src/wp-admin/css/customize-controls.css index 12347f1..c799f9e 100644
p.customize-section-description { 1675 1675 margin-right: 12px; 1676 1676 } 1677 1677 1678 .theme-browser .theme.active .theme-actions, 1679 .wp-customizer .theme-browser .theme .theme-actions { 1680 padding: 10px 15px; 1681 box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); 1682 } 1683 1678 1684 @media screen and ( max-width: 640px ) { 1679 1685 .customize-section-description-container + #customize-control-custom_css:last-child { 1680 1686 margin-right: 0; … … p.customize-section-description { 2098 2104 font-size: 15px; 2099 2105 } 2100 2106 2101 .theme-id-container {2102 position: relative;2103 }2104 2105 .theme-browser .theme.active .theme-actions,2106 .wp-customizer .theme-browser .theme .theme-actions {2107 position: absolute;2108 top: 50%;2109 -webkit-transform: translateY(-50%);2110 transform: translateY(-50%);2111 right: 0;2112 padding: 10px 15px;2113 box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);2114 }2115 2116 2107 #customize-controls .theme-overlay .theme-name { 2117 2108 font-size: 32px; 2118 2109 } … … body.adding-widget .add-new-widget:before, 3038 3029 box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); 3039 3030 } 3040 3031 } 3032 3033 @media screen and ( max-width: 600px ) { 3034 .theme-browser .theme.active .theme-actions, 3035 .wp-customizer .theme-browser .theme .theme-actions { 3036 padding: 8px 15px; 3037 box-shadow: none; 3038 } 3039 } -
src/wp-admin/css/themes.css
diff --git src/wp-admin/css/themes.css src/wp-admin/css/themes.css index c6f7972..eece216 100644
body.js .theme-browser.search-loading { 222 222 opacity: 1; 223 223 } 224 224 225 .theme-id-container { 226 position: relative; 227 } 228 229 .theme-browser .theme.active .theme-actions, 230 .theme-browser .theme .theme-actions { 231 position: absolute; 232 top: 50%; 233 -webkit-transform: translateY(-50%); 234 transform: translateY(-50%); 235 right: 0; 236 padding: 10px 15px; 237 box-shadow: inset 0 1px 0 rgba(0,0,0,0.1); 238 } 239 225 240 .theme-browser .theme.active .theme-actions .button-primary { 226 241 margin-right: 0; 227 242 } … … body.full-overlay-active { 1892 1907 margin-top: 6px; 1893 1908 line-height: normal; 1894 1909 } 1910 1911 .theme-browser .theme .theme-actions .button { 1912 margin-bottom: 0; 1913 } 1914 1915 .theme-browser .theme.active .theme-actions, 1916 .theme-browser .theme .theme-actions { 1917 padding-top: 8px; 1918 padding-bottom: 8px; 1919 } 1895 1920 } 1896 1921 1897 1922 @media aural { -
src/wp-admin/theme-install.php
diff --git src/wp-admin/theme-install.php src/wp-admin/theme-install.php index e4894cc..bf0e621 100644
if ( $tab ) { 264 264 printf( __( 'By %s' ), '{{ data.author }}' ); 265 265 ?> 266 266 </div> 267 <h3 class="theme-name">{{ data.name }}</h3>268 267 269 <div class="theme-actions"> 270 <# if ( data.installed ) { #> 271 <?php 272 /* translators: %s: Theme name */ 273 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 274 ?> 275 <# if ( data.activate_url ) { #> 276 <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> 277 <# } #> 278 <# if ( data.customize_url ) { #> 279 <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a> 280 <# } else { #> 281 <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> 282 <# } #> 283 <# } else { #> 284 <?php 285 /* translators: %s: Theme name */ 286 $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); 287 ?> 288 <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a> 289 <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> 290 <# } #> 291 </div> 268 <div class="theme-id-container"> 269 <h3 class="theme-name">{{ data.name }}</h3> 270 271 <div class="theme-actions"> 272 <# if ( data.installed ) { #> 273 <?php 274 /* translators: %s: Theme name */ 275 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 276 ?> 277 <# if ( data.activate_url ) { #> 278 <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> 279 <# } #> 280 <# if ( data.customize_url ) { #> 281 <a class="button load-customize" href="{{ data.customize_url }}"><?php _e( 'Live Preview' ); ?></a> 282 <# } else { #> 283 <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> 284 <# } #> 285 <# } else { #> 286 <?php 287 /* translators: %s: Theme name */ 288 $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' ); 289 ?> 290 <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a> 291 <button class="button preview install-theme-preview"><?php _e( 'Preview' ); ?></button> 292 <# } #> 293 </div> 294 </div> 292 295 293 296 <# if ( data.installed ) { #> 294 297 <div class="notice notice-success notice-alt"><p><?php _ex( 'Installed', 'theme' ); ?></p></div> -
src/wp-admin/themes.php
diff --git src/wp-admin/themes.php src/wp-admin/themes.php index 53fd2e1..f8a1eef 100644
foreach ( $themes as $theme ) : 273 273 <span class="more-details" id="<?php echo $aria_action; ?>"><?php _e( 'Theme Details' ); ?></span> 274 274 <div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div> 275 275 276 <?php if ( $theme['active'] ) { ?> 277 <h2 class="theme-name" id="<?php echo $aria_name; ?>"> 278 <?php 279 /* translators: %s: theme name */ 280 printf( __( '<span>Active:</span> %s' ), $theme['name'] ); 281 ?> 282 </h2> 283 <?php } else { ?> 284 <h2 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h2> 285 <?php } ?> 286 287 <div class="theme-actions"> 288 289 <?php if ( $theme['active'] ) { ?> 290 <?php if ( $theme['actions']['customize'] && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> 291 <a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a> 292 <?php } ?> 293 <?php } else { ?> 294 <?php 295 /* translators: %s: Theme name */ 296 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 297 ?> 298 <a class="button activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> 299 <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> 300 <a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a> 301 <?php } ?> 302 <?php } ?> 303 304 </div> 276 <div class="theme-id-container"> 277 <?php if ( $theme['active'] ) { ?> 278 <h2 class="theme-name" id="<?php echo $aria_name; ?>"> 279 <?php 280 /* translators: %s: theme name */ 281 printf( __( '<span>Active:</span> %s' ), $theme['name'] ); 282 ?> 283 </h2> 284 <?php } else { ?> 285 <h2 class="theme-name" id="<?php echo $aria_name; ?>"><?php echo $theme['name']; ?></h2> 286 <?php } ?> 287 288 <div class="theme-actions"> 289 <?php if ( $theme['active'] ) { ?> 290 <?php if ( $theme['actions']['customize'] && current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> 291 <a class="button button-primary customize load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Customize' ); ?></a> 292 <?php } ?> 293 <?php } else { ?> 294 <?php 295 /* translators: %s: Theme name */ 296 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 297 ?> 298 <a class="button activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> 299 <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> 300 <a class="button button-primary load-customize hide-if-no-customize" href="<?php echo $theme['actions']['customize']; ?>"><?php _e( 'Live Preview' ); ?></a> 301 <?php } ?> 302 <?php } ?> 303 304 </div> 305 </div> 305 306 </div> 306 307 <?php endforeach; ?> 307 308 </div> … … $can_install = current_user_can( 'install_themes' ); 407 408 ?> 408 409 </div> 409 410 410 <# if ( data.active ) { #> 411 <h2 class="theme-name" id="{{ data.id }}-name"> 412 <?php 413 /* translators: %s: Theme name */ 414 printf( __( '<span>Active:</span> %s' ), '{{{ data.name }}}' ); 415 ?> 416 </h2> 417 <# } else { #> 418 <h2 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h2> 419 <# } #> 420 421 <div class="theme-actions"> 422 <# if ( data.active ) { #> 423 <# if ( data.actions.customize ) { #> 424 <a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a> 425 <# } #> 426 <# } else { #> 427 <?php 428 /* translators: %s: Theme name */ 429 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 430 ?> 431 <a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> 432 <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> 433 <# } #> 434 </div> 411 <div class="theme-id-container"> 412 <# if ( data.active ) { #> 413 <h2 class="theme-name" id="{{ data.id }}-name"> 414 <?php 415 /* translators: %s: Theme name */ 416 printf( __( '<span>Active:</span> %s' ), '{{{ data.name }}}' ); 417 ?> 418 </h2> 419 <# } else { #> 420 <h2 class="theme-name" id="{{ data.id }}-name">{{{ data.name }}}</h2> 421 <# } #> 422 423 <div class="theme-actions"> 424 <# if ( data.active ) { #> 425 <# if ( data.actions.customize ) { #> 426 <a class="button button-primary customize load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Customize' ); ?></a> 427 <# } #> 428 <# } else { #> 429 <?php 430 /* translators: %s: Theme name */ 431 $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' ); 432 ?> 433 <a class="button activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> 434 <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> 435 <# } #> 436 </div> 437 </div> 435 438 </script> 436 439 437 440 <script id="tmpl-theme-single" type="text/template">