'post_mime_type',
'guid'
);
$emoji_fields = array
( 'post_title', 'post_content', 'post_excerpt'
);
foreach ( $emoji_fields as $emoji_field ) { if ( isset( $data[ $emoji_field ] ) ) { $charset =
$wpdb->
get_col_charset( $wpdb->posts,
$emoji_field );
if ( 'utf8' ===
$charset ) { $data[ $emoji_field ] =
wp_encode_emoji( $data[ $emoji_field ] );
} } } if ( 'attachment' ===
$post_type ) { /**
* Filters attachment post data before it is updated in or added to the database.
*
* @since 3.9.0
* @since 5.4.1 The `$unsanitized_postarr` parameter was added.
* @since 6.0.0 The `$update` parameter was added.
*
* @param array $data An array of slashed, sanitized, and processed attachment post data.
* @param array $postarr An array of slashed and sanitized attachment post data, but not processed.
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data
* as originally passed to wp_insert_post().
* @param bool $update Whether this is an existing attachment post being updated.
*/