What’s Coming In WordPress 4.7?

What’s Coming In WordPress 4.7?
Share

The first release candidate of WordPress 4.7 is already out there, and the final version is planned to be shipped on 6th of December. There are plenty of improvements and changes coming in this version, for both developers and users, and We are here to give you all the details about them.

Twenty Seventeen – New Default Theme

WordPress is slowly moving towards becoming a platform for building websites, instead of blogs only. That can be noticed from the information on their site saying “WordPress is web software that you can use to create a beautiful website, blog, or app.”, and everywhere else in their platform where only the keyword blog was used in the past. Additionally, the Twenty Seventeen theme is focused on providing users to setup a website for themselves, their business or product.

Twenty Seventeen

Twenty Seventeen

It includes full-screen header with navigation right underneath it, call-to-action sections and various sections for services, blog posts, location and featured content.

Twenty Seventeen aims to show off some new core features and enhancements, such as:

  • A better flow for using a static page as your front page.
  • Visible edit icons in the Customizer, replacing the current hidden shift+click method.
  • Expanding custom header images to include video (think: atmospheric video headers!).
  • Dummy content for live previews.

Video Headers

Many premium WordPress themes have the option to upload a video header in some ways. As of 4.7, WordPress extends the Custom Header feature and makes Twenty Seventeen the first default theme that comes with video header support.

Support for video headers can be registered when adding support for custom headers in a theme, and after that you would be able to upload your own video in mp4 format or use YouTube or Vimeo videos by entering the video URL.

the_customer_header_markup() function is used to display the custom header. You can read more about the options and possibilities here.

Theme Setup Flow and Custom CSS in Live Preview

In this version, WordPress brings improved theme and site setup flow. Users now will have a more polished view of their installed themes, better theme search and improved setup through the Customizer. Also, WordPress 4.7 has added an option to write custom CSS right in the Customizer and directly see the changes.

PDF Support in Media Library

Since now users were able to preview only images when uploading them in the Media Library. WordPress 4.7 introduces the enhanced PDF support making it easier to preview PDF documents by making a screenshot of the first page of the document. It is also generating thumbnails in different sizes (Full-size representation (rendered at 128dpi), Thumbnail (without cropping), Medium and Large). Anyway, in order for this to work you will need to have installed Imagick, ImageMagick and Ghostscript support.

WordPress Pdf Preview

PDF Preview in Media Library

Editor Enhancements

WordPress 4.7 removes the underline and justify buttons from the editor because the underline text confuses the readers and they interpret it as a link, and the justify button is removed because it’s making the text less readable (Note: the keyboard shortcuts for both will still work). Also, there has been a rearrangement of the buttons in order to make them easier to access and to encourage proper use of the HTML elements they insert.

WordPress Post Editor

WordPress 4.7 Post Editor

Admin Language Control for Users

WordPress 4.7 allows users to select their preferred language (locale) when editing their profile. This allows for greater personalization of the WordPress admin and therefore a better user experience. The back-end will be displayed in the user’s individual locale while the locale used on the front end equals the one set for the whole site. About the developer features you can read below under the “Under the Hood” section.

User Admin Language Panel

User Language Option

Under the Hood

The following updates and improvements are mainly intended for developers.

WP REST API Content Endpoints

Finally, the REST API Endpoints made their way to the core. These endpoints provide machine-readable external access to your WordPress site with a clear, standards-driven interface, allowing new and innovative apps for interacting with your site. These endpoints support all of the following:

  • Posts: Read and write access to all post data, for all types of post-based data, including pages and media.
  • Comments: Read and write access to all comment data. This includes pingbacks and trackbacks.
  • Terms: Read and write access to all term data.
  • Users: Read and write access to all user data. This includes public access to some data for post authors.
  • Meta: Read and write access to metadata for posts, comments, terms, and users, on an opt-in basis from plugins.
  • Settings: Read and write access to settings, on an opt-in basis from plugins and core. This enables API management of key site content values that are technically stored in options, such as site title and byline.

Post Type Templates

WordPress is supporting custom page templates since the beginning and it’s a great option that allows developers to create custom templates for a specific page. WordPress 4.7 introduces custom post templates that will be created the same way as the custom page templates, with an addition of Template Post Type definition. Here is an example:

Post Custom Templates

Post Custom Templates

Custom Bulk Actions

The new bulk actions filter allows developers to modify the actions array and add their own actions. New action can be registered using the filter bulk_actions-{screen_id}, for example: bulk_actions-edit-post and the form submission is handled by handle_bulk_actions-{screen_id} (handle_bulk_actions-edit-post).

Custom Bulk Actions

Custom Bulk Actions

Locale Switch

The user language option, mentioned above in this blog posts, comes with a few handy API functions. The get_user_locale( $userid ) function is used to retrieve the locale of any user and if no user ID is specified it’s taking the locale of the current user. The user locale is stored as a user meta locale. Therefore it can be modified with the get{$meta_type}_metadata filter.

switch_to_locale( $locale ) switches the locale and (un)loads text domains according to a given locale, and also, there are restore_previous_locale() and restore_current_locale() to restore to previous used locale or empty the current stack and restore to the original locale.