WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Version 4.7

On December 6, 2016, WordPress Version 4.7, named for jazz vocalist Sarah "Sassy" Vaughan, was released to the public. For more information on this enhancement and bug-fix release, read the WordPress Blog, and see the Changelog for 4.7.

For Version 4.7, the database version (db_version in wp_options) changed to 38590, and the Trac revision was 39524.

Highlights

New Default Theme - Twenty Seventeen
It is an ambitious theme designed for business websites that focuses on a creative home page and an easy site setup experience for users (read more 1 and 2).

Twenty Seventeen Top Image

  • multiple sections on the front page, selected in the Customizer.
  • a striking asymmetrical grid.
  • custom color schemes, built on top of a monochromatic foundation, and adjustable via a hue picker.
  • different headline placement for pages, changeable in the Customizer, via them options.
  • a great experience in many languages, thanks to language-specific font stacks.
  • SVG icons (a first for a default theme).
  • support for custom logo, custom header image and many post formats.
  • the use of new functions in Core for making child theming easier.
Note: Twenty Seventeen only works on 4.7 and above. It uses the new video header and starter content features, each launched in 4.7.
REST API Content Endpoints
API endpoints for WordPress content. WordPress 4.7 comes with REST API endpoints for posts, comments, terms, users, meta, and settings. Content endpoints provide machine-readable external access to your WordPress site with a clear, standards-driven interface, paving the way for new and innovative methods of interacting with your site. Check out the REST API reference.

The Finer Points

Theme Starter Content
Starter Content is the theme-specific selections of content to help showcase a theme to users and serve as a starting point for further setup of new sites. The initial view of a theme with starter content will only happen for "fresh sites" - new installs that have not yet had any posts, pages, widgets, or customizer settings updated (read more).
Edit Shortcuts
Visible icons appear to show you which parts can be customized right there while live previewing. Click on a shortcut and get straight to editing, no decoding of widget area names or extra clicks needed. Paired with starter content, getting started with customizing your site is faster than ever (read more).
Video Headers
WordPress 4.7 extends the Custom Header feature to introduce support for video. Video headers play automatically, loop by default, and don't have sound. They work best when paired with an image, so they can progressively enhance the experience when video is supported (read more).
Smoother Nav Menu Building
Many primary navigation menus for sites contain links to the pages of your site. But what happens when you don't have any pages yet? Now you can add new pages while building nav menus instead of leaving the customizer and abandoning your changes. Once you've published your customizations, you'll have new pages ready for you to fill with content (read more).
Custom CSS
Sometimes you just need a few more visual tweaks to make your site perfect, or a plugin adds something that doesn't quite look right with your site. WordPress 4.7 allows you to instantly see changes while adding custom CSS to give your site that polish (read more 1 and 2).
User Admin Languages and Locale Switching
Users can select their preferred locale (language) when editing their profile. 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 (read more).
PDF Thumbnail Previews
Managing your document collection is easier with WordPress Version 4.7, which now shows preview thumbnails instead of a generic icon for PDFs in the media library (read more).

For Developers

Custom Bulk Actions
Simpler way to register bulk actions on list table screens (read more).
Page Templates for Post Types
Add support for post type templates. By opening up the page template functionality to all post types, theme developers have even more flexibility with the WordPress template hierarchy (read more).
WP_Taxonomy
New WP_Taxonomy class provides methods to handle taxonomies. This changes the global $wp_taxonomies to an array of WP_Taxonomy objects (read more).
More Theme API Goodies
WordPress 4.7 includes new functions, hooks, and behavior for theme developers (read more)
WP_Hook
The code that lies beneath actions and filters has been overhauled. You likely aren't affected, but if you've done things to the $wp_filter global or experienced funky recursion bugs in the past, please take a moment to read the dev note and test your code (read more)
Customize Changesets
Browse your site and switch themes more seamlessly within the customizer, as your changes automatically persist in the background. Changesets also make exciting new features like starter content possible (read more).
Attributes for Resource Hints
you're now able to pass specific HTML attributes to these resource hints to make even better use of them (read more).
wp_list_sort() and WP_List_Util
WordPress 4.7 brings a few enhancements to handling object or array lists. A new function wp_list_sort() makes it easy to sort object or array lists by one or more of its elements' properties. A new WP_List_Util class was introduced as a central access point for handling lists (read more).

What's New

General

Editor Changes
Some of the toolbar buttons have been rearranged to make them easier to access and to encourage proper use of the HTML elements they insert (read more).
  • The headings drop down is moved to the top row.
  • The strike-through and horizontal rule button are moved down.
  • The underline and justify buttons have been removed from the bottom row.

Editor Toolbar

  • Labels for keyboard shortcuts have been added to the tooltips for buttons and inside drop downs to make them easier to discover.

Editor Keyboard Shortcut

Posts

  • The Tag-Cloud with the popular terms have been removed from the dashboard taxonomy pages

Media

  • Improving accessibility of image alternative text - No more default fallback. To ensure your images having meaningful alternative text, you should make sure to set a value for alt text in your media library (read more).
  • Make media library searchable by filename. (#22744)

Comments

Appearance

Customizer Improvements
WordPress 4.7 has been the most active release on record for the customize component (read more).
  • Create pages within live preview during site setup - Add new pages while building menus and setting a static front page; outline your site directly in the customizer (read more).
  • Improvements to the Sliding Panels UI - Customizer navigation is now faster, smoother, and more accessible (read more 1 and 2).
  • Customize Changesets - Browse your site and switch themes more seamlessly within the customizer, as your changes automatically persist in the background (read more).
  • Custom CSS - Fine-tune your site and take your theme customizations to the next level with custom css in the customizer (read more 1 and 2).

Users

Install Process

Multisite

Accessibility

Under The Hood

General

  • Allow for .nav-tab-wrapper class to be used on elements other than h3 to increase flexibility for custom settings pages
  • Use get_bloginfo( 'version' ) instead of global $wp_version

Images

Embeds

  • Add oEmbed support for Facebook posts/activities/photo/videos/media/questions/notes.
  • Add oEmbed support for Twitter profile, list, and likes.
  • Using HTTPS endpoints for oEmbeds for those providers that have full HTTPS support and don't redirect back to HTTP when clicking through from the embed.

Script Loader

JavaScript

Bug Fixes

Multisite

  • get_blog_details() replaced with get_site() (#37102)
  • blog_details filter deprecated (#38491)
  • _network_option actions and filters get $network_id (#38319, #38320, #38321 and #38322)
  • wp_get_network() deprecated (#3753)

Classes

What's New

Deprecated

Functions

What's New

Deprecated

Actions & Filters

New Actions

New Filters

Deprecated

External Libraries

Miscellaneous

See also: other WordPress Versions.