What to expect in WordPress 4.7

What to expect in WordPress 4.7

The latest version of WordPress is due to be released on December 6, 2016. Some major updates to the platform are in store with version 4.7, and we beta-tested it to check out some of the new features. For basic WordPress users and WordPress developers, the new release offers some exciting updates and new capabilities. Let’s check out some of the highlights!

Note: It’s not recommended to run the beta version on a live site quite yet, but you can use the WordPress Beta Tester plugin to test WordPress 4.7 on a test site to check it out for yourself). 

What new to expect in WordPress 4.7

Twenty Seventeen Theme

  • For many users, one of them most exciting aspects of this release is probably the new Twenty Seventeen theme.
  • Twenty Seventeen is minimal, mobile-friendly, and geared towards businesses.
  • Elegant use of featured images and animations create a clean and professional feel to this theme.
  • Check out Twenty Seventeen theme demo

Header Videos

  • The Theme Customizer makes it really easy to add full-width image or video headers to your site.
  • Either upload your own video or link to a YouTube or Vimeo URL directly from within the “Header Visuals” tab.

header videos wordpress 4.7

Custom CSS

  • You can now add custom CSS directly in the Theme Customizer and see a live preview on your site.
  • This feature is still a little buggy in the Beta version, but it has the potential to be a very powerful asset moving forward.
  • CSS styling that you add directly via the customizer will not be lost when you update your site in the future, which may eliminate the need for child themes in some cases.

adding custom css

adding new custom css

Easy and Fast Site Setup

  • The theme customizer allows you to add new pages on the fly, edit elements in the live preview, and arrange the components of your static front page.
  • Clickable shortcuts within the Theme Customizer allow you to edit items right then and there, without leaving the customizer.
  • With Twenty Seventeen, demo content is included to populate your theme.

theme customizer options

theme options in customizer

Navigation Menus & Social Media Links

  • You can create and configure your main navigation menu directly from within the Theme Customizer.
  • Simply click the “Menus” tab, create a menu, and add items using the button.

navigational menu in theme options

  • Add links to social media from directly within the Theme Customizer’s “Social Links Menu” section.
  • Social links will appear as icons in the site’s footer by default.

social links menu

Visual Editing In the Customizer

  • Use the “Pencil” icons to edit sections within the customizer and see the changes in the live preview.
  • For example, to edit the search widget on our sidebar, simply click the pencil next to that widget and the corresponding module will appear in the customizer.

visual editing in customizer

editing-search-widget

  • Add a title to the Search widget
  • The title appears in the sidebar

edited search area

Theme Previews

  • Twenty Seventeen definitely has a lot to offer as a default theme, but WordPress 4.7 also makes it incredibly easy to browse and test out a variety of themes on your site.
  • Add, change, and preview new themes from within the Theme Customizer.
  • Simply select the “Change” button next to your Active Theme and browse the options until you find the right theme for your site.

theme previews

Custom Page Templates to All Post Types

Custom page templates have been around for a long time, but with WordPress 4.7 the ability to specify custom layouts and designs is finally coming to posts, as well! This will allow theme and plugin developers a greater level of flexibility to create diverse post types within a theme.

  • Post type templates will be implemented in very similar manner to page templates
  • Authors will now be able to choose post types from the Page Attributes section in WordPress

Multiple language options for user Admins

  • If you have more than one language installed, the user language option will be available in your profile.
  • This allows each member of a team to manage the same site in their language of preference without affecting the other members.

PDF thumbnails

  • Uploaded PDF Files will now display with thumbnail previews, making it easier to recognize what is what amongst your different files.

Advanced Features

WordPress 4.7 has condensed much of the functionality of the Dashboard directly into the Theme Customizer, which makes site setup and customization even simpler and faster for basic WordPress users.

The update offers some exciting new features for developers, as well. Particularly for those who are building themes, plugins, or apps to interface with WordPress, version 4.7 promises some new capabilities and creative potential. There are a lot of updates in store for version 4.7, but let’s look at some of the most significant features for developers.

Updates to REST API content endpoints

  • Merging of API endpoints for content types in WordPress
  • Establishment of a fully functional and extensible “Content API” that supports public and authenticated access with read and write setting options.
  • Detailed information about these changes to the REST API can be found here.

Settings Registration

  • The Settings Registration API has been expanded.
  • The third parameter of register_setting() now accepts an array of arguments, which gives WordPress core more information about your setting, notably data type.
  • This is particularly useful when working with the REST API. More information about registering your settings in WordPress 4.7 can be found here.

New Functions, Hooks, and Behaviors

Theme developers will have some new functions, hooks, and behaviors to work with in WordPress 4.7.

  • One of the highlights is the new get_theme_file_uri() function. This is similar to the get_template_part() function that was introduced in WordPress 3.0.
  • get_template_part() looks for a particular file within a child theme, and falls back on the parent theme if the file is not found.
  • The new get_theme_file_uri() function offers this same child theme functionality in relation to theme file URLs, for example when enqueuing a JavaScript file.

Here is an example:

wp_enqueue_script( ‘my-js’, get_theme_file_uri( ‘js/my-js.js’ );

This line of code would serve to enqueue the URL js/my-js.js from your child theme, and, if it didn’t find it there, it would default to this URL path in your parent theme.

Introduction of a New Taxonomy Class

  • $wp_taxonomies has been updated to an array of WP_Taxonomy objects
  • The get_taxonomy() function now returns a WP_Taxonomy object
  • The get_taxonomy_labels() function now accepts a WP_Taxonomy object
  • This is similar to WP_Post_Type, which was introduced in WordPress 4.6

Custom Bulk Actions

  • In WordPress 4.7, developers will have the ability to register custom bulk actions on list tables.
  • In the past, bulk actions were limited to “Edit” and “Move to Trash,” but now developers can add customized actions to this list table dropdown.
  • For example, if you wanted to send a selection of posts to your Mom via email, you could create a custom bulk action to do that!
add_filter( ‘bulk_actions-edit-post' , ‘my_bulk_action_handler', 10, 3 );

function my_bulk_action_handler( $redirect_to, $doaction, $post_ids ) {
if ( $doaction !== 'send_to_mom' ) {
return $redirect_to;
}
foreach ( $post_ids as $post_id ) {

}
$redirect_to = add_query_arg( 'bulk_emailed_posts', count( $post_ids ), $redirect_to );
return $redirect_to;
}

add_action( 'admin_notices', 'bulk_action_admin_notice' );

function bulk_action_admin_notice() {
if ( ! empty( $_REQUEST['bulk_emailed_posts'] ) ) {
$emailed_count = intval( $_REQUEST['bulk_emailed_posts'] );
printf( '<div id="message" class="updated fade">' .
_n( 'Sent %s post to Mom.',
'Sent %s posts to Mom.',
$emailed_count,
'send_to_mom'
) . '</div>', $emailed_count );
}

 

custom-bulk-actions-in-wordpress-4-7

Other Notable Updates

  • Separate capabilities for post tag taxonomy and the category taxonomy
  • The toolbar in the visual editor has been rearranged to be more user-friendly
  • The paragraph bar is now on the top row of the editor

visual-editor-toolbar

  • Keyboard shortcuts have been added to the tooltips in the editor, which is a handy feature.
  • For an in-depth look at all of the alterations and new features, check out posts tagged with “4.7” in the main WordPress development blog.

Conclusion

Version 4.7 is an exciting update to the popular WordPress platform. A greater emphasis on live preview within the Theme Customizer is a huge asset, particularly with the ability to add custom CSS and see it in action.

The updates to the REST API will undoubtedly usher in a multitude of new apps and plugins that interact with WordPress content in unique and interactive ways, particularly in terms of mobile. Whether you are just launching your first blog with WordPress or you are a seasoned developer, there is a lot to look forward to with the arrival of WordPress 4.7.

Additional Reading:

A Tour of WordPress.com’s Calypso App

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.