[wp-trac] [WordPress Trac] #43941: Add default value to register meta
WordPress Trac
noreply at wordpress.org
Thu Jul 16 18:15:05 UTC 2020
#43941: Add default value to register meta
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner:
| TimothyBlynJacobs
Type: enhancement | Status: reopened
Priority: normal | Milestone: 5.5
Component: Options, Meta APIs | Version: 4.6
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs-dev- | Focuses: rest-api
note |
-------------------------------------------------+-------------------------
Comment (by TimothyBlynJacobs):
Looking at the `$object_id` and `$single` parameters, while they are
listed as optional in the function signature, they don't actually seem to
be optional to me.
The `$object_id` parameter is needed to retrieve the subtype for an
object. So omitting it wouldn't allow you to get the correct value for any
of the built-in types.
The `$single` parameter defaults to `false`, but it isn't actually
optional.
So it seems like we could safely make all those parameters optional and
then match the order of the other functions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43941#comment:86>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list