[wp-trac] [WordPress Trac] #63685: "pre_add_option" hook missing
WordPress Trac
noreply at wordpress.org
Fri Jul 11 02:32:45 UTC 2025
#63685: "pre_add_option" hook missing
--------------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: minor | Keywords:
Focuses: |
--------------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63685>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list