#6529 closed enhancement (fixed)
Support emojis
Reported by: | r-a-y | Owned by: | r-a-y |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.3.0 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
WP 4.2 added support for emojis.
However, there is a bug report on the forums saying that adding emojis to an activity update causes an error when posting:
https://buddypress.org/support/topic/wp-does-emoji-bp-does-not/
I haven't looked into this report yet, so I'm leaving this in the "Awaiting Review" milestone for now.
Attachments (4)
Change History (16)
#2
@
9 years ago
- Milestone Awaiting Review deleted
- Status changed from new to closed
- Type changed from defect (bug) to enhancement
Sorry, didn't mean to mark this ticket as a bug!
After looking into the emoji spec, we should get this for free after #6346 is addressed.
Marking as a duplicate.
#3
@
9 years ago
- Keywords dev-feedback added
- Milestone set to 2.5
So I came across a WP function that converts emojis over to HTML encoding.
We should be able to easily support emojis with this:
add_filter( 'bp_activity_content_before_save', 'wp_encode_emoji' );
wp_encode_emoji()
only supports Unicode 7 emojis though, but that's better than nothing! The function is only supported in WP 4.2+, so if we add this to the codebase, we'd have to do a conditional on the WP version.
For now, I'm adding this back to the 2.5 milestone for some feedback.
#5
@
9 years ago
- Keywords has-patch added; needs-testing dev-feedback removed
I think this one is an easy win!
Tested with WP 4.4 and a copy-and-pasted emoji, as well as with WP 3.8 to ensure no notices appear.
#7
@
9 years ago
So... I thought we needed to migrate the tables to utf8mb4. What does that not do if we need to do this for emojis?
#8
@
9 years ago
So... I thought we needed to migrate the tables to utf8mb4. What does that not do if we need to do this for emojis?
See comment:3.
According to the Docblock, wp_encode_emoji()
only supports Unicode-7 emojis. The good news is there are only 37 Unicode-8 emojis:
http://emojipedia.org/unicode-8.0/
However, I did a test of a few Unicode-8 emojis and wp_encode_emoji()
worked for these as well.
I assume the DB upgrade would support all other emojis from Unicode-8.
#9
@
9 years ago
Patch refreshed and now also supports private messages and group descriptions.
I didn't add xprofile support because it could affect display names, so I left that alone.
Don't really think it's a bug, it's not supported yet in BP: #6346