Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#40612 closed enhancement (worksforme)

Add a hook after updating the settings page option

Reported by: dominykasgel's profile dominykasgel Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.4
Component: Options, Meta APIs Keywords:
Focuses: Cc:

Description

I couldn't find a proper way how to hook into WP after updating/saving the settings page option. For example: I have a custom settings page built with register_setting() function and I want to call a custom function once the settings page option has been updated, but there's no action. I think it would be very useful to have this hook.

In my patch, the 'settings_updated' action is triggered right after the settings page option has been updated.

Attachments (1)

options.diff (385 bytes) - added by dominykasgel 8 years ago.
Thisi is a patch for options.php. Includes a hook after saving the settings page option.

Download all attachments as: .zip

Change History (3)

@dominykasgel
8 years ago

Thisi is a patch for options.php. Includes a hook after saving the settings page option.

#1 @dominykasgel
8 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Achieved this with

update_option_{$option}
updated_option

#2 @ocean90
8 years ago

  • Focuses performance removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.