From 1b8e6d9ac6ea560b93107ea88e933f8a951efaf9 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 26 Nov 2012 02:50:01 +0000 Subject: [PATCH] Use correct variable in wp_ajax_save_attachment(). see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22834 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ajax-actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index d752624923..7580f65bf4 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1850,7 +1850,7 @@ function wp_ajax_save_attachment() { $post['post_excerpt'] = $changes['caption']; if ( isset( $changes['alt'] ) ) { - $alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ); + $alt = get_post_meta( $id, '_wp_attachment_image_alt', true ); $new_alt = stripslashes( $changes['alt'] ); if ( $alt != $new_alt ) { $new_alt = wp_strip_all_tags( $new_alt, true );