mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Introduce API to add back the description field in the new media popup.
Props nacin fixes #22642 git-svn-id: https://develop.svn.wordpress.org/trunk@22929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1899,6 +1899,10 @@ function wp_ajax_save_attachment_compat() {
|
||||
if ( 'attachment' != $post['post_type'] )
|
||||
wp_send_json_error();
|
||||
|
||||
// Handle the description field automatically, if a plugin adds it back.
|
||||
if ( isset( $attachment_data['post_content'] ) )
|
||||
$post['post_content'] = $attachment_data['post_content'];
|
||||
|
||||
$post = apply_filters( 'attachment_fields_to_save', $post, $attachment_data );
|
||||
|
||||
if ( isset( $post['errors'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user