@@ 702-705 (lines=4) @@ | ||
699 | if ( $post != $_post ) |
|
700 | wp_update_post($post); |
|
701 | ||
702 | foreach ( get_attachment_taxonomies($post) as $t ) { |
|
703 | if ( isset($attachment[$t]) ) |
|
704 | wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); |
|
705 | } |
|
706 | } |
|
707 | ||
708 | if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?> |
@@ 2595-2598 (lines=4) @@ | ||
2592 | ||
2593 | wp_update_post( $post ); |
|
2594 | ||
2595 | foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) { |
|
2596 | if ( isset( $attachment_data[ $taxonomy ] ) ) |
|
2597 | wp_set_object_terms( $id, array_map( 'trim', preg_split( '/,+/', $attachment_data[ $taxonomy ] ) ), $taxonomy, false ); |
|
2598 | } |
|
2599 | ||
2600 | if ( ! $attachment = wp_prepare_attachment_for_js( $id ) ) |
|
2601 | wp_send_json_error(); |