Changeset 32134
- Timestamp:
- 04/15/2015 04:32:03 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r31954 r32134 512 512 */ 513 513 function customize_themes_print_templates() { 514 $preview_url = esc_url( add_query_arg( 'theme', '__THEME__' ) ); // Token because esc_url() strips curly braces. 515 $preview_url = str_replace( '__THEME__', '{{ data.id }}', $preview_url ); 514 516 ?> 515 517 <script type="text/html" id="tmpl-customize-themes-details-view"> … … 551 553 <div class="theme-actions"> 552 554 <div class="inactive-theme"> 553 <a href="<?php echo add_query_arg( 'theme', '{{ data.id }}' ); ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a>555 <a href="<?php echo $preview_url; ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a> 554 556 </div> 555 557 </div> -
trunk/src/wp-includes/class-wp-customize-control.php
r32088 r32134 1244 1244 public function content_template() { 1245 1245 $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 1246 $preview_url = add_query_arg( 'theme', '{{ data.theme.id }}', $current_url ); 1246 $preview_url = esc_url( add_query_arg( 'theme', '__THEME__', $current_url ) ); // Token because esc_url() strips curly braces. 1247 $preview_url = str_replace( '__THEME__', '{{ data.theme.id }}', $preview_url ); 1247 1248 ?> 1248 1249 <div class="theme" tabindex="0" data-preview-url="<?php echo esc_attr( $preview_url ); ?>" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name">
Note: See TracChangeset
for help on using the changeset viewer.