WordPress.org

Make WordPress Core

Ticket #22642: 22642.2.diff

File 22642.2.diff, 1.3 KB (added by nacin, 17 months ago)
  • wp-admin/includes/ajax-actions.php

     
    18991899        if ( 'attachment' != $post['post_type'] ) 
    19001900                wp_send_json_error(); 
    19011901 
     1902        // Handle the description field automatically, if a plugin adds it back. 
     1903        if ( isset( $attachment_data['post_content'] ) ) 
     1904                $post['post_content'] = $attachment_data['post_content']; 
     1905 
    19021906        $post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data ); 
    19031907 
    19041908        if ( isset( $post['errors'] ) ) { 
  • wp-admin/includes/media.php

     
    13251325        $form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post ); 
    13261326 
    13271327        unset( $form_fields['image-size'], $form_fields['align'], $form_fields['image_alt'], 
    1328                 $form_fields['post_title'], $form_fields['post_excerpt'], $form_fields['post_content'], 
     1328                $form_fields['post_title'], $form_fields['post_excerpt'], 
    13291329                $form_fields['url'], $form_fields['menu_order'], $form_fields['image_url'] ); 
    13301330 
    13311331        $media_meta = apply_filters( 'media_meta', '', $post );