Here is the solution:
update_option_{option_name}: Runs after the option with name “option_name” has been updated. For example, for the option with name “foo”:
add_action('update_option_foo', 'my_custom_function', 10, 2);
update_option: Runs before an option gets updated. Example:
add_action('update_option', 'my_custom_function', 10, 3);
updated_option: Runs after an an option has been updated. Example:
add_action('updated_option', 'my_custom_function', 10, 3);
Related Posts:
- Extract image from content and set it as the featured image
- Add action hook conditionally – only when home.php in use
- How can I tell if I’m on a login page? [duplicate]
- How to hook into the quick edit action?
- WooCommerce add_action hook results in 500 error
- Accepted arguments value in hook functions
- How to select a page within admin?
- Which action hook to use for function?
- Modify a function without editing template
- Don’t delete a page if it holds users
- Which action does wp_update_user triggers?
- How can I get my Script to work on the Login page?
- jQuery does not work
- Override the WordPress core function wp_referer_field
- Is there a way to prevent a function/method from being called outside a specific hook?
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- WordPress wraps span tags into p tags
- Changing where my author box is printed
- Insert Content Before div#main from the functions.php File
- Replace admin header logo with an image
- Does hook have an effect on increasing the page load?
- Save_post – Warning: Cannot modify header information
- What is the earliest Hook a Script can use?
- How Do I Unhook This Parent Theme Function?
- WordPress hooks to call a function inside a construct
- function to return comma separated list of meta values
- delete_term is not working properly with add_action()
- How do I get the current edit page ID in the admin?
- Does hooking into the same action multiple times drain memory?
- How to use the do_action () with parameter
- Refresh page after form action
- How to restrict actions and filters “properly” by conditions
- How to count number of functions attached to an action hook?
- How to create thumbnails for PDF uploads?
- Using get_terms for custom taxonomy in functions.php
- Can I remove the Rich Text box editor for a specific post?
- Call to undefined add_action() in theme’s functions.php
- Is it possible to be more page/post specific with admin_enqueue_script?
- Issue adding text after short description on product pages Woocommerce [closed]
- Customize “the_posts_pagination” and put list instead div
- Can’t Update function.php after writing short code
- How to manage arrays from custom functions stored in functions.php?
- Change Admin Bar “Visit Site” URL
- How do I pass arguments for multiple functions hooked to a single action?
- Gravity Forms – Using a Form to Pre-populate A Gravity Form [closed]
- Running a script before absolutely everything
- Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘greenday_head’ not found or invalid function name
- Hard-coding custom menu elements for menu manager
- How to make custom column Admin>Users sortable?
- Execute a ultimate member action when user role is updated
- How to use wp_trash_post (or wp_delete_post) for deleting a (or all) post(s) from custom post type?
- How to display message (with switch_theme hook) after deactivating My theme?
- Difference b/w Simple function call & do_action call
- Hook into a function without a hook?
- Set Taxonomy based on post status
- add_action template_redirect not working for home page
- Filter yoast canonical add_action priority [closed]
- AMP – Change rel=”canonical” from functions.php [closed]
- Use remove_meta_box conditionally on custom post type
- How do I hook into the container of wp_nav_menu?
- Remove links from the_content when using filters wp_trim_excerpt
- Missing argument for the function
- Function not working inside of a function in functions.php
- Init action and refresh page after form action
- This code works, but the way I integrated it is breaking the media uploader. How can I integrate it properly?
- what is best way to keep track of changes made in wordpress website? [closed]
- Add Adsense code between job listings – wp job manager plugin
- How to pass hook variable to function?
- Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?
- How do I find the code executed when wp_head() is called?
- WordPress comment processing . Default unapproved comments detection before posting
- Can we change the hook firing sequence?
- How to display my comment count in the wordpress admin bar?
- How to Override Page Template if URL matches query?
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- If has action not working as expected
- custom error message for empty username and password using authenticate filter not working
- Modifying a WordPress Plugin
- Get post_author email for Zapier Integration
- Postback redirect through add_action is not triggered
- Remove action hook from Class, understanding OOP
- Hook into all password resets in WordPress and get password before hashing?
- How to change form action of wp-login page with a function
- How can I stop the hook from breaking the login/logout function?
- WordPress undefined function error on using add_action() in functions.php
- How to echo the translated custom field?
- Pass arguments to function class with do_action()
- What add_action reference should I be using or should I use do_action?
- Function the_content
- WordPress HTML Helper
- save_post hook – headers already sent?
- Getting error while trying to use custom comment function
- Settings in functions.php used by a plugin
- Add custom fields after post/page title
- Force resize for all video content
- Unhook the comment form in Buddypress
- add query string to all pages after user logged in
- Is there a hook that I can use when a fatal error occurs?
- How to get variable from other function inside class function using add_action for Ajax call