Opened 6 months ago
Last modified 6 months ago
#22664 closed defect (bug)
attachment_fields_to_save: parameter missing indexes — at Initial Version
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 3.5 |
| Severity: | normal | Keywords: | |
| Cc: | info@… |
Description
When using the hook "attachment_fields_to_save " the second parameter ($attachments) no longer has the same indexes at it does on WordPress' stable release.
You can reproduce with the following, make a plugin and drop this in then upload an attachment and click "save".
function my_func( $post, $attachment ){
print '<pre>';
print_r( $attachment );
print '</pre>';
die();
}
add_action('attachment_fields_to_save', 'my_func');
Stable WordPress produces this:
Array (
[menu_order] => 0
[post_title] =>
[image_alt] =>
[post_excerpt] =>
[post_content] =>
[url] =>
)
Note: See
TracTickets for help on using
tickets.
