| @@ 437-442 (lines=6) @@ | ||
| 434 | $attachment_title = wptexturize( $attachment->post_title ); |
|
| 435 | $attachment_desc = wpautop( wptexturize( $attachment->post_content ) ); |
|
| 436 | // Not yet providing geo-data, need to "fuzzify" for privacy |
|
| 437 | if ( ! empty( $img_meta ) ) { |
|
| 438 | foreach ( $img_meta as $k => $v ) { |
|
| 439 | if ( 'latitude' == $k || 'longitude' == $k ) |
|
| 440 | unset( $img_meta[$k] ); |
|
| 441 | } |
|
| 442 | } |
|
| 443 | ||
| 444 | // See https://github.com/Automattic/jetpack/issues/2765 |
|
| 445 | if ( isset( $img_meta['keywords'] ) ) { |
|
| @@ 43-48 (lines=6) @@ | ||
| 40 | public function fuzzy_image_meta() { |
|
| 41 | $meta = wp_get_attachment_metadata( $this->image->ID ); |
|
| 42 | $img_meta = ( ! empty( $meta['image_meta'] ) ) ? (array) $meta['image_meta'] : array(); |
|
| 43 | if ( ! empty( $img_meta ) ) { |
|
| 44 | foreach ( $img_meta as $k => $v ) { |
|
| 45 | if ( 'latitude' == $k || 'longitude' == $k ) |
|
| 46 | unset( $img_meta[$k] ); |
|
| 47 | } |
|
| 48 | } |
|
| 49 | ||
| 50 | return $img_meta; |
|
| 51 | } |
|