Opened 12 years ago
Closed 12 years ago
#22769 closed defect (bug) (fixed)
Hidden fields via attachment_fields_to_edit are missing
Reported by: | nacin | Owned by: | koopersmith |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
They were kept separate to be rendered separately, but they never made it there. They should be placed into the chunk of HTML as before.
Attachments (1)
Change History (8)
#2
@
12 years ago
Test code:
add_filter( 'attachment_fields_to_edit', function( $fields ) { $fields['hidden_field_name'] = array( 'input' => 'hidden', 'value' => 'value of field' ); return $fields; } );
#4
@
12 years ago
- Owner set to koopersmith
- Resolution set to fixed
- Status changed from new to closed
In 23086:
#5
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks for fixing this so quickly and I'm sorry I wasn't able to check it sooner, but the hidden fields don't have IDs anymore, they only have names. Previous versions had matching IDs and names.
#6
@
12 years ago
The IDs weren't exactly valid, since they had brackets in them accidentally.
I don't see this as an issue. A hidden field is good for its name and value, not its ID. If you were doing crazy manipulation on the fly via JS, that JS would no longer be loaded in the two instances of attachment_fields_to_edit, anyway — the new modal and post.php for attachments, versus the old media-upload.php script.
Tested. Properly prints it on post.php. The dialog properly sends it back to the save-attachment-compat handler.