Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#22664 closed defect (bug)

attachment_fields_to_save: parameter missing indexes — at Initial Version

Reported by: ZaneMatthew Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords:
Focuses: Cc:


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] =>


Change History (0)

Note: See TracTickets for help on using tickets.