1

I want to intercept plugin changes, but no action hook listed in the Action Reference seems to do it. I tried after_switch_theme which is triggered only after changing from one theme to another, and load_themes.php which is triggered when entering the "Appearance" page with the list of currently installed plugins.

Which action will be triggered after configuring a theme in customizer? Which action will be triggered when a file of a child theme is modified? Which action will be triggered when a theme was updated to a newer version?

1
  • What are you ultimately trying to achieve? There might be a better approach. – Jacob Peattie Feb 21 '20 at 0:06
3

Anytime changes are saved in the Customizer, there is a customize_save_after hook.

For theme updates, you can use the upgrader_process_complete hook - you pass it various arguments including 'type' => 'theme'.

I don't think there are any WordPress-specific hooks for when files of a child theme are modified. This typically happens via FTP, rather than wp-admin, so it wouldn't have any hooks. You could possibly write something yourself to check the server's modified timestamp on all the theme files, but that might be fairly server-intensive to check frequently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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