Changeset 29104 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 07/11/2014 08:54:13 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ajax-actions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r29037 r29104 2219 2219 } 2220 2220 2221 if ( 0 === strpos( $post['post_mime_type'], 'audio/' ) ) { 2222 $changed = false; 2223 $id3data = wp_get_attachment_metadata( $post['ID'] ); 2224 if ( ! is_array( $id3data ) ) { 2225 $changed = true; 2226 $id3data = array(); 2227 } 2228 foreach ( wp_get_attachment_id3_keys( (object) $post, 'edit' ) as $key => $label ) { 2229 if ( isset( $changes[ $key ] ) ) { 2230 $changed = true; 2231 $id3data[ $key ] = sanitize_text_field( wp_unslash( $changes[ $key ] ) ); 2232 } 2233 } 2234 2235 if ( $changed ) { 2236 wp_update_attachment_metadata( $id, $id3data ); 2237 } 2238 } 2239 2221 2240 wp_update_post( $post ); 2222 2241 wp_send_json_success();
Note: See TracChangeset
for help on using the changeset viewer.