WPTavern: New WordPress Plugin Serves Pre-Compressed Emoji

compressed-emoji

WordPress emoji are served from s.w.org, but they are not compressed. This impacts the SVG loading time, depending on how many emoji you are using, and can even throw warnings on Google’s PageSpeed Insights tool. Turkey-based WordPress developer Mustafa Uysal has just released Compressed Emoji, a plugin that makes use of the emoji_svg_url filter introduced in 4.6. This filter allows developers to change the URL for where emoji SVG images are hosted.

When the plugin is activated, the compression offers savings in the range of 3kb ~ 1.3kb (roughly %60) per emoji.

emoji-compressed-comparison

Uysal said he hopes WordPress.org will consider compressing emoji in the future, especially since approximately 10% of the web is using WordPress 4.6. Compressing emoji is a small way to speed up a sizeable chunk of the web. A ticket was created on Trac four months ago, requesting cache headers for emoji files and compression. According to Gary Pendergast, the change is something that can be made outside of the WordPress core development cycle, so he closed the ticket and passed the suggestion on to the Systems team. Cache headers were added by the team, but compression was not implemented in that update.

“The current plan is to move everything to a new CDN,” Gary Pendergast reported after chatting with the Systems team. “The current CDN is a bit outdated – they don’t support HTTP/2, for example. They need to do some more testing, but it’s high on the todo list.”

In the meantime, users who want compressed emoji can use Uysal’s plugin. It compressed the files using SVGO, an open source Node.js-based tool for optimizing SVG vector graphics files. The tool removes unnecessary things like metadata, comments, hidden elements, and default or non-optimal values from the SVG files without affecting their rendering. Another advantage is it doesn’t require an internet connection for those who are developing locally.

Compressed Emoji is available in the WordPress plugin directory and is also open for contributions on GitHub.


Source: planet

Dev Blog: WordPress 4.7 Beta 3

WordPress 4.7 Beta 3 is now available!

This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site just to play with the new version. To test WordPress 4.7, try the WordPress Beta Tester plugin (you’ll want “bleeding edge nightlies”). Or you can download the beta here (zip).

For more information on what’s new in 4.7, check out the Beta 1 and Beta 2 blog posts, along with in-depth field guides on make/core. Some of the changes in Beta 3 include:

  • REST API: The unfiltered_html capability is now respected and rest_base has been added to response objects of wp/v2/taxonomies and wp/v2/types, while get_allowed_query_vars() and the rest_get_post filter have been removed.
  • Roles/Capabilities: Added meta-caps for comment, term, and user meta, which are currently only used in the REST API.
  • I18N: Added the ability to change user’s locale back to site’s locale. (#38632)
  • Custom CSS: Renamed the unfiltered_css meta capability to edit_css and added revisions support to the custom_css post type.
  • Edit shortcuts: Theme authors should take a look at the developer guide to the customizer preview’s visible edit shortcuts and update their themes to take advantage of them if not already implementing selective refresh.
  • Various bug fixes: We’ve made over 50 changes in the last week.

Do you speak a language other than English? Help us translate WordPress into more than 100 languages!

If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you! If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.

Building the future
A global community
Stronger together


Source: planet