[wp-trac] [WordPress Trac] #31897: Update Customizer nonces via Heartbeat API
WordPress Trac
noreply at wordpress.org
Wed Feb 24 19:54:22 UTC 2016
#31897: Update Customizer nonces via Heartbeat API
------------------------------------------+-----------------------------
Reporter: westonruter | Owner: voldemortensen
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Customize | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: javascript
------------------------------------------+-----------------------------
Comment (by westonruter):
@adamsilverstein I think you can remove all references to `isCustomizer`
and instead just do:
{{{#!js
if ( 'customize' === settings.screenId ) {
ajaxData.wp_customize = 'on';
}
}}}
This also raises another question: should not the heartbeat sent to the
server bring along with it the full context of the current Customizer
state? In other words, shouldn't the `customized` JSON blob of dirty
settings and the current `theme` be sent along in these heartbeat
requests? This would ensure that when the Ajax request is received, all of
the Customizer state will apply. Something will have to be done here to
ensure that the `preview` nonce can be included alongside the `heartbeat`
nonce.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31897#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list