Allow Deletion of Media Alt text. Props reaperhulk. Fixes #11805

git-svn-id: https://develop.svn.wordpress.org/trunk@13283 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-02-21 11:21:32 +00:00
parent 3e2114eb0f
commit 4df0240736

View File

@ -422,7 +422,7 @@ function media_upload_form_handler() {
$post = apply_filters('attachment_fields_to_save', $post, $attachment);
if ( isset($attachment['image_alt']) && !empty($attachment['image_alt']) ) {
if ( isset($attachment['image_alt']) ) {
$image_alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
if ( $image_alt != stripslashes($attachment['image_alt']) ) {
$image_alt = wp_strip_all_tags( stripslashes($attachment['image_alt']), true );