Make WordPress Core

Opened 6 months ago

Last modified 6 months ago

#63685 new enhancement

"pre_add_option" hook missing

Reported by: kkmuffme's profile kkmuffme Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version:
Component: Options, Meta APIs Keywords: has-patch dev-feedback changes-requested
Focuses: Cc:

Description

There's a "pre_add_site_option_" (and a "pre_update_") apply_filters, but no "pre_add_option_" hook

Since there recently was some discussion about adding one for "delete" too https://core.trac.wordpress.org/ticket/44042 I guess it would make sense to also add the hook for "add".

This would also ensure the commonly used "workaround" (where "pre_update_" is filtered) of using delete_option => add_option can be prevented.

Change History (3)

This ticket was mentioned in PR #9239 on WordPress/wordpress-develop by @nikunj8866.


6 months ago
#1

  • Keywords has-patch added

#2 @nikunj8866
6 months ago

  • Keywords dev-feedback added

#3 @mukesh27
6 months ago

  • Keywords changes-requested added
Note: See TracTickets for help on using tickets.