Ticket #22642: 22642.3.diff
| File 22642.3.diff, 2.1 KB (added by , 13 years ago) |
|---|
-
wp-includes/media.php
1388 1388 } 1389 1389 1390 1390 if ( function_exists('get_compat_media_markup') ) 1391 $response['compat'] = get_compat_media_markup( $attachment->ID, array( 'taxonomies' => true ) );1391 $response['compat'] = get_compat_media_markup( $attachment->ID, array( 'taxonomies' => true, 'description' => true ) ); 1392 1392 1393 1393 return apply_filters( 'wp_prepare_attachment_for_js', $response, $attachment, $meta ); 1394 1394 } -
wp-admin/includes/ajax-actions.php
1899 1899 if ( 'attachment' != $post['post_type'] ) 1900 1900 wp_send_json_error(); 1901 1901 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 1902 1906 $post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data ); 1903 1907 1904 1908 if ( isset( $post['errors'] ) ) { -
wp-admin/includes/media.php
1287 1287 $default_args = array( 1288 1288 'errors' => null, 1289 1289 'taxonomies' => false, 1290 'description' => false, 1290 1291 ); 1291 1292 1292 1293 $args = wp_parse_args( $args, $default_args ); … … 1325 1326 $form_fields = apply_filters( 'attachment_fields_to_edit', $form_fields, $post ); 1326 1327 1327 1328 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'],1329 $form_fields['post_title'], $form_fields['post_excerpt'], 1329 1330 $form_fields['url'], $form_fields['menu_order'], $form_fields['image_url'] ); 1330 1331 1332 if ( ! $args['description'] ) 1333 unset( $form_fields['post_content'] ); 1334 1331 1335 $media_meta = apply_filters( 'media_meta', '', $post ); 1332 1336 1333 1337 $defaults = array(