WP 3.4 – what action/hook is called when theme customisation is saved?

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.

Read More

if anyone have clues… 🙂

thanks

Related posts

Leave a Reply

1 comment

  1. 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

    customize_save_{$setting_id}
    

    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().