How does WordPress’s `WP_Customize_Manager` handle settings that use `postMessage` transport?

WordPress Expert Medium

WordPress Expert — Medium

How does WordPress’s `WP_Customize_Manager` handle settings that use `postMessage` transport?

Key points

  • `WP_Customize_Manager` utilizes postMessage transport for setting changes
  • JavaScript on the preview frame listens for postMessage events
  • Theme must implement customize_preview_init JS to apply setting changes to the DOM
  • No page reload is needed for setting changes to take effect

Ready to go further?

Related questions