[wp-trac] [WordPress Trac] #31225: wp.newPost doesn't save custom fields starting with an underscore
WordPress Trac
noreply at wordpress.org
Wed Feb 4 23:04:31 UTC 2015
#31225: wp.newPost doesn't save custom fields starting with an underscore
--------------------------+------------------------------
Reporter: pcfreak30 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 4.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by redsweater):
Hi pcfreak30 - This is not an issue with the API per se but reflects the
underlying, built-in protection mechanism for metadata fields in
WordPress. By default, any meta field with an underscore prefix is
considered "protected" unless otherwise configured as unprotected.
So for example, a plugin that relies upon underscore-prefixed custom
fields for its data should register a metadata callback with
register_meta() or else e.g. install a filter on the is_protected_meta
filter.
Daniel
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31225#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list