Changes between Initial Version and Version 1 of Ticket #35316, comment 11
- Timestamp:
- 01/08/2016 03:16:18 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35316, comment 11
initial v1 104 104 105 105 [attachment:35316.patch] encodes the keywords. 106 107 ---- 108 109 Until this gets fixed in core you can use the following function: 110 {{{#!php 111 <?php 112 function trac35316_fix_iptc_keywords_encoding( $meta ) { 113 foreach ( $meta['keywords'] as $key => $keyword ) { 114 if ( ! seems_utf8( $keyword ) ) { 115 $meta['keywords'][ $key ] = utf8_encode( $keyword ); 116 } 117 } 118 119 return $meta; 120 } 121 add_filter( 'wp_read_image_metadata', 'trac35316_fix_iptc_keywords_encoding' ); 122 }}}