I’m trying to add Chosen.jquery to the WP Customize options panel, so I can have an autocomplete box there. Is there any way I can do that? I tried with admin_init, admin_footer and admin_print_footer_scripts actions, but none seems to work inside of the Customizer.
Any thoughts?
Use the action
customize_controls_enqueue_scripts
:To add inline scripts in the header, use the action
customize_controls_print_scripts
.See
wp-admin/customize.php
for details.That was bug in core, fixed in #27619, now you can just use
admin_print_footer_scripts
for example.