WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm looking for the action/hook called when saving theme customs colors in the new admin interface?

i need to call a custom function to save a set of php generated images.

if anyone have clues... :)


share|improve this question
The customize_save action in wp-includes/class-wp-customize-manager.php might be what you're looking for. Although I was able to save arbitrary data to the DB on that hook when clicking save in the customizer, I wasn't able to get at any of the actual fields in the customizer. I'm curious about that too. – goto10 Jul 6 '12 at 14:24
up vote 2 down vote accepted

The settings are saved via ajax, with the action customize_save. In the wp-includes/class-wp-customize-manager.php class, the callback for this ajax method is the save method (see source)

This triggers the customize_save action, prior to updating each of the settings.

Each setting is actually an instance of the class WP_Customize_Setting and saving the setting triggers the action


if you wanted to trigger the action when a particular setting is saved (unfortunately there's no filter).

The save method calls the update method, which behaves different depending on whether the settings is a 'theme_mod' or 'option'. Regardless they are both saved using update_option (and so passed through the appropriate filters). The former is done so via set_theme_mod().

share|improve this answer
many thanks i will try this path :) – Tribalpixel Jul 11 '12 at 14:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.