WordPress.org

Make WordPress Core

Ticket #21391: 21391.alt_text.diff

File 21391.alt_text.diff, 837 bytes (added by helenyhou, 17 months ago)
  • wp-admin/includes/media.php

     
    22802280                        <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br /> 
    22812281                        <textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea> 
    22822282                </p> 
     2283<?php if ( substr( $post->post_mime_type, 0, 5 ) == 'image' ) : ?> 
    22832284                <p> 
    22842285                        <label for="attachment_alt"><strong><?php _e( 'Alternative Text' ); ?></strong></label><br /> 
    22852286                        <input type="text" class="widefat" name="_wp_attachment_image_alt" id="attachment_alt" value="<?php echo esc_attr( $alt_text ); ?>" /> 
    22862287                </p> 
    22872288        </div> 
    2288         <?php 
    2289         // need a filter on this content 
     2289<?php 
     2290        endif; 
    22902291} 
    22912292 
    22922293/**