| @@ 30-35 (lines=6) @@ | ||
| 27 | public function fuzzy_image_meta() { |
|
| 28 | $meta = wp_get_attachment_metadata( $this->image->ID ); |
|
| 29 | $img_meta = ( ! empty( $meta['image_meta'] ) ) ? (array) $meta['image_meta'] : array(); |
|
| 30 | if ( ! empty( $img_meta ) ) { |
|
| 31 | foreach ( $img_meta as $k => $v ) { |
|
| 32 | if ( 'latitude' == $k || 'longitude' == $k ) |
|
| 33 | unset( $img_meta[$k] ); |
|
| 34 | } |
|
| 35 | } |
|
| 36 | ||
| 37 | return $img_meta; |
|
| 38 | } |
|
| @@ 405-411 (lines=7) @@ | ||
| 402 | $attachment_title = wptexturize( $attachment->post_title ); |
|
| 403 | $attachment_desc = wpautop( wptexturize( $attachment->post_content ) ); |
|
| 404 | // Not yet providing geo-data, need to "fuzzify" for privacy. |
|
| 405 | if ( ! empty( $img_meta ) ) { |
|
| 406 | foreach ( $img_meta as $k => $v ) { |
|
| 407 | if ( 'latitude' === $k || 'longitude' === $k ) { |
|
| 408 | unset( $img_meta[ $k ] ); |
|
| 409 | } |
|
| 410 | } |
|
| 411 | } |
|
| 412 | // See https://github.com/Automattic/jetpack/issues/2765 . |
|
| 413 | if ( isset( $img_meta['keywords'] ) ) { |
|
| 414 | unset( $img_meta['keywords'] ); |
|