Make WordPress Core


Ignore:
Timestamp:
11/05/2012 02:04:22 PM (12 years ago)
Author:
ryan
Message:

Attachment editor improvements. Put the non-editable metadata into the submit/publish box.

Props helenyhou
see #21391

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/meta-boxes.php

    r22321 r22364  
    303303 * @param object $post
    304304 */
    305 function attachment_data_meta_box( $post ) {
    306     $alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
     305function attachment_content_meta_box( $post ) {
    307306    $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' );
    308307    $editor_args = array(
     
    317316    <label class="screen-reader-text" for="content"><strong><?php _e( 'Attachment Page Content' ); ?></strong></label>
    318317    <?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
    319 </p>
    320 
    321 <p>
    322     <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br />
    323     <textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea>
    324 </p>
    325 <p>
    326     <label for="attachment_alt"><strong><?php _e( 'Alternative Text' ); ?></strong></label><br />
    327     <input type="text" class="widefat" name="_wp_attachment_image_alt" id="attachment_alt" value="<?php echo esc_attr( $alt_text ); ?>" />
    328318</p>
    329319<?php
Note: See TracChangeset for help on using the changeset viewer.