[wp-trac] [WordPress Trac] #22664: attachment_fields_to_save: parameter missing indexes
WordPress Trac
noreply at wordpress.org
Fri Nov 30 23:19:53 UTC 2012
#22664: attachment_fields_to_save: parameter missing indexes
-----------------------------+--------------------------
Reporter: ZaneMatthew | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Media
Version: trunk | Severity: normal
Keywords: needs-patch |
-----------------------------+--------------------------
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] =>
)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22664>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list