Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#43062 closed enhancement (invalid)

Filter for invidiual emoji srcs

Reported by: strarsis Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.1
Component: Emoji Keywords: reporter-feedback close
Focuses: Cc:


Currently it is not possible to filter/change the src of individual emoji (e.g. changing a set of smileys from within a theme). – Only the complete URL can be changed (for CDN).

Change History (3)

#1 @dd32
2 years ago

  • Keywords reporter-feedback close added

@strarsis What would be the use-case of changing it exactly?

We use Twemoji as a filler only, ie. if the browser supports emoji correctly, we use the native emojis, if the browser doesn't, then we fallback to using Twemoji for the (sub-set?) emojis that the browser doesn't natively support.

Filtering individual emoji's would require changing how Twemoji works and allowing for forcing emoji replacement to be run even when the browser fully supports them.

#2 @strarsis
2 years ago

@dd32: Example/my use case: A theme should take control over a specific emoji,
in this case the phone emoji.
It should be of different color/design to fit into the theme.
Using this mechanism the theme can take control over the appearance of emojis, too.

#3 @dd32
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Thanks @strarsis.

In this case I'm still going to close this as invalid though.
My reasoning is:

  • WordPress doesn't supply the emoji's, we use a 3rd party script which does the transfomations - We allow changing the CDN those images are pulled from though.
  • Emoji's are only replaced with images when the browser doesn't natively support it
  • If you want to recolour emoji's for the theme, that's not really supported by emojis at present (in general, not just in WordPress).
  • The best way to achieve this would be a content filter to replace the Telephone emoji with your image as a transformation before the page is rendered (instead of afterwards)
Note: See TracTickets for help on using tickets.