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()
- Function attached to cron job not running but will run if called manually
- remove_action on after_setup_theme not working from child theme
- Issues with title-tag and document_title_parts
- How do I get the current edit page ID in the admin?
- Remove Actions/Filters added via Anonymous Functions
- Trying to use add_action and do_action with parameters
- Check if post is being published for the first time, or is an already published post being updated
- Import WordPress XML File from Within Functions.php
- Define custom Page Template without its own .php file
- Does hooking into the same action multiple times drain memory?
- How to use the do_action () with parameter
- Perform an action when post is updated/published
- How to influence the information displayed on widget inside wp-admin
- WordPress Theme Update Action?
- Modify Admin Bar Link
- Is there a hook or function I can use to display all theme files being used on a current page?
- Do WordPress’ cron’s clean up expired transients?
- Issue with get_theme_mod returning a blank value instead of the saved value
- add_action in a function, is it possible?
- How to remove row-actions from pages table?
- Is it possible to remove the main rich Text box editor?
- Using a private method as an action callback from within a class
- 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?
- Show modified time if post is actually modified
- why doesnt is_home() work in functions.php
- How can I log a user out of WordPress before the page loads?
- Add admin bar link to edit author
- How to create thumbnails for PDF uploads?
- Using add_filter() in Widgets
- Implementing DNS Prefetching with WordPress
- Help me to understand wp_header() and wp_footer() functions
- In WooCommerce I need to modify the thankyou.php page [closed]
- How can I add an extra WooCommerce hook
- Why get_header() or get_footer() does not run twice if called in the same php file?
- Change meta tags programatically
- Replacing select2 in admin backend for all selects
- Convert hyphen to underscore in permalinks
- Remove Page Title from Static Frontpage
- Using get_terms for custom taxonomy in functions.php
- Fatal error: Call to undefined function add_action() – an untouched problem
- echo or print_r in an admin function
- How to override WordPress registration and insert an auto-generated username?
- Set default options for inserting media
- Change parent theme file function in child themes functions.php
- Can I remove the Rich Text box editor for a specific post?
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- Reuse variable in hook callback
- gform_after_submission content appears immediately after , not in post body [closed]
- How do I change parameters without changing the core
- Call to undefined add_action() in theme’s functions.php
- Is it possible to be more page/post specific with admin_enqueue_script?
- Use latest jQuery in WordPress (admin interface)
- Hooking new functions to actions + passing parameters
- Issue adding text after short description on product pages Woocommerce [closed]
- Customize “the_posts_pagination” and put list instead div
- Filter or action hook to insert content on admin pages before tag
- Automatically Add Specified Value to Attachment Metadata upon Upload
- How to add a column to the Trash page?
- Can’t Update function.php after writing short code
- How to test for Super Admin
- How to update feed only 2-3 times a week (for Feedburner email)?
- Increment price for Woocommerce Minicart [closed]
- how to change link of some wordpress pages
- Gravity Forms field entries into wp_query loop [closed]
- Post thumbnail relative link and HTML modify
- Proper way of using functions in action hook?
- How would go about if I just want a temporary function?
- Passing arguments to my function with do_action and add_action is not working
- Pass parameters to function through an action
- How to preserve edits to Name or Slug of term when using wp_update_term on save?