Repository navigation
Conversation
Every front-end and admin page carries WordPress's emoji detection script. When the browser cannot draw an emoji on the page (flags on Windows, or a newer emoji on an older system), it swaps the character for an image from s.w.org, which sends the visitor's IP to a third party. A privacy review flagged this as needing consent and recommended that themes disable it. The suggested one-liner removes only the front-end detection script. This also removes the admin and embed copies, the emoji styles, and the feed and email filters that rewrite emoji into s.w.org image tags, so nothing emoji-related reaches wordpress.org. The admin hooks are added after init, so the same function also runs on admin_init. The visible cost: flag emoji show as two letters on Windows browsers. None of the removed hooks are on the theme review team's list of hooks a theme must not deregister.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WordPress adds an emoji script to every page. When a browser can't draw an emoji itself, the script swaps in an image from wordpress.org, which sends the visitor's IP there without consent. Modern browsers draw emoji on their own, so this turns the script off, along with the matching styles and the step that turns emoji in RSS feeds and emails into wordpress.org images.