Version 4.6

You are here:

On August 16, 2016, WordPress Version 4.6, named for jazz musician Pepper Adams, was released to the public. For more information on this enhancement and bug-fix release, read the WordPress Blog.

For Version 4.6, the database version (db_version in wp_options) changed to 37965, and the Trac revision was 38270.

  • View Closed Tickets.

Installation/Upgrading Information 

To download WordPress 4.6, visit https://help.codibu.com/blog/kb/releases/

Top ↑

Highlights 

The Finer Points 

Shiny Updates v2

Shiny Updates replaces progress updates with a simpler and more straight forward experience when installing, updating, and deleting plugins and themes. Those actions are now all performed via AJAX.

One big user facing change is about search. There is now an AJAX search on both the Installed Plugins screen as well as the Add New Plugin screen, this means the search results change as you type, drastically simplifying your workflow. (read more)blank

Multiple plugins update
blank
Plugin delete

 
Native Font supports in the Administration Screen

The operating system’s UI font is used for any text that’s part of the WordPress user interface. Although WordPress switched to Open Sans in Version 3.8 at the end of 2013 by various reasons, today, the background condition and technology have changed. Then, experience faster load times, especially when working offline, a removal of a third-party dependency, and a more native-feeling experience as the lines between the mobile web and native applications continue to blur. (read more)

blank
Browser: Safari, OS: macOS, Font: San Francisco
blank
Browser: Edge, OS: Windows 10, Font: Segoe UI

    
Import Screen overhaul

The Import Screen was overhauled, improving accessibility and making it much easier to install and run an importer.

blank
Overhauled Import Screen

Internationalization improvements

The translation platform for plugins and themes was opened up in December 2015. Since then 15,000 plugins and themes were imported and are now benefiting from automated translation updates. Translations files are usually inside wp-content/languages, and WordPress now scans that directory for available translations and automatically loads them if it encounters a text domain for the first time. Also, jQuery UI datepicker was localized. (read more)

Editor Improvements

A more reliable recovery mode and detection of broken URLs while you type them.

Emoji

Emoji support has been updated to include all of the latest Unicode 9.0 emoji characters.

Top ↑

For Developers 

Resource Hints

Resource Hints is a rather new W3C specification that “defines the dns-prefetch, preconnect, prefetch, and prerender relationships of the HTML Link Element (<link>)”. Allow browsers to prefetch specific pages, render them in the background, perform DNS lookups, or to begin the connection handshake (DNS, TCP, TLS) in the background. (read more)

HTTP API internal changes

The HTTP API (wp_remote_request() and family) have undergone a large internal change. Rather than using a WordPress-specific HTTP library, WordPress now uses the open-source independent Requests library. (read more)

Language Packs

Translations managed through translate.wordpress.org now have a higher priority and are loaded just-in-time.

WP_Site_Query

New WP_Site_Query class to query sites with lazy loading for details.

WP_Network_Query

New WP_Network_Query class to query networks with lazy loading for details.

WP_Term_Query

New WP_Term_Query is modeled on existing query classes and provides a more consistent structure for generating term queries. (read more)

WP_Post_Type

New WP_Post_Type class provides methods to handle post type supports, rewrite rules, meta boxes, hooks, and taxonomies. This changes the global $wp_post_types to an array of WP_Post_Type objects. (read more)

Widgets API

The Widgets API was enhanced to support registering pre-instantiated widgets. (read more)

dbDelta updates

dbDelta() is a function which helps to modify the database based on specified SQL statements. This function has been updated to resolve some long standing bugs (read more)

  • Normalized index definitions
  • Backtick all the things
  • Support for SPATIAL keys

Persistent Comment Cache

Since Version 2.6, the comments API has purposefully not used a persistent cache. Over the past 20 releases, changes have been made to purge the problems from the comments API that caused this. Comments can now be stored in a persistent object cache. When comments are added, modified, or deleted, out of date cache values are properly invalidated. (read more)

External Libraries

External Libraries were updated to the latest versions – Masonry to 3.3.2 and imagesLoaded to 3.2.0, MediaElement.js to 2.22.0, TinyMCE to 4.4.1 and Backbone.js to 1.3.3. (read more)

REST API

REST API responses now include an auto-discovery header and a refreshed nonce when responding to an authenticated response.

Enhancing register_meta()

The register_meta() function is getting some updates to enable greater flexibility and features in the future (such as inclusion in the Rest API). It expands to support the registration of meta keys and what to expect from those keys. Its behavior is similar to register_post_type() in that the registration of this data is stored in the global scope. This makes an object’s meta data more accessible to parts of core and extending code.(read more and more)

Customizer

Improved API for Setting Validation in the Customizer. (read more).

Top ↑

What’s New 

Top ↑

General 

  • Unifying permission error messages (#34521)

Top ↑

Posts 

  • Editor Improvements (#36638) – A more reliable recovery mode and detection of broken URLs while you type them.
  • Emoji (#37361) – Emoji support has been updated to include all of the latest Unicode 9 emoji characters.

Top ↑

Media 

  • Featured images are no longer immediately saved to posts or non-image attachments until the corresponding post or attachment has been updated.

Top ↑

Comments 

  • Comments: Allow for default comment form action, /wp-comments-post.php, to be changed via the comment_form_defaults filter. (#26841)
  • Comments: Add parameters to edit_comment_link() to allow specifying a Comment and link class. Matches the parameters for edit_post_link(). (#36538)

Comments: add a $comment parameter to get_comment_author_url_link(), comment_author_email_link(), and get_comment_author_email_link(). (#36573) (#36573)

Top ↑

Appearance 

  • Native Fonts in the Administration Screen (#36753) – Experience faster load times, especially when working offline, a removal of a third-party dependency, and a more native-feeling experience as the lines between the mobile web and native applications continue to blur. 
    The operating system’s UI font is used for any text that’s part of the WordPress user interface. In other contexts, like the Editor, we continue to use a serif system typeface, Georgia. (read more)
  • Import Screen overhaul ([https://core.trac.wordpress.org/ticket/35191 #35191) – The Import Screen was overhauled, improving accessibility and making it much easier to install and run an importer.
  • Loading Translations in Different Order (#34213) – load_plugin_textdomain( $domain ) and load_theme_textdomain( $domain ) are used to load the translations for a specific text domain, where $domain equals the slug of your plugin or theme. Now, these functions first looked inside the wp-content/languages directory, where language packs reside, then, the plugin/theme folder.
  • Just-in-time Loading for Translations (#34114) – Translations files are usually inside wp-content/languages, and WordPress now scans that directory for available translations and automatically loads them if it encounters a text domain for the first time.
  • jQuery UI datepicker localization (#29420) – localization defaults were added for the jQuery UI datepicker based on the current locale using the new wp_add_inline_script() function. (read more)

Top ↑

Users 

  • Users: In wp_new_user_notification(), add ‘user’ option for the $notify parameter, which allows for sending notification only to the user created. (#36009)
  • Multisite: Add the pre_get_blogs_of_user filter. This allows a plugin to short circuit get_blogs_of_user() in cases where the default behavior of the function is unnecessary or slow. (e.g. A user is a member of thousands of sites.) (#36707)
  • List Tables: Pass the $which parameter to restrict_manage_posts and restrict_manage_users. $which contains the location of the extra table nav markup: ‘top’ or ‘bottom’. ([#35307)

Top ↑

Install Process 

  • Shiny Updates v2 (#37714) – Shiny Updates replaces progress updates with a simpler and more straight forward experience when installing, updating, and deleting plugins and themes.

Top ↑

Multisite 

See the For Developers section for information on the new Multisite classes, WP_Site_Query, WP_Network_Query, and WP_Term_Query.

Top ↑

Accessibility

  • Taxonomy pages tab order now reflects the visual order. (#35664) (read more)
  • Themes: Make default “read more” link more accessible. (#36572)
  • Import: Enhance accessibility on the Import screen. (#35191)
    • Remove title attributes.
    • Show “Install Now” and “Details” links if the importer isn’t installed yet.
    • Show a “Run Importer” link if the importer is installed. It also handles activation if the plugin isn’t activated.
    • Add aria-label attributes to each link.
    • Unify the importer descriptions to make them independent from the plugin state.
    • Adjust JavaScript callbacks for ajaxified importer installs.

Top ↑

Under The Hood 

Top ↑

General 

  • Resource Hints (#34292) – Allow browsers to prefetch specific pages, render them in the background, perform DNS lookups, or to begin the connection handshake (DNS, TCP, TLS) in the background.
    By default, wp_resource_hints() prints hints for s.w.org (the WordPress.org CDN) and for all scripts and styles which are enqueued from external hosts. (read more)
  • HTTP API internal changes (#33055) – The HTTP API (wp_remote_request() and family) now uses the open-source independent Requests library, rather than using a WordPress-specific HTTP library. Requests provide the same functionalities with current library, and better HTTP standard support, case-insensitive headers, parallel HTTP requests, support for Internationalized Domain Names (like böcean901.ch), and many other internal improvements. (read more)
  • Language Packs (#34114, #34213) – Translations managed through translate.wordpress.org now have a higher priority and are loaded just-in-time.
  • Persistent Comment Cache (#36906) – Comments can now be stored in a persistent object cache. When comments are added, modified, or deleted, out of date cache values are properly invalidated. (read more)

Top ↑

Images Images

  • Allowed upload file types are now checked before uploading (#14244)
  • Adds a new action hook, wp_edit_form_attachment_display to edit_form_image_editor(), which can be used as a fallback to render previews of an attachment that isn’t an image, audio, or video file included in the media library. (#36052)
  • Removed a private, deprecated and unused function, _wp_upload_dir_baseurl(). (#36375)
  • Prior image edits are now cleaned up properly when `IMAGE_EDIT_OVERWRITE` is true. (#32171)

Top ↑

Bootstrap / Load 

There are changes to the bootstrap or loading process focused on making pieces available earlier. These changes are all expected to be backward compatible. (read more)

  • Load plugin.php earlier in wp-settings.php (#36819)
  • Reconcile wp-settings-cli.php with wp-settings.php (#34936)
  • is_ssl() is now located in wp-includes/load.php (#35844)
  • ABSPATH can now be safely defined before WordPress is loaded (#26592)

Top ↑

Bug Fixes 

Embeds 

  • Autoembeds now work with paragraphs. (#25387)
  • Improved height calculation for slow loading images. (#35657)
  • Docs: Added missing @access tags to methods in WP_oEmbed_Controller. (#36297)
  • Removed support for Google Video since the service has been retired for years. (#36304)
  • Now WordPress includes the locale stylesheets after the default styles. (#36839)
  • Added unit tests for the WP_Embed class.(#37214)
  • WordPress doesn’t print the HTML for a featured image if an embedded post has no featured image. (#37288)

Top ↑

Multisite 

For detail about multisite changes in Version 4.6, refer this Tech Docs.

  • WP_Site_Query (#35791) – With new WP_Site_Query or get_sites(), sites can now be queried from the $wpdb->blogstable in a flexible way by id, domain, path, and more.
  • WP_Network_Query (#32504) – With new WP_Network_Query or get_networks(), networks can now be queried from the $wpdb->site table by id, domain, and path.
  • Enhancements to WP_Site and WP_Network – It includes new utility methods, property changes (#36717, #37050), Lazy-loading extended properties (#36935), New Actions and Filters (#26580) and others.

Note: WP Multi Network compatibility – The introduction of get_networks() in Version 4.6 conflicts with the function of the same name in WP Multi Network, a plugin commonly used to provide multiple networks on a multisite installation. If you are using WP Multi Network, please be sure to update the plugin to the latest (detail).

Top ↑

Classes 

Top ↑

What’s New 

Visit the Code Reference for a full list of classes added or changed in 4.6.

  • New WP_Site_Query class to query sites with lazy loading for details. (#35791)
  • New WP_Network_Query class to query networks with lazy loading for details. (#32504)
  • New WP_Term_Query is modeled on existing query classes and provides a more consistent structure for generating term queries. It brings parity between taxonomy term queries and WordPress’s other content type queries (read more)
  • New WP_Post_Type class provides methods to handle post type supports, rewrite rules, meta boxes, hooks, and taxonomies. (#36217)

Top ↑

Functions 

Top ↑

What’s New 

Visit the Code Reference for a full list of functions added or changed in 4.6.

  • The Widgets API (#28216) was enhanced to support registering pre-instantiated widgets. The register_widget() and unregister_widget() functions accept not only a class name but a class instance (object) of a WP_Widget subclass. (read more)
  • dbDelta() function updates resolve following issues (read more)
    • Normalized index definitions
    • Backtick all the things
    • Support for SPATIAL keys
  • REST API responses now include an auto-discovery header (#35580) and a refreshed nonce when responding to an authenticated response (#35662).
  • Enhancing register_meta() (#35658) – register_meta() is getting some updates to enable greater flexibility and features in the future (such as inclusion in the Rest API). It expands to support the registration of meta keys and what to expect from those keys. Its behavior is similar to register_post_type() in that the registration of this data is stored in the global scope. This makes an object’s meta data more accessible to parts of core and extending code. A global variable, $wp_meta_keys, contains all registered meta keys.(read more and more)
  • Customizer – Improved API for Setting Validation in the Customizer. (#34893, #36944) (read more).

Top ↑

Deprecated 

  • wp_embed_handler_googlevideo() was deprecated following removal of Google Video support.
  • wp_get_sites() was deprecated in favor of get_sites().

Top ↑

Actions & Filters 

Visit the Code Reference for a full list of hooks added or changed in 4.6.

Top ↑

External Libraries 

  • Masonry 3.3.2 (#32802)
  • imagesLoaded 3.2.0 (#32802)
  • MediaElement.js 2.22.0 (#36759, #37363)
  • TinyMCE 4.4.1 (#37225, #37327)
  • Backbone.js 1.3.3 ([1] #37099)

Top ↑

Miscellaneous 

Was this article helpful?
Dislike 0
Views: 11