New answers tagged

2 votes
Accepted

Execute javscript when theme customizer loads (autosave issue)

In the JavaScript CODE below: ( function( wp, $ ) { function bob() { alert('bob'); } // Etc } )( wp, jQuery ); bob function is scoped only within this block: ( function( wp, $ ) {...
  • 7,904
1 vote

What is a suitable sanitize_callback for logo image in Customizer?

A good image file sanitizer example: function ic_sanitize_image( $file, $setting ) { $mimes = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'gif' => 'image/gif', '...

Top 50 recent answers are included