Use correct variable in wp_ajax_save_attachment(). see #21390.

git-svn-id: http://core.svn.wordpress.org/trunk@22834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-26 02:50:01 +00:00
parent 43587773a5
commit 450b96a773
1 changed files with 1 additions and 1 deletions

View File

@ -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 );