[wp-trac] [WordPress Trac] #43559: wp_ajax_add_meta() does not allow empty values

WordPress Trac noreply at wordpress.org
Sat Mar 17 17:39:29 UTC 2018


#43559: wp_ajax_add_meta() does not allow empty values
--------------------------------------+------------------------------
 Reporter:  charlestonsw              |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Options, Meta APIs        |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-unit-tests has-patch  |     Focuses:  rest-api
--------------------------------------+------------------------------
Changes (by soulseekah):

 * keywords:  reporter-feedback => has-unit-tests has-patch


Comment:

 Apparently, historically the Meta API did not allow empty values to be
 saved (see #11650).

 The current version of WordPress, however, does allow empty values to be
 saved so with a couple of fixes here and there, empty values can now be
 saved. Attached patch with tests. Patch lifts the limitations imposed by
 both `add_meta` and `wp_ajax_add_meta`.

 P.S. It's still unclear why REST has anything to do with it, though. Care
 to clarify?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43559#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list