New answers tagged theme-customizer
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',
'...
- 463
Top 50 recent answers are included
Related Tags
theme-customizer × 914theme-development × 210
themes × 94
customization × 91
php × 81
javascript × 70
theme-options × 52
functions × 46
widgets × 36
child-theme × 35
get-theme-mod × 33
css × 32
api × 31
jquery × 29
plugins × 28
plugin-development × 22
images × 21
menus × 21
settings-api × 17
ajax × 15
options × 15
sanitization × 14
color-picker × 11
wp-admin × 10
custom-background × 10