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

  • 21 commits
  • 25 contributors
  • 43 tickets created
  • 3 tickets reopened
  • 46 tickets closed

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

Code Changes

Administration

  • Dashboard: Better titles for the Recent Drafts widget. [40877] #37595

Build/Test Tools

  • Fix PHP 5.2 compatibility for grandchild methods which expect exceptions to be raised. [40876] #39822
  • Fixed support of PHPUnit_Framework_TestCase as the base class. [40873] #39822

Bundled Theme

Help/About

I18N

  • Improve translator comments for strings in the community events widget. [40866] #40865

Media

  • Fix an issue selecting media when clicking item edges. [40874] #40578

Misc

Networks and Sites

TinyMCE

  • Force urlencoding of commas in URLs added by plugins to prevent warnings about missing stylesheets. [40862] #40893

Thanks to @bridgetwillard, @adamsilverstein, @afercia, @azaozz, @bhargavbhandari90, @circlecube, @dimadin, @flixos90, @francina, @iandunn, @iseulde, @jenblogs4u, @johnbillion, @johnroper100, @melchoyce, @michelleweber, @obenland, @ocean90, @psiico, @rcutmore, @soniakash, @sudar, @swissspidy, @voldemortensen, and @zachwtx for their contributions!

#week-in-core

Week in Core, May 24th – 30th 2017

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

  • 30 commits
  • 27 contributors
  • 40 tickets created
  • 7 tickets reopened
  • 26 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

  • Add a missing class to the PHPUnit 6 back compat. [40854] #39822
  • Remove mentions of HHVM from the test infrastructure on Travis for the 4.0 branch. [40833] #40548

Bundled Theme

Emoji

Help/About

  • About: Introduce design and add link to Media Widgets API dev note. [40849] #40721
  • About: Further polish for Under The Hood. [40841] #40721
  • About: Further polish for feature descriptions. [40838] #40721

Media

Misc

Plugins

REST API

  • In the admin area, ensure the REST API endpoint URL is forced to https when necessary. [40843] #36451

TinyMCE

Widgets

  • Normalize YouTube and Vimeo URLs in video shortcode (primarily for Video widget) to work around ME.js 2.22 bug. [40847] #32417, #39994, #40866
  • Ensure that audio and video files appear in media library browser upon upload. [40836] #32417, #39994, #39995, #40803
  • Supply missing descriptions for instance schema fields in media widgets. [40835] #32417
  • Prevent multiple items from being selectable when first populating a media widget. [40827] #32417

Thanks to @apmarshall @obenland, @hedgefield, @reportermike, @ryelle, @rclations, @westonruter, @adamsilverstein, @apmarshall, @azaozz, @bridgetwillard, @celloexpressions, @iandunn, @jnylen0, @johnbillion, @juhise, @karmatosed, @leemon, @matveb, @melchoyce, @mikeschroder, @mohanjith, @obenland, @ocean90, @pento, @peterwilsoncc, @peterwilsoncc, @Soean, @timmydcrawford, @voldemortensen, and @westonruter for their contributions!

#week-in-core

Dev Chat Summary: May 24th (4.8 week 4)

This post summarizes the dev chat meeting from May 24th (agendaSlack archive).

4.8 Timing

  • Beta 1 went out on Friday, May 12th; Beta 2 went out on Monday, May 22nd
  • RC1 is scheduled for Thursday, May 25th
  • With RC1 we’re aiming for a soft string freeze so that translators can work through all the new strings in 4.8
  • Should things continue to go to plan, RC2 would be next Thursday, June 1st

4.8 Bug Scrubs

4.8 Dev Notes / Field Guide

  • Goal is to have Dev Notes all done ASAP so we can assemble the Field Guide by RC1
  • Remaining Dev Notes to get published:
  • Listing of all tickets tagged with needs-dev-note

About Page

  • #40721: dev help needed writing copy for the Under the Hood section, please ping @melchoyce if you can help

#4-8, #dev-chat, #summary

Week in Core, May 17th – 23th 2017

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

  • 56 commits
  • 75 contributors
  • 70 tickets created
  • 7 tickets reopened
  • 71 tickets closed

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

Code Changes

Accessibility

Administration

  • Fix some HTML validation errors. [40823] #37004
  • Update the docs for wp_check_browser_version(). [40822] #40839
  • Dashboard: Change the cache key for dashboard RSS widget; remove the unnecessary database upgrade routine. [40803] #40702
  • Dashboard: Append the current locale to dashboard RSS widget cache key in wp_dashboard_rss_control(), for consistency with the changes to wp_dashboard_cached_rss_widget() in [33183] and [33192]. [40802] #32804, #40702
  • Dashboard: Don’t trigger an Events search when the search field is empty. [40799] #40816
  • Dashboard: Improve the Events widget spinner position after [40789]. [40794] #40735
  • Dashboard: Improve the handling of locations determined by geolocating the IP address and by entering a city name. Fix couple of edge cases, and some names. [40790] #40702
  • Dashboard: [40789] #40735
  • Dashboard: Combine methods to retreive IP [40781] #40702
  • Use consistent spacing for form elements in the Discussion Settings screen. [40779] #31594
  • Dashboard: Document request proxy for events. [40777] #40702
  • Dashboard: Properly localize data for events [40776] #40702
  • Dashboard: Always pass the IP when getting events [40774] #40702
  • Upgrade: Use correct commit no. to trigger upgrade [40773] #40702

Build/Test Tools

  • Remove mentions of HHVM from the test infrastructure on Travis for the 4.6 branch. [40818] #40548

Bundled Theme

  • Twenty Seventeen: Remove uneccessary return statement [40795] #40516

Customize

  • Docs: Improve phpdoc for WP_Customize_Manager, WP_Customize_Control, WP_Customize_Setting, and WP_Customize_Selective_Refresh. [40804] #39671
  • Docs: Add missing @since tags and phpdoc descriptions to the Custom_Image_Header class. [40788] #21785, #40231
  • Run a partial’s fallback behavior (full refresh) when selective refresh fails due to a script error. [40771] #27355, #40658

Help/About

I18N

  • Dashboard: Use get_user_locale() for the news feed cache key. [40793] #40417

Login and Registration

  • Add some margin to notices on the login screen so multiple notices remain separated. [40778] #39971

Media

Misc

  • Themes: Skip tests if ReflectionMethod::setAccessible is unavailable [40826] #
  • Post-4.8 Beta 2 bump. [40820] #
  • WordPress 4.8 Beta 2 ([40807] again) [40819] #
  • Revert [40807] unbumping from 4.8 Beta 2 back to Beta 1 due to aborted release. [40808] #
  • WordPress 4.8 Beta 2 [40807] #
  • Updates for 4.6. Merge of and to the 4.6 branch.

Quick/Bulk Edit

REST API

  • Fix changing parameters with set_param() for some requests. [40815] #40344
  • Avoid sending blank Last-Modified headers with authenticated requests. [40805] #40444
  • Do not set X-WP-Deprecated* headers as often. [40782] #40787

Themes

TinyMCE

  • Fix selecting the link node after creating a link by pasting an URL. [40801] #40818
  • Editor: When stripping paragraph tags, and there is a <br> at the beginning or the end, merge them and keep the paragraph, not the <br>. [40787] #37066
  • Fix pasting while an image with caption is selected. The image and the caption should be replaced with the pasted content. [40786] #40809
  • Provide styles for link and code boundaries. [40783] #40767

Users

  • Multisite: Handle both role change selections in site-users.php. [40780] #40113

Widgets

  • Further refine WP JS coding style in media widgets code. [40821] #32417
  • Remove core embedding support for WMV and WMA files since MediaElement.js has discontinued supporting them. [40813] #39994, #39995, #40819
  • Clarify some context information for translators. [40812] #32417, #39993, #39994, #39995
  • Remove unused JS variable to fix JSHint error introduced in [40640]. [40811] #39994
  • Introduce isHostedVideo method on VideoWidgetControl to allow plugins to extend for recognizing services beyond YouTube and Vimeo. [40810] #39994, #40808
  • Revert [40251] pending more accessible solution for showing default widget titles rather than using placeholders. [40806] #39909
  • Ensure title field for media widget will update with sanitized value after change event in addition to input event. [40785] #32417, #40805
  • Use “Add Audio” for button in Audio widget instead of generic “Add File”. [40784] #39995, #40797
  • Media: Trim whitespace in URLs provided for external embeds. [40772] #40771

Thanks to @4nickpick, @abhishekfdd, @adamsilverstein, @adamsoucie, @afercia, @arena, @arshidkv12, @azaozz, @BharatKambariya, @bradyvercher, @bridgetwillard, @coffee2code, @coreymckrill, @darshan02, @dd32, @desrosj, @emirpprime, @gma992, @iandunn, @iandunn, @iseulde, @Italian polyglots team, @iv3rson76, @jenblogs4u, @jeremyfelt, @jjcomack, @jnylen0, @joedolson, @joemcgill, @joen, @johnbillion, @juhise, @ketuchetan, @kraftbj, @leewillis77, @LiamMcArthur, @matveb, @melchoyce, @michalzuber, @michelleweber, @mihai2u, @MikeLittle, @mikeschroder, @mp518, @mrahmadawais, @netwe, @nitin, @kevadiya, @nobremarcos, @obenland, @ocean90, @odysseygate, @pento, @postpostmodern, @rellect, @rensw90, @rianrietveld, @riddhiehta02, @rmccue, @ryelle, @sagarjadhav, @sagarprajapati, @Samantha Miller., @sami.keijonen, @SergeyBiryukov, @sloisel, @sstoqnov, @stubgo, @swissspidy, @tejas5989, @timmydcrawford, @TimothyBlynJacobs, @topher1kenobe, @truongwp, @westonruter, and @zinigor for their contributions!

#week-in-core

Dev Chat Summary: May 17th (4.8 week 3)

This post summarizes the dev chat meeting from May 17th (agendaSlack archive).

4.7.5 Release

  • 4.7.5 was released; six security issues and three maintenance fixes, thanks to everyone who pitched in to get that out!

4.8 Timing

  • Beta 1 went out on Friday, May 12th
  • Beta 2 is due out this Friday, May 19th; potentially shepherded by @matias between 16:00 and 18:00 UTC
  • Please plan anything important before Beta 2 in by Thursday evening, May 18th

4.8 Bug Scrubs

4.8 Dev Notes / Field Guide

Location identification in Events widget

General announcements

  • Anything outside Customize, Editor, REST API, and CLI has lower priority focus in 2017
  • Major work on other components will likely not be merged or considered

#4-7, #4-7-5, #4-8, #dev-chat, #summary

4.8 Bug Scrubs for RC 1

The following bug scrubs will help us drop to 0 tickets in the 4.8 milestone by RC1 on Thursday, May 25th:

Reminder that Thursday, May 25th is 4.8 Release Candidate 1.

As a refresher, here’s a post from the 4.7 release cycle answering questions about bug scrubs.

#4-8, #bug-scrub

Dev Chat Summary: May 10th (4.8 week 2)

This post summarizes the dev chat meeting from May 10th (agendaSlack archive).

4.8 Timing

  • Reminder of Beta 1 on Friday, the complete 4.8 schedule is on Make/Core
  • At this point we’re not trying to get anything in 4.8 besides the core media widgets, dashboard news upgrade, and the next version of TinyMCE (4.6.0)
  • Merge deadline goal to have the target features today (Wednesday, May 10th), and things generally closing on Friday, May 12th
  • Friday 8 PM UTC as pencils down and the beta packaging process / release to happen
  • We’ll schedule a post hoc debrief on our workflows to be more like Chrome, with frequent, major, auto-updates

4.8 Bug Scrubs

4.8 Dev Notes / Field Guide

  • Target to post Dev Notes shortly so they can be combined, published in, and communicated with the Field Guide when the Release Candidate ships around May 25th
  • Updated listing of Dev Notes needed and those responsible:
  • Per the Releasing Major Versions page, we should aim for Dev Notes around Beta 1 so let’s call that sometime next week as current focus is on actually getting to commit for Beta 1 this week

Customize, Editor, and REST API Updates

  • Customize: A general heads up to theme authors to please test the core medias widgets for compatibility issues. The sooner issues are identified the better to get them resolved before 4.8 ships.
  • Editor: They hope to tag a first pre-alpha release of the plugin this week, so keep your radars scanning for that notification to jump in to test and provide feedback there. If you’re curious how they’re building out the foundation of Gutenberg, then read “Editor: How Little Blocks Work“.
  • REST API: They would greatly appreciate any and all feedback on #38323, especially those of you familiar with meta. This isn’t crucial for 4.8, is crucial for many use cases and any help getting this into an upcoming release would be great.

#4-8, #core-customize, #core-editor, #core-restapi, #dev-chat, #media-widgets, #summary, #tinymce

Nearby WordPress Events

In an effort to grow awareness of WordPress community events like WordCamps and meetups, a group of us have been working to upgrade the WordPress News widget, adding WordCamps and meetups, as Matt mentioned in his recent post. We’ve created a plugin (background) called Nearby WordPress Events for testing and iteration. It turns the existing News widget on the Dashboard into WordPress Events and News, with a short list of upcoming nearby events above the usual news items.

WordPress Events and News widget

Why?

The community that has been created around WordPress is one of its best features, and one of the primary reasons for its success, but many users are still unaware that it exists, and aren’t taking advantage of all of the resources that it makes available to them.

Inviting more people to join the community will help to increase its overall health, diversity, and effectiveness, which in turn helps to ensure that WordPress will continue to thrive in the years to come.

We think that wp-admin is the perfect place to display these events, because that’s the place where almost all WordPress users are visiting already. Instead of expecting them to come to us, we can bring the relevant information directly to them.

How does it work?

In order to display events that are “nearby”, the plugin uses a determined location for the current user. If a site has multiple users, each one will be shown the events that are close to their individual location. The widget tries to automatically detect a user’s location, but they’ll also be able to enter any city they like.

The WordCamp and meetup event data for the plugin is provided by a new api.wordpress.org endpoint [source, documentation].

Feedback

We’ve solicited the Community team for testing and feedback and have made several improvements. Now we’d like to take it to the next level and get feedback from the Core team, in preparation for a proposal to merge it into Core, perhaps for WordPress 4.8.

Specifically, we’d like to get testing and feedback about:

  • UX: What is the user experience like? Is it easy to find a local event near you? Do you have trouble changing your location? Have we built the widget in an accessible way? (cc +make.wordpress.org/design)
  • Location detection: Does the widget accurately detect your location? If not, be sure to report your approximate location at the time you started using the plugin/widget.
  • City search: Does it find the city nearest to you with the name you searched? How well does it work when searching in languages other than English? Character sets other than Latin? (cc +make.wordpress.org/polyglots)

The best place to file issues is the GitHub repo.

 

Kudos to everyone who worked to make this a reality: @andreamiddleton, @azaozz, @camikaos, @coreymckrill, @chanthaboune, @courtneypk, @dd32, @iandunn, @iseulde, @mapk, @obenland, @pento, @samuelsidler, @stephdau, @tellyworth

#nearby-wordpress-events

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

Week in Core, December 14th 2016 – January 3rd, 2017

Welcome back the latest issue issues (sorry) of Week in Core, covering changes [39599-39665]. Here are the highlights:

  • 67 commits
  • 56 contributors
  • 203 tickets created
  • 24 tickets reopened
  • 145 tickets closed

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

Code Changes

Bootstrap/Load

  • Bootstrap: Re-initialize any hooks added manually by object-cache.php.
    Prior to 3.1 if a object cache dropin wanted to add actions, they needed to use $wp_filter directly. [39605] #39132

Build/Test Tools

  • Tests: Restore the database connection earlier when switching test groups. [39626-39627] #39327

Bundled Theme

  • Twenty Seventeen: Fix incorrect $content_width value in theme. [39635], [39650] #39272
  • Twenty Seventeen: Hardens the logic for calling featured image in header.php [39624] #39302
  • Twenty Seventeen: Ensure functions in customize-controls.js don’t count on Customizer sections always being present [39623] #39335
  • Twenty Seventeen: Improves code readability and code standards in files [39618] #39152

Comments

  • Ignore the ‘comment_order’ setting when determining comment pagination. [39663-39664] #31101, #39280
  • Fix placement of the wp_update_comment_data filter to safeguard filtered data from triggering a database error. [39640-39641] #39380

Customize

  • Fix visible edit shortcuts for wp_nav_menu() instances using the menu arg (such as in the Custom Menu widget) instead of the theme_location arg. [39622], [39653] #27403, #39101
  • Bump wp_custom_css_cb from running at wp_head priority 11 to 101 to ensure Custom CSS overrides other CSS. [39616], [39651] #35395, #38672, #39270
  • Prevent edit shortcut from losing event handler after selective refresh. [39606] #27403, #39100

Editor

External Libraries

Feeds

  • Replace the RSS2 lastBuildDate date field with the r date specifier. [39614] #39141
  • Do not translate the lastBuildDate field in RSS feeds. [39613] #39141

Filesystem API

  • Filesystem: Add return statement to WP_Filesystem_ftpsockets->rmdir [39644] #39405

General

  • Update copyright year to 2017 in license.txt. [39659], [39661] #39433
  • Docs: Misc corrections and additions to inline documentation. [39639] #39130
  • Use interpolation instead of concatenation for all dynamic hook names. [39600] #39148

Mail

  • Ensure that any phpmailerException exceptions generated by setFrom() are caught to avoid PHP Fatal errors. [39655] #25239, #39360

Media

  • Move a variable definition outside of conditionals to ensure it’s always available.
    This [39654] #39250
  • Allow PDF fallbacks filter to process custom sizes. [39617] #39231, #38594
  • This [39612] #39250
  • PDF Images: Avoid a PHP Warning when attempting to process a file without an extension. [39607] #39195

Posts, Post Types

  • Taxonomy: Eliminate redundant and inaccurate dupe check when creating categories from post.php. [39637] #16567
  • Ensure is_page_template() can only return true when viewing a singular post query. [39599], [39608] #39211

Query

  • Don’t double-escape terms payload in WP_Tax_Query::transform_query(). [39662] #39315
  • Improve documentation for orderby=relevance in WP_Query. [39636] #39336

REST API

  • Add missing assertions to the view and embed context response data for the Users Controller. [39660] #39399
  • Add the supports property to the Post Type response object. [39647] #39033
  • Remove errant annotation from test_get_items_pagination_headers() method. [39643] #39398
  • Allow schema sanitization_callback to be set to null to bypass fallback sanitization functions. [39642] #38593, #39042
  • Docs: Add and correct @since docs for a variety of functions and methods. [39638] #39343, #39357, #39344, #39130
  • Allow sending an empty or no-op comment update. [39628] #38700
  • Improve the rest_*_collection_params filter docs and fix the terms filter. [39621] #39300
  • Fix PHP warnings when get_theme_support( 'post-formats' ) is not an array. [39620] #39293
  • Do not include the password argument when getting media items [39610] #38977
  • Do not error on empty JSON body [39609] #39150
  • WP-API: JavaScript client – fix setup of models used by wp.api.collections objects. [39603-39604] #39070
  • Add support for filename search in media endpoint. [39598] #39092

Shortcodes

  • Clarify the docs for pre_do_shortcode_tag and do_shortcode_tag. [39665] #39294

Taxonomy

  • Redirect to current taxonomy when adding a term without AJAX. [39649], [39652] #39328
  • REST API: Merge similiar error message strings in the Terms Controller. [39648] #39176
  • Ensure that mods to query vars in pre_term_query callbacks have an effect. [39625] #39354
  • Restore the ability to use string-based $args in wp_get_object_terms(). [39611] #39215

Upgrade/Install

  • Updates: Show the Authentication key settings after selecting the SSH transport in both the modal, and also on the plugin/theme updates screen. [39657-39658] #39057
  • Updates: Remove a stray " from a tag. [39656] #39057

Thanks to @adamsilverstein, @afercia, @bcworkz, @boonebgorges, @chandrapatel, @ChopinBach, @chris_de, @davidakennedy, @dd32, @dhanendran, @dl, @dlh, @dots, @dreamon11, @dshanske, @garyc40, @gitlost, @iseulde, @jblz, @jesseenterprises, @jfarthing84, @jnylen0, @joemcgill, @johnbillion, @jorbin, @JPry, @keesiemeije, @keesiemeijer, @kkoppenhaver, @kovshenin, @laurelfulford, @MattyRob, @MikeHansenMe, @natereist, @Nikschavan, @obenland, @ocean90, @pento, @peterwilsoncc, @rachelbaker, @ramiy, @sanket.parmar, @sebastian.pisula, @SergeyBiryukov, @sfpt, @shazahm1hotmailcom, @sirbrillig, @sstoqnov, @stevenkword, @szaqal21, @thepelkus, @timmydcrawford, @tymvie, @tyxla, @voldemortensen, and @westonruter for their contributions!

#4-8, #week-in-core