[wp-trac] [WordPress Trac] #37928: add `pre_add_option` filter
WordPress Trac
noreply at wordpress.org
Sat Sep 3 07:26:36 UTC 2016
#37928: add `pre_add_option` filter
--------------------------------+------------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------------+------------------------------
Comment (by flixos90):
[attachment:37928.diff] is a first take on introducing the filter. I used
`null` as a return value to skip since `null` is very unlikely to be
stored as option. However, it is not a perfect solution I think. I was
wondering whether it might make sense to declare a `WP_DEFAULT_VALUE`
constant, fill it with some random value, and use that in such cases.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37928#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list