Week in Core, April 5th – April 11th 2017

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

  • 41 commits
  • 26 contributors
  • 61 tickets created
  • 12 tickets reopened
  • 56 tickets closed

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: Improve the failure message reported by assertQueryTrue() so it’s a little less cryptic. [40416] #40411
  • Build/Test tools: Trim the test matrix on Travis in order to speed up the 3.8 branch build. [40407-40415] #40407
  • Add assertNotFalse() method to WP_UnitTestCase and use it where appropriate. [40388] #39219


  • Verify availability of history.replaceState (in IE9) before attempting to populate changeset_uuid parameter. [40405] #39227, #40405
  • Auto-expand a widget area section when expanding the Widgets panel if there is only one registered sidebar and it is active. [40395], [40402] #37471
  • Fix behavior of clicking Delete Menu link and keep available nav menu items panel open when doing bulk deletion. [40396], [40401] #38953
  • Fix HTTPS navigation of site in preview on IE11. [40381], [40386] #38409, #40198
  • Use is_header_video_active() as active_callback for external_header_video control instead of is_front_page(). [40379], [40384] #38738, #40308
  • Fix reversal of nav menu item’s type and object properties for page stub added in customizer. [40380], [40383] #38164, #40277


  • Build/Test tools: Remove occurrences of create_function() in unit tests. [40392] #37082


Networks and Sites

  • Multisite: Replace unnecessary is_super_admin() check when setting up the initial network. [40406] #40406, #37616
  • Align the display of site statuses on the Sites listing screen with those of posts on the Posts listing screen. [40393] #40290
  • Multisite: Partially revert [40295]. [40391] #39676, #37616
  • Multisite: Handle sites cache invalidation more granularly for option updates. [40385] #40063




  • Update the tests for version 4.5.6. Remove default plugins tests, it is quite pointless to keep repeating them at this point. [40399] #40305
  • Update TinyMCE to 4.5.6. Has many improvements and bug [40398] #40305


  • Introduce wp_disallow_file_mods() helper function. [40394] #38673

Thanks to @adamsilverstein, @ashokkumar24, @azaozz, @blobfolio, @curdin, @DavidAnderson, @delawski, @desrosj, @dhanendran, @flixos90, @jnylen0, @joemcgill, @johnbillion, @ketuchetan, @maguiar, @MatheusGimenez, @mattwiebe, @MaximeCulea, @melchoyce, @peterwilsoncc, @pratikshrestha, @sboisvert, @swissspidy, @timmydcrawford , @westonruter, and @wonderboymusic for their contributions!


4.7.4 Bug Scrub

Thursday, April 13th 15:00 UTC has been scheduled for a bug scrub.

The bug scrub focus will be on tickets milestoned for 4.7.4 and the conversation will take place in #core. This will be the final bug scrub for 4.7.4 and any tickets remaining in the milestone after the bug scrub will be punted to 4.7.5 or a future release. Reminder that 4.7.4 is scheduled for release on Tuesday, April 18, 2017 with Thursday, April 20, 2017 as a fallback.

#4-7, #4-7-4, #bug-scrub

Image Widget Merge Proposal

As part of this year’s Customization Focus, @westonruter, @obenland, @adamsilverstein, @timmydcrawford, @gonom9, and I have been working on creating an image widget for core. This new widget lets you quickly and easily add an image to your site’s widget areas.

You may have previously seen this come up as a media widget on Trac, before we decided to split the widget up into individual media-focused widgets. Having single widgets makes them more discoverable, and eases the way forward for similar blocks in the Editor. The image widget is the first in a series of media-focused widgets we’ll be introducing to core.

You can check out the widget on GitHub, install the plugin from WordPress.org, or check out the Trac ticket.

Why make an image widget?

People want to add images to their widget areas. Visit any subject blog across the internet and you’ll likely find images in the sidebars. People add photos of themselves along with bio blurbs, link to their books, promote upcoming events with graphics, partner with other blogs and exchange ads, and add call-to-actions using images.

The current process for adding an image to your widget areas is quite painful. You need to:

  1. Upload or select an image in your media library.
  2. Copy the image URL.
  3. Go to the widgets admin screen, or the widgets panel in the Customizer.
  4. Create a new Text widget.
  5. Add the image to the Text widget using HTML, which is often a barrier for new or non-technical site maintainers. (See #35243 for work to add a visual mode to Text widget.)

This is a huge barrier to what should be a relatively simple task. This new image widget makes it much easier to add an image to your widget areas by natively integrating with core’s media library.

How is it implemented?

There hasn’t been any new widget types added to core in a long time; the Custom Menu widget was the last widget added in WordPress 3.0—almost 7 years ago! (The core themes Twenty Eleven and Twenty Fourteen did include their Ephemera widgets since then.) Since widgets are a very old part of WordPress, widgets in core have been very much entirely built using PHP with some Ajax sprinkled on top. In the time since WP_Widget was introduced in 2.8, WordPress has made dramatic shifts toward developing interfaces in JavaScript, including with the Customizer in 3.4 and the Media Library in 3.5, and more recently with the focus on the REST API.

Given that the media widgets are naturally interfacing with the media library JS, it is necessary that the media widgets make use of JavaScript to construct their UI instead of relying on PHP. Initial groundwork for shimming JavaScript into widgets was added in 3.9 via the widget-added and widget-updated events. A more recent proposal for making JavaScript more of a first class citizen can be found in #33507 and the media widgets incorporate some of its patterns that were also prototyped in the JS Widgets plugin. The media widgets make use of a Backbone View to manage the widget control’s UI and a Backbone Model for reading and manipulating the widget instance data.

Another unique aspect of how the media widgets work is how instance data is sanitized. Normally widgets write procedural code to sanitize instances via a subclassed WP_Widget::update() method. The media widgets, however, make use of a REST API schema returned from WP_Widget_Media::get_instance_schema() to sanitize instances declaratively. The WP_Widget_Media::update() method iterates over the schema and uses it to sanitize and validate the instance properties. Adding schemas to the base WP_Widget class is also proposed in #35574.

Please test

Please test the image widget. For now, you can grab the latest version of the widget on GitHub. You can either check it out locally using Git, or download a zip by clicking “Clone or download” → “Download ZIP.” Alternately, you can download the nightly version of the plugin from the WordPress.org plugin directory.

#image-widget, #media-widgets

Dev Chat Agenda for April 12th (4.7.4 week 6)

This is the agenda for the weekly dev meeting on April 12, 2017 at 20:00 UTC:

  • 4.7.4 planning (bug scrub & release timing)
  • General announcements

If you have anything to propose to add to the agenda or specific items related to the above, please leave a comment below. See you there!

#4-7, #4-7-4, #agenda, #dev-chat

Dev Chat Summary: April 5th (4.7.4 week 5)

This post summarizes the dev chat meeting from April 5th (agendaSlack archive).

4.7.4 Planning

  • Bug scrub on Monday helped close additional tickets, < 30 tickets in the milestone
  • Needs Patch tickets likely to be punted to next release if no progress/patch soon
  • Still aiming for an early May release
  • @barry to work on resolving issue with Git mirror at develop.git.wordpress.org (tests not running on Travis, uncertain about build status)
  • Please help test tickets, especially #40085 and #40075 as high priority tickets

Community Summit and Core team reps

  • Invites to Community Summit have been sent out, please RSVP if you haven’t done so
  • @desrosj, @stevenkword, & @adamsilverstein in attendance at CS and WCEU and will be Core team reps to help coordinate for CS

Customize Team

  • Image widget is getting close to being ready for merge, so please test to help ensure its solid


  • #38323: Reconsider $object_subtype handling in register_meta()
    • Looking to gather feedback on a solid approach for enhancing register_meta(), so that metadata may also be registered for specific “subtypes” only, not entire object types
    • When originally enhanced (see #35658), this functionality was stripped out in the end because of a lack of decision and since time was running out in the 4.6 cycle
    • Some discussion earlier today that culminated in #core-restapi channel
    • A problem is that Core has never before used the concept of “subtypes”, we’ve always dealt with post types and taxonomies (for example) separately
    • Will continue the technical discussion in #core-restapi or on the #38323 ticket
    • If anyone has further ideas on how to clarify the functionality of register_meta(), please help us out in #core-restapi or on the related GitHub issue


#4-7, #4-7-4, #community-summit, #core-customize, #dev-chat, #summary

Editor Experience Survey Results

The Editor Experience Survey results are in! There were a total of 2,563 responses which were gathered anonymously through PollDaddy. There was a big focus on asking multiple choice questions to keep the survey manageable. I tried to provide images where relevant and ask actionable questions as I could.

Thanks to: @iseulde, @karmatosed, @melchoyce, @joen, @designsimply, @azaozz, @chanthaboune, @samuelsidler, @codebykat and many more for helping me organize this survey.

Let’s jump in.

How do you use WordPress?

This question was pulled from the annual WordPress survey which helped reveal the backgrounds of the respondents. I was hoping for a more diverse group from a variety of backgrounds using WordPress, but this sampling should provide decent insight. Keep in mind that respondents were allowed to answer more than one.

Developers clearly dominated the survey. Because of this, I wanted to break this stat down a bit more. This chart displays each category outside of “Developer”. The blue represents the amount of respondents that selected that category, but did not select “Developer”. The red represents the amount of respondents that chose “Developer” plus that category.

The total respondents that selected “As a Developer” in this survey was 1,703 out of 2,563 total responses.

How often do you use the Editor?

This questions was written in an effort to make sure the results were from respondents that used the Editor. As can be seen, 89% use the Editor weekly or more.

Do you use the markup text Editor?

Is the Text Editor an important part of people’s workflow while using WordPress? It was interesting to see that over 85% of respondents use the Text Editor sometimes or more.

“Only one wish: please don’t remove the plain text/mark-up editor.”


“I’m a huge fan of the text editor. I like the ability to use raw html when necessary.”


“Would really appreciate syntax highlighting in text view.”


Do you use the markup buttons?

While a vast majority of respondents use the Text Editor, almost half never use the markup buttons.

Do you use the distraction free writing mode?

The distraction-free writing mode seems to be often overlooked or just ignored in the respondent’s flow when using the Editor. Could it be that the button to initiate the distraction-free writing mode is a distraction itself?

“I love the distraction-free writing option but wish it offered a wider column for editing purposes and easy size-adjusting for easier reading/editing.”


“I like distraction free mode when I remember it’s there. Would be cool if choosing to edit a post/page from the front end invoked something like distraction free mode as a modal overlaying the page, allowing for quick editing and committing.”


“[Would like] better Distraction Free (not just hiding surrounding menus, but expanding the actual text area)”


“I like the distraction free mode a lot. It makes it easier to write directly in the editor in a clutter-free way.”


“‘Distraction free’ is depressing due to the large gray area and limited writing space for desktop.”


“Distractions free mode is an utter joke.”


“Would like to see a full screen version. Distraction free just removes the menus, full screen would allow the menus on top and bottom but still give the complete screen width.”


“I wish the distraction free mode was how it used to be with bigger fonts and centered.”


Installing plugins that added features to the Editor

Exploring these questions might help reveal which features respondents are looking for in the Editor itself. The majority answered that they had installed plugins to add features. The most common features are graphed below.

Current Editor ease-of-use and organization

On a scale of 1 to 5 (5 being Very Easy or Very Organized), the majority of respondents found the current Editor’s ease-of-use and organization to be sufficient or better.

Editor Accessibility

105 respondents use a screen reader. 94 of those people feel the screen reader experience is sufficient or better. Other assistive technologies used by the respondents include: On-screen keyboards, alternative input devices like wands & sticks, voice recognition programs, screen enlargers, text to speech synthesizers, and braille embossers.


Some quotes from the survey question about accessibility issues with the Editor:

“You need to add more notifications for screen reader when somethings change on the page.”


“I reached and pressed the Publish button and forgot that there are meta boxes after that. So then I had to fill up the category and tags then shift + tab to go back to Update the post.”

Is there anything in the Editor you never use?

I was hoping to discern some of the less used items in the Editor. This question is not intended to provide for support for eliminating any elements within the Editor, but rather to help with visual hierarchy in the new Editor. By far, the main element never used was the “Text color” dropdown, followed closely by the “Special character” button, the “Insert Read More tag” button, and the “Distraction-free writing mode” button.

Is there anything else about the Editor you’d like to share?

The last question yielded 37 answers. I’ve pulled a few interesting ones below.


“Please make the editor to seems as an a4 paper it is best for authors :)”


“Add a no follow option in the link editor.”


“I’d like to see the bullet points/numbers to go along with the text if I increased or decreased indentation.”


“Would be way better if you could edit directly on the site instead of having to open the dashboard and find the content somewhere there.”


“Better implementation of shortcodes would be a real benefit.”


“I would like that to see an easier way to bring the cite tag to the editor to use with blockquote.”


“Wish there was better support for content columns.”


“I would love much better WordPress support for writing in various apps and then posting to WordPress. […] In particular I’d like to see it in a lot more text editors / note taking apps, […]. Writing in a web page in a browser is never going to be comfortable, or at least never as comfortable as a “native” experience, so I recommend focusing on letting people use the native experiences with which they’re most comfortable.”



The Editor Team is working hard on redesigning the Core Editor experience to be something WordPress users could enjoy using daily. If you feel anything important was not represented in this survey, please comment below. If you have any feedback regarding the results or future work on the Editor, please feel free to comment as well. I look forward to the improved Editor experience in Core!




#core-editor, #survey

Week in Core, March 29th – April 4th 2017

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

  • 28 commits
  • 29 contributors
  • 81 tickets created
  • 8 tickets reopened
  • 51 tickets closed
    Ticket numbers based on trac timeline for the period above. The following is a summary of commits, organized by component.

Code Changes


Bundled Theme

  • Twenty Seventeen: Use esc_attr_e() for translatable strings in HTML attributes. [40374] #40216
  • Twenty Seventeen: Declare jQuery as a dependency for navigation.js. [40373] #40224



  • Change the embed_autourls option filter from default_option_* to pre_option_* to avoid a DB query. [40360] #38924


  • Remove an extra slash between .mo file path and name in load_muplugin_textdomain(). [40362] #39168


  • Use correct capitalization for PHPMailer methods in wp_mail(). [40363] #39702


  • Accessibility: Improve the Media Library inline uploader accessibility. [40359] #37188

Networks and Sites

  • Multisite: Fix wp_get_sites() to return an unlimited amount of sites when passing a falsy limit argument. [40372] #39879, #35791
  • Multisite: Add $network_id parameter to get_user_count(). [40371] #37866
  • Multisite: Support the $network_id parameter of get_blog_count(). [40370] #37865
  • Multisite: Correct documentation for site status change hooks. [40352] #40287
  • Multisite: Add deleted_blog action after site has been deleted. [40351] #25584

Posts, Post Types

  • Introduce post_date_column_status filter for post status text in list tables’ Date column. [40361] #39545

Press This

  • Reorder post format icon styles for consistency with get_post_format_strings(). [40356] #40304
  • Add missing icons for Chat and Status post formats. [40355] #40304

Quick/Bulk Edit


  • JS Client – Enable connecting to multiple endpoints. [40364] #39683
  • Tests: Remove a couple of invalid error assertions. [40350] #40270


  • Invalidate term query caches when setting or deleting term relationships. [40353-40354] #40306
  • Fix typo in $aria_checked variable name in Walker_Category_Checklist::start_el(). [40348] #40295

Thanks to @adamsilverstein, @afercia, @boonebgorges, @bor0, @chesio, @davidbenton, @dhanendran, @dlh, @ejner69, @flixos90, @iandunn, @jeremyfelt, @jnylen0, @johnbillion, @johnjamesjacoby, @karmatosed, @lucasstark, @mantismamita, @mboynes, @menakas, @mt8.biz, @nsundberg, @pauldewouters, @pbearne, @reidbusi, @SergeyBiryukov, @Soean, @swissspidy, and @westonruter for their contributions!


Dev Chat Agenda for April 5th (4.7.4 week 5)

Please note the changed start time of this dev chat to account for DST. This is the second meeting at this new time.

This is the agenda for the weekly dev meeting on April 5, 2017 at 20:00 UTC:

  • 4.7.4 planning (milestoned tickets update)
  • Community Summit Core team reps
  • Customize team (approach for committing new widget code)
  • REST API team (review of #38323)

If you have anything to propose to add to the agenda or specific items related to the above, please leave a comment below. See you there!

#4-7, #4-7-4, #agenda, #dev-chat

Dev Chat Summary: March 29th (4.7.4 week 4)

This post summarizes the dev chat meeting from March 29th (agendaSlack archive).

4.7.4 Planning

  • There were only 35 open tickets in the milestone at the time of the meeting.
  • 2 bug scrubs over the last 2 weeks helped close a lot of those open tickets.
  • The release is still on schedule for the first week of May, but a few more bug scrubs are necessary.
  • If you have owned a ticket, please help test it!
  • Next bug scrub will take place on April 3, 2017 at 17:00 UTC. @stevenkword offered to help.

Editor Team

  • Nothing in particular to discuss this week.
  • Work continues on the editor feature plugin.
  • Day to day discussion and work happens in the #core-editor Slack channel, and the Gutenberg GitHub project.
  • Help testing, feedback, and contributions are welcome in both places.


  • No updates this week.
  • Work continues in the #core-restapi Slack channel.
  • There are some component tickets in the 4.7.4 milestone that will hopefully be closer to merge this week.

Core team reps

Open Floor Items

  • @dlh brought up #36188
  • @stevenkword brought up #20899
  • Both requested additional eyes, and people to test the fixes. Both offered to trade tickets and test.

#4-7, #4-7-4, #community-summit, #core-editor, #core-restapi, #dev-chat, #summary

Week in Core, March 22nd – 28th, 2017

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

  • 41 commits
  • 27 contributors
  • 76 tickets created
  • 14 tickets reopened
  • 65 tickets closed

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

Code Changes


  • List Tables: After [38703], [38706], and [40118], adjust the jQuery selector to make the selection of a range of checkboxes work again. [40327] #40056
  • Docs: Add description for $mode global in WP_MS_Sites_List_Table and WP_MS_Users_List_Table. [40310] #40208
  • Docs: Add description for $mode global in WP_Media_List_Table and WP_Posts_List_Table. [40309] #40208
  • Docs: Add missing @global entry for list table view mode in WP_Screen::render_view_mode(). [40308] #40208
  • Docs: Add missing @global entry for list table view mode in wp_ajax_inline_save(). [40307] #40208

Bundled Theme

  • Twenty Seventeen: Declare jQuery as a dependency for navigation.js. [40315] #40224
  • Twenty Seventeen: Use esc_attr_e() for translatable strings in HTML attributes. [40311] #40216

Cache API



  • Tests: Use utf8mb4 max index length when creating keys. [40339] #35958


  • Docs: Correct default value in @param entry for the $num_words parameter of wp_trim_words filter. [40322] #40248

Login and Registration

  • Avoid a potentially incorrect value for the cookie hash on multisite installations that don’t have a value in the siteurl network option. [40320-40321] #34084, #39497

Networks and Sites

  • Multisite: Respect $_wp_suspend_cache_invalidation when clearing network and site caches. [40346] #40028
  • Multisite: Allow falsy properties to be cached in site-details. [40344] #40247
  • Tests: Clarify zero path segment tests for get_network_by_path(). [40342] #37217
  • Multisite: Add lang_id support to WP_Site_Query. [40340] #40196
  • Multisite: After [40305], rename clean_site_details_cache() method as it’s not really private. [40333] #40063
  • Multisite: Add further unit tests for get_blog_details(). [40317] #40228, #40180

Posts, Post Types

  • Add missing REST API properties to WP_Post_Type class. [40329] #39986


  • Tests: Consolidate logic used to skip API fixture generation. [40341] #40041
  • Confirm the parent post object of an attachment exists in WP_REST_Posts_Controller::check_read_permission(). [40337] #39881
  • Add gmt_offset and timezone_string to the base /wp-json response. [40336] #39854
  • Use get_gmt_from_date() when preparing a draft post for response. [40324-40325] #40136


  • Add missing REST API properties to WP_Taxonomy class. [40328] #39987


  • Fix incorrect annotation for __clear_multi_author_cache() function. [40334] #40063, #40262
  • Add filter for excluding directories from being scanned for template files. [40326] #38292


  • Don’t push the current user’s role to the top of the list in wp_dropdown_roles(). [40323] #40162

Thanks to @afercia, @aussieguy123, @bor, @bor0, @caseypatrickdriscoll, @chesio, @clarinetlord, @danielbachhuber, @dd32, @dlh, @flixos90, @GhostToast, @jeremyfelt, @johnbillion, @johnjamesjacoby, @lukasbesch, @michelleweber, @nerrad, @ocean90, @priyankabehera155, @rachelbaker., @redrambles, @sagarkbhatt, @SergeyBiryukov, @swissspidy, and @westonruter for their contributions!