mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Customizer: Escape theme preview URLs.
props johnbillion, ocean90. see #31896. git-svn-id: https://develop.svn.wordpress.org/trunk@32134 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -511,6 +511,8 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
||||
* @since 4.2.0
|
||||
*/
|
||||
function customize_themes_print_templates() {
|
||||
$preview_url = esc_url( add_query_arg( 'theme', '__THEME__' ) ); // Token because esc_url() strips curly braces.
|
||||
$preview_url = str_replace( '__THEME__', '{{ data.id }}', $preview_url );
|
||||
?>
|
||||
<script type="text/html" id="tmpl-customize-themes-details-view">
|
||||
<div class="theme-backdrop"></div>
|
||||
@@ -550,7 +552,7 @@ function customize_themes_print_templates() {
|
||||
<# if ( ! data.active ) { #>
|
||||
<div class="theme-actions">
|
||||
<div class="inactive-theme">
|
||||
<a href="<?php echo add_query_arg( 'theme', '{{ data.id }}' ); ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a>
|
||||
<a href="<?php echo $preview_url; ?>" target="_top" class="button button-primary"><?php _e( 'Live Preview' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<# } #>
|
||||
|
||||
Reference in New Issue
Block a user