Skip to main content
8 events
when toggle format what by license comment
Nov 26, 2022 at 15:06 comment added noahmason Is there any workaround for showing the preview for items that are added in the customizer before they are saved (those with a placeholder negative post ID)? I understand the caveat, but there must be some trickery that can be implemented even in pure javascript?
Aug 23, 2020 at 15:23 comment added helgatheviking Thanks for the clarification! I thought there were some modern features as my JS linter was yelling at me. :)
Aug 23, 2020 at 4:41 comment added Weston Ruter 2. It can be served as-is, although there are some “modern” JS features which I've used like arrow functions which won't work in IE11. So you can transpile it with Babel if you want to maximize compatibility with older browsers. Or you can eliminate the use of those modern syntax features.
Aug 23, 2020 at 4:39 comment added Weston Ruter 1. It would be instead of using wp_nav_menu_item_custom_fields_customize_template to add the fields via Mustache templating, and then most of the logic in extendControl would be replaced with just adding a div to the container in the desired place, and then re-render when a change to the setting happens. But nevertheless, React is not used anywhere else in the Customizer currently, so using React is not necessary.
Aug 22, 2020 at 13:42 comment added helgatheviking Thanks so much Weston! A couple of follow up questions... 1 when you say the binding could be React ... you mean this part? control.authFieldset.find( 'input' ).on( 'click', function () { and 2. Does this script (As is) need to be transpiled or can it be served as is?
Aug 16, 2020 at 15:38 history bounty ended helgatheviking
Aug 16, 2020 at 15:38 vote accept helgatheviking
Aug 16, 2020 at 5:16 history answered Weston Ruter CC BY-SA 4.0