[wp-trac] [WordPress Trac] #37425: Passing variables withing the previewURL get lost on server side
WordPress Trac
noreply at wordpress.org
Wed Jul 20 22:21:07 UTC 2016
#37425: Passing variables withing the previewURL get lost on server side
--------------------------+-------------------------
Reporter: virgodesign | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Customize | Version: 4.5.3
Severity: normal | Resolution: worksforme
Keywords: | Focuses:
--------------------------+-------------------------
Changes (by westonruter):
* status: new => closed
* resolution: => worksforme
* milestone: Awaiting Review =>
Comment:
@virgodesign I can't reproduce the issue. I added this bit to my theme's
`header.php`:
{{{#!php
<?php echo esc_html( wp_json_encode( wp_unslash( $_GET ) ) ) ?>
}}}
And then I was able to enter this into the browser console:
{{{#!js
var urlParser = document.createElement( 'a' );
urlParser.href = wp.customize.settings.url.home
urlParser.search = 'custom_var=1';
wp.customize.previewer.previewUrl( urlParser.href );
}}}
And the header showed the expected value:
{{{#!json
{"custom_var":"1"}
}}}
Your issue may be that you tried to enter the wrong domain when setting
the URL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37425#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list