Week in Core, August 16 – 23, 2016

Welcome back the latest issue of Week in Core, covering changes [38274-38345]. Here are the highlights:

  • 72 commits
  • 40 contributors
  • 100 tickets created
  • 9 tickets reopened
  • 96 tickets closed

Ticket numbers based on trac timeline for the period above. The following is a summary of commits, organized by component.

Code Changes


  • Allow for .nav-tab-wrapper class to be used on elements other than h3 to increase flexibility for custom settings pages. [38306] #37257


  • add a new function, wp_doing_ajax(), which can replace… (wait for it…) DOING_AJAX checks via the constant. [38334] #25669



  • in WP_Object_Cache, $cache_misses is public, but $cache_hits is private. They should both be public, because they’re useful for debugging purposes. [38335] #37726


  • in wp_handle_comment_submission(), $_wp_unfiltered_html_comment is passed as part of $comment_data, but is not used locally. [38313] #37771
  • in WP_Comment_Query::fill_descendants(), continue if there is an empty array in the loop. [38298] #37416
  • in WP_Comment_Query::fill_descendants(), compute count() in the first for expression so that it does not run on each iteration. [38297] #37416


  • Ensure a newly-added custom link nav menu item has the appropriate CSS class names. [38301] #37575


  • WP_Network, WP_Network_Query, and WP_Site_Query call wpdb::_escape(), thus requiring it to be public. It previously had no access modifier. _ at the beginning of a method, believe it or not, does not enforce visibility constraints. [38314] #37771


  • Update jsdoc in customize-nav-menus.js to remove references to Menu Customizer plugin. Also fix @param for updateAssignedLocationsInSectionTitle. [38300] #37520
  • Update outdated phpdoc for WP_Customize_Manager::validate_setting_values() to reflect changes in [37942]. [38299] #37247, #37759
  • Correct usage examples for wpdb::prepare(), which should not be called statically. [38289] #37744
  • Fix typo in load_plugin_textdomain() parameter description. [38284] #37318


  • In get_oembed_endpoint_url(), avoid inadvertent stomping of the $format parameter passed to oembed_endpoint_url filter. [38321] #37751

External Libraries


  • remove variable set needlessly in wp_check_jsonp_callback(). [38308] #37771


  • Standardize naming of dynamic hooks to use interpolation vs concatenation. [38307] #37748


  • in WP_HTTP_Response, the @param declarations for $status and $headers were swapped. Let us correct this. [38315] #37771


  • Add translator comments for strings in wp-includes/functions.wp-scripts.php. [38345] #37803
  • Add translator comments for strings in wp-includes/functions.php. [38344] #37802
  • Add translator comments for strings in wp-includes/deprecated.php. [38343] #37797
  • Add translator comments for strings in wp-includes/class-walker-comment.php. [38342] #37796
  • Add translator comments for strings in wp-includes/author-template.php. [38341] #37795
  • Add translator comments for strings in wp-includes/admin-bar.php. [38340] #37794
  • Remove unnecessary context for two strings on “Add New User” screen. [38329] #37784
  • Remove unnecessary context in wp_post_revision_title_expanded(). [38327] #37781
  • Use a consistent context for “Add New” submenu strings in admin bar (Toolbar). [38326] #37780
  • Allow for WordPress Plugin/Theme Directory URLs to be localized. [38325] #37501
  • Replace unnecessary context with translator comments in wp_post_revision_title() and wp_post_revision_title_expanded(). [38324] #37778
  • Replace unnecessary context with a translator comment for %s Sites string in network_step1(). [38323] #37777
  • Replace unnecessary context with a translator comment for %s KB string on Network Settings screen. [38322] #37496
  • Add translator comments for Edit Site: %s string in network admin. [38320] #37776



  • retrieve_password() does not need to import 2 globals that it does not use. [38304] #37699


  • If post-by-email functionality is disabled, wp-mail.php should return a 403 Forbidden status code instead if 500 Internal Server Error. [38332] #37572
  • Don’t set Sender field when setting From. Merges [38286] to the 4.6 branch. [38287] #37736
  • Don’t set Sender field when setting From. [38286] #37736


  • remove function_exists() call for ini_get() in _load_image_to_edit_path(). [38333] #37681
  • remove unnecessary variable assignment in gallery_shortcode(). [38309] #37771
  • add a function, wp_get_additional_image_sizes(), that wraps the retrieval of the global $_wp_additional_image_sizes. Removes 6 global imports. [38303] #37699
  • fix unit test after [38296].
  • use wp_get_attachment_metadata() instead of get_post_meta() where appropriate. [38296] #36246
  • wp_get_attachment_link() fails to output text for non-images if the attachment post doesn’t have a title and $text (argument #5) was not passed to the func. In this case, use the filename. [38295] #5, #37343
  • when calling pathinfo(), also pass a PATHINFO_* constant to avoid array notices for unset keys. [38294] #37608
  • Add some docs to media-gallery.js RIP. [38293] #37717


  • Fix copy/paste issue in id attribute for a dismissible message on Sites screen. [38305] #37764

Nav Menus

  • remove unnecessary variable assignment in wp_nav_menu_item_post_type_meta_box(). [38311] #37771


  • use correct description in the docblock for $number in WP_Comment_Query, WP_Network_Query, and WP_Site_Query. [38336] #37621
  • Non-scalar and negative values for ‘p’ should always result in a 404. [38288] #33372
  • use composition for $db in WP_Date_Query, removes need to import global $wpdb in multiple methods. [38280] #37699
  • use composition for $db in WP_Query, removes need to import global $wpdb in multiple methods. [38279] #37699
  • add a protected field, $db, (composition, as it were) to WP_*_Query classes to hold the value for the database abstraction, instead of importing the global $wpdb into every method that uses it. Reduces the number of global imports by 32. [38275] #37699


  • remove unnecessary variable assignments in rest_handle_options_request(). [38310] #37771


  • in get_terms(), do not assume that legacy args are being passed when the only params are top-level meta_* values. Add keys in WP_Term_Query::__construct(). Adds unit tests. [38337] #37568
  • remove unnecessary break in WP_Term::__get(). [38312] #37771
  • In is_object_in_term(), return error object rather than caching it. [38277] #32044, #36814, #37721
  • Allow attachment taxonomies to be fetched as objects. [38292] #37368


  • Fix incorrect variable name from [38330]. [38331] #37630
  • Attachment create() method should match signature of other create() methods. Legacy argument format continues to be accepted. [38330] #37630
  • Move some utility classes to their own files. [38285] #37523
  • skip checking the value in Tests_User:test_user_properties for db. Casting to array is not the most elegant thing here, and various versions of PHP key protected/private fields differently when objects are cast. [38278] #37699
  • Introduce tests for get_attachment_taxonomies(). [38291] #37368
  • Introduce tests for get_object_taxonomies(). [38290] #37368
  • Add wordpress-importer tests demonstrating slashed data behavior. [38283] #21007


  • make sure the temporary id is removed when using the default image dialog and inserting an external image. [38328] #37467


  • after [38317], use a @property annotation, instead of a public field. [38319] #37771
  • $user_level has been publicly-accessed on instances of WP_User since version 2.0, but is has never been declared. [38317] #37771


  • $option_name and $alt_option_name have been used as members ever since WP_Widget became an object in 2.8, but never declared. [38318] #37771


Thanks to @afercia, @Akeif, @azaozz, @bcole808, @boonebgorges, @Clorith, @codemovementpk, @danhgilmore, @danielbachhuber, @dd32, @deremohan, @dlh, @DrewAPicture, @flixos90, @fomenkoandrey, @Frank, @gma992, @henrywright, @iandunn, @imath, @JaworskiMatt, @jipmoors, @Jonnyauk, @jorbin, @JorritSchippers, @Klein, @kouratoras, @Mte90, @Presskopp, @ramiy, @rpayne7264, @sebastianpisula, @SergeyBiryukov, @swissspidy, @tivnet, @TJNowell, @tomdxw, @vishalkakadiya, @westonruter, and @wonderboymusic for their contributions!

#4-6, #week-in-core

Week in Core, August 9 – 16, 2016

Welcome back the latest issue of Week in Core, covering changes [38239-38274]. Here are the highlights:

  • 35 commits
  • 38 contributors
  • 73 tickets created
  • 7 tickets reopened
  • 52 tickets closed
  • WordPress 4.6 released 🎉

Ticket numbers based on trac timeline for the period above. The following is a summary of commits, organized by component.

Code Changes


Build/Test Tools

  • Build/Test Tools: Ensure PHP 7.1 is tested on Travis.[38273] #37625


External Libraries




  • Update/Install error messages: do not escape from the template, escape the error message string before inserting it. [38240] [38241] #37623
  • Correct the documentation for the get_sample_permalink filter, and improve the documentation for the get_sample_permalink() function. [38272] #37682

Post Thumbnails,Post Thumbnails,Post Thumbnails

Script Loader

  • Fix protocol-relative URLs for the preconnect relation type. Props azaozz for review. [38255] #37652



Thanks to @afragen, @azaozz, @azaozz for testing and second sign off, @Clorith, @dd32, @dd32 for review, @dimadin, @DrewAPicture, @DrewAPicture for review, @flixos90, @helen, @hugobaeta, @Ipstenu, @ipstenu for research, @jeremyfelt, @jerrysarcastic, @JerrySarcastic, @joemcgill, @johnbillion, @johnpgreen, @jorbin, @macmanx, @MattyRob, @ocean90, @pento for review, @peterwilsoncc, @petya, @Presskopp, @RoseAppleMedia, @rosso99, @sebastian.pisula for the original patc, @SergeyBiryukov, @stephenharris, @swissspidy, @theMikeD for the initial patch, @voldemortensen, @westi for investigation, and @wonderboymusic for their contributions!

#4-6, #week-in-core

This Week in 4.6: August 15 – 21

This is the jump-start post for the seventeenth and last week of the WordPress 4.6 release cycle. This week is all about the final release of WordPress 4.6. 🚢

There is a release dry run today, Monday, August 15 at 16:00 UTC. The process for the final release starts tomorrow, Tuesday, August 16 at 16:00 UTC, with a release at Tuesday, August 16 at 19:00 UTC.

Priority tickets this week:

There are currently 4 tickets which need to be checked whether they’re blocker for a release.

  • #37658: Featured image on media files can not be changed (has-patch, has-unit-tests)
  • #37666: Masonry update to v3.3.2 breaks backwards compatibility with isAnimated option (has-patch)
  • #37665: Font Natively: Google maps can change the active font (needs-feedback)
  • #37669: Shiny Updates: Cancelling the filesystem credentials when updating within the pop-up prevents updating again

Core meetings this week:

#4-6, #jump-starts

Global overloading in advanced-cache.php

As a part of the 4.6 release, a change is made to the order of loading files during the bootstrap process. This change included an attempt to protect sites from the overloading of the hook related globals in advanced-cache.php. This change was reverted with [38251]. This means that the 4.5 behavior where if an advanced-cache.php sets one of the globals to an empty array, previously entered records will not exist.

This is a general reminder to not directly touch the globals in WordPress and to always use API functions. The format that the globals are in is not guaranteed to stay consistent from version to version. If you need to interact with the Plugins API in advanced-cache.php, as of 4.6, you can use the Plugins API (add_action(), add_filter(), etc.).

How to know if you are using advanced-cache.php

advanced-cache.php is a drop-in. If you are using any drop-ins, you will see “Drop-ins” at the top of wp-admin/plugins.php as one of the filtering options. If advanced-cache.php is listed and no warning is displayed, your site is using it. This file lives in your wp-content directory as a peer to plugins and themes. Updates to it are not made like updates to plugins. You will never see a notice that there is an update pending. If you did not write this code yourself, you are encouraged to keep up to date with upstream updates.

#4-6, #bootstrap-load, #dev-notes

4.6 Release Dry Run

In preparation for the release on Tuesday, August 16 at 19:00 UTC, we’ll do a dry run on Monday, August 15 at 16:00 UTC.

The dry run will include:

  • Testing various features, including Shiny Updates, native fonts, comment/site/network queries with and without a persistent object cache
  • Generally testing the admin and common features using a multitude of devices and browsers
  • Running our usual unit tests including the specialty groups like multisite, Ajax, and external HTTP
  • Doing scratch installs and upgrades from a variety of older versions
  • Triaging any bugs reported against trunk, most easily found at the top of report 40
  • Updating the credits API
  • Reviewing the Codex release page
  • Moving about page images to the CDN
  • Checking status of translations
  • Reviewing the release post

If you’d like to help out and participate, we’d love to have you. Please come prepared to test!

#4-6, #dry-run

Week in Core, August 2 – 9, 2016

Welcome back the latest issue of Week in Core, covering changes [38181-38238]. Here are the highlights:

  • 58 commits
  • 47 contributors
  • 76 tickets created
  • 10 tickets reopened
  • 53 tickets closed

Ticket numbers based on trac timeline for the period above. The following is a summary of commits, organized by component.

Code Changes

Help/ About

Boostrap/ Load





  • Fix copy/paste error in WP_oEmbed::_add_provider_early() description. [38230] #37602




  • Correct the documented return types of get_translations_for_domain(). [38198] #32246






  • Set WP_Term_Query::terms when returning terms from the cache in WP_Term_Query::get_terms() [38212], [38214] #37591
  • Add unit that shows that WP_Term_Query is broken when the query is read from the cache. [38211] #37591


Upgrade/ Install


Thanks to @adamsilverstein, @afercia, @Ankit, @azaozz, @boonebgorges, @celloexpressions, @cmillerdev, @dd32, @DrewAPicture, @endocreative, @fliespl, @flixos90, @gitlost, @Gupta, @hugobaeta, @iamfriendly, @Ipstenu, @ivantedja, @jbrinley, @jeremyfelt, @joemcgill, @johnbillion, @jorbin, @juhise, @K, @karmatosed, @macmanx, @mapk, @michael-arestad, @mikeschroder, @nacin, @obenland, @ocean90, @olarmarius, @ovann86, @pento, @peterwilsoncc, @petya, @rahulsprajapati, @ramiy, @rosso99, @SergeyBiryukov, @swissspidy, @vishalkakadiya, @westonruter, @wonderboymusic, and @zetaraffix for their contributions!

#4-6, #week-in-core

Weekly Dev Chat Agenda for August 10 — Sixteen Weeks Later

This is the agenda for the weekly dev meeting on August 10, 2016 at 20:00 UTC:

If you have anything to propose to add to the agenda, please leave a comment below.

See you in the chat!

#4-6, #agenda, #dev-chat

This Week in 4.6: August 8 – 14

This is the jump-start post for the sixteenth week of the WordPress 4.6 release cycle. T minus 9 days until release day. ⏳

There was no second release candidate last week due to a high number of bug reports. 😞 We can only release a RC if there are no known issues.

The next slot for a release candidate is this Wednesday at 18:00 UTC. Our target until then is to get the ticket count in the 4.6 milestone down to 0. To hit this goal we currently have to work on 0 open tickets. Depending on how fast the tickets are closed a RC can be released earlier.

(This post gets updated on ticket changes.)

Priority tickets this week:

  • Shiny Updates
    • #37563: On page updates: Bulk actions FTP dismissal issues (needs-review, needs-sign-off)
    • #37504: Update message displays unstyled in plugins list (needs-review, needs-sign-off)
    • #37598: Fix plugin/theme delete/install success hook inconsistency (needs-review, needs-sign-off)
    • #37603. Missing visual feedback when deleting themes/plugins (needs-review)
    • #37623: Import screen: Success message contains escaped HTML (needs-commit)
  • Bootstrap/Load
    • #36819: Load plugin.php earlier in wp-settings.php (needs-sign-off)
  • Administration
    • #37594: Quick Draft dashboard widget toggle button contains escaped HTML (needs-commit)
    • #37246: 4.6 About Page (needs-feedback)
  • Editor
    • #37481: TinyMCE: the inline toolbar position is off (needs-patch)
  • Canonical
    • #36602: Improvement to redirect_canonical with category permalink (needs-commit)
  • Multisite
    • #37607: get_site() does not return the current site when multisite is in a switched state (needs-commit)
  • Media
    • #37570: Parameter 1 to wp_handle_upload_error() expected to be a reference, value given (needs-feedback)
  • Test/Build Tools
    • #37625: Add PHP 7.1 to tested versions in Travis (needs-discussion) (punted)
  • Upgrader
    • #37628: Wrong file name for WP_Automatic_Updater

4.6 status meetings:

From today on we’ll have a status meeting on each day (Monday-Friday) until the release of WordPress 4.6. Each meeting will be at 20:00 UTC in the #core channel on Slack. We’ll use these meetings to check report/6 for any issues and to discuss/prioritize/assign tickets if necessary.

The dates:

Committers, component maintainers and current ticket owners are encouraged to attend these meetings.

#4-6, #jump-starts

Dev Chat Summary: August 3, 2016

Current status of WordPress 4.6

  • The 4.6 branch was created this week.
  • RC2 was scheduled for today, but because https://core.trac.wordpress.org/report/6 has so many open tickets its being delayed by 24 hours.
  • The first draft of the About page was committed today. Please help review it to make it ✨ Shiny ✨
  • @hugobaeta is looking for feedback on the images he’s created for the About page. The feedback will be heard and discussed in the #design weekly chat on August 4th, 2016 at 20:00 UTC.

Schedule for the next 13 days

The schedule is as follows:

  • August 10 is RC3 with the hard string freeze. The about page must be finalized by then.
  • August 12 will be code freeze. Everything should be done by this date. Only version bumps and the video should committed after this.
  • August 15 is the dry run for WordPress 4.6. We’ll check everything, prepare w.org, do a dry run for release day, and with @davidakennedy and @karmatosed we’ll release the new versions of our default themes as well.
  • And well, August 16, 2016. WordPress 4.6!

About page

As already mentioned, a first pass is committed. Check your dashboard and let us know what you think. Maybe ask some friends who aren’t involved in the release since that’s our target group.

Call for volunteers

The call for future release leads has been published. Leading a release can be a rewarding challenge. If you have questions, feel free to ping @jorbin or @helen. Everyone interested, please express it on the post, pinging @jorbin or @helen isn’t enough. They are more so available for answering questions. https://make.wordpress.org/core/2016/08/01/release-leads-call-for-volunteers/

Component announcements/updates and Open discussion

Currently the contributor handbook is lacking in documentation in regards to contributing via git. Core has supported git contributions for over 2 years. If you have a git work flow, use git, or have git knowledge in general, please consider looking over https://make.wordpress.org/core/handbook/contribute/ and adding docs where appropriate. Please remember that supporting git does not mean using GitHub.

Find full chat logs here: https://wordpress.slack.com/archives/core/p1470254406001902

#4-6, #dev-chat, #summary

Weekly Dev Chat Agenda for August 3 — Fifteen Weeks Later

This is the agenda for the weekly dev meeting on August 3, 2016 at 20:00 UTC:

If you have anything to propose to add to the agenda, please leave a comment below.

See you in the chat!

#4-6, #agenda, #dev-chat