WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 months ago

#37245 closed feature request (fixed)

New action hook for register_setting

Reported by: Pionect Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 2.7
Component: Options, Meta APIs Keywords: has-patch
Focuses: administration Cc:

Description

I'm building a plugin which keeps track of all the changes made to options.
It's working but I'd like to hook into the register_setting function so I can use backtrace and figure out what plugin matches with a certain setting.
So my request is simply to have an action hook in the register_setting function from wp-include/plugin.php

Attachments (1)

37245.diff (1.8 KB) - added by Howdy_McGee 8 months ago.
Provides 2 new action hooks: register_setting and unregister_setting both fire near the end of the function process.

Download all attachments as: .zip

Change History (6)

#1 @desrosj
18 months ago

  • Focuses administration added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 4.5.3 to 2.7

Hi @Pionect,

Thanks for this ticket, and welcome to Trac! My apologies that it took so long to receive a response.

Your request seems reasonable. Are you able to take a first pass at a patch?

@Howdy_McGee
8 months ago

Provides 2 new action hooks: register_setting and unregister_setting both fire near the end of the function process.

#2 @Howdy_McGee
8 months ago

  • Keywords has-patch added; needs-patch removed

This ticket was mentioned in Slack in #core by howdy_mcgee. View the logs.


7 months ago

#4 @SergeyBiryukov
7 months ago

  • Milestone changed from Future Release to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#5 @SergeyBiryukov
4 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48321:

Options, Meta APIs: Introduce register_setting and unregister_setting actions.

Props Howdy_McGee, Pionect.
Fixes #37245.

Note: See TracTickets for help on using tickets.