diff --git src/wp-includes/default-filters.php src/wp-includes/default-filters.php
index 9212e42865..842b0b9eaf 100644
|
|
add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop() |
456 | 456 | // Media |
457 | 457 | add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' ); |
458 | 458 | add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' ); |
| 459 | add_filter( 'wp_update_attachment_metadata', '_remove_attachment_image_metadata' ); |
459 | 460 | |
460 | 461 | // Nav menu |
461 | 462 | add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 ); |
diff --git src/wp-includes/media.php src/wp-includes/media.php
index 76cc0c11c9..eb4d64c91f 100644
|
|
function wpview_media_sandbox_styles() { |
3950 | 3950 | |
3951 | 3951 | return array( $mediaelement, $wpmediaelement ); |
3952 | 3952 | } |
| 3953 | |
| 3954 | /** |
| 3955 | * Removes empty additional EXIF/IPTC data from attachment metadata. |
| 3956 | * |
| 3957 | * @return array of updated attachment meta data. |
| 3958 | */ |
| 3959 | function _remove_attachment_image_metadata( $data ) { |
| 3960 | |
| 3961 | if ( empty( $data['image_meta'] ) |
| 3962 | return $data; |
| 3963 | |
| 3964 | // Default EXIF/IPTC meta keys |
| 3965 | $meta = array( |
| 3966 | 'aperture' => 0, |
| 3967 | 'credit' => '', |
| 3968 | 'camera' => '', |
| 3969 | 'caption' => '', |
| 3970 | 'created_timestamp' => 0, |
| 3971 | 'copyright' => '', |
| 3972 | 'focal_length' => 0, |
| 3973 | 'iso' => 0, |
| 3974 | 'shutter_speed' => 0, |
| 3975 | 'title' => '', |
| 3976 | 'orientation' => 0, |
| 3977 | 'keywords' => array(), |
| 3978 | ); |
| 3979 | |
| 3980 | foreach ( $meta as $key => $value ) { |
| 3981 | if ( isset( $data['image_meta'][$key] ) && $value == $data['image_meta'][$key] ) { |
| 3982 | unset( $data['image_meta'][$key] ); |
| 3983 | } |
| 3984 | } |
| 3985 | |
| 3986 | return $data; |
| 3987 | } |