[wp-trac] [WordPress Trac] #28053: Fields with same name added to new media modal using 'attachment_fields_to_edit' do not pass as an array when saving.
WordPress Trac
noreply at wordpress.org
Mon Apr 28 13:40:44 UTC 2014
#28053: Fields with same name added to new media modal using
'attachment_fields_to_edit' do not pass as an array when saving.
--------------------------+-----------------------------------------
Reporter: husobj | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.9
Severity: normal | Resolution:
Keywords: | Focuses: javascript, administration
--------------------------+-----------------------------------------
Comment (by husobj):
Updated patch checks for fields intended to be arrays be checking their
name ends in "[]" e.g. "myfield[]"
These are then concatenated into a comma separated value with field name
"myfield" (without the square brackets) which is the same format in which
taxonomy terms are handles when currently associating taxonomies with
attachments.
Works for the development I'm doing building a better taxonomy UI for the
media modal but obviously wouldn't handle field values that contain commas
(which should not be an issue for terms).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28053#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list