Non-images don't have alternative text. props helenyhou. see #21391.

git-svn-id: http://core.svn.wordpress.org/trunk@22748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-21 12:03:35 +00:00
parent 8f3a9e1907
commit 9ad10730c0

View File

@ -2280,13 +2280,14 @@ function edit_form_image_editor() {
<label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br />
<textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea>
</p>
<?php if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) : ?>
<p>
<label for="attachment_alt"><strong><?php _e( 'Alternative Text' ); ?></strong></label><br />
<input type="text" class="widefat" name="_wp_attachment_image_alt" id="attachment_alt" value="<?php echo esc_attr( $alt_text ); ?>" />
</p>
</div>
<?php
// need a filter on this content
endif;
}
/**