Week in Core, Mar 22 – Mar 29 2016

Welcome back to the latest issue of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., covering changes [37061-37091]. Here are the highlights:

  • 30 commits
  • 23 contributors
  • 82 tickets created
  • 9 tickets reopened
  • 46 tickets closed
  • RC1 released on March 25th
  • Target releaseRelease A release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software. date for 4.5 is April 12th

Ticketticket Created for both bug reports and feature development on the bug tracker. numbers based on trac timeline for the period above.

Note: If you want to help write the next WordPress Core Weekly summary, check out the schedule over at makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility)./docs and get in touch in the #core-weekly-update SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel.

Administration

  • Common CSSCSS Cascading Style Sheets.: Reset bottom padding for .nav-tab-wrapper. [37073] #35960

Build/Test Tools

  • Ensure that the default wp_die() handler can handle a WP_Error object. [37071] #36166

Canonical,Canonical

  • Restore the is_404() check in wp_old_slug_redirect() which was removed in [34659]. This reverts part of [34659] due to excessive canonical problems it’s caused in 4.4.x. [37075] #21602, #35344

Customize

  • Bring custom-logo args closer to custom-headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.. [37077] #36255
  • Customize: Replace site logo with custom logo terminology, fixing failure to preview logo changes. Fixes #35855. [37066] #36255, #35855

Editor

  • Make the tooltip for the ‘apply’ button in the inline link dialog translatable. [37091] #36366

Embeds

  • Docs: Use third-person singular verbs for summary DocBlocks in WP_oEmbed. Also [37068] #36296
  • Docs: Improve and add missing DocBlocks for methods and properties in WP_oEmbed. [37067] #36296
  • Docs: Standardize file headers for two embed templates introduced in [36693] for #34561. Also missed props for flixos90 on [37087]. [37088] #34561, #35986, #36352
  • Docs: Reference the correct embed templates and template parts filenames in headers for embed files introduced or changed in 4.5. [37087] #34561, #35986, #36352
  • Docs: Properly mark $args parameters in two WP_oEmbed methods as optional. Also clarify that the $args parameters can accept a string (the default) in addition to an array. [37069] #36296

Emoji

  • Fix the diversity emoji check in Safari. [37090] #36266
  • Add some extra IE11 compatibility. IE 11’s implementation of MutationObserver is buggy. It unnecessarily splits text nodes when it encounters a HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. template interpolation symbol ( “{{“, for example ). So, we join the text nodes back together as a work-around. [37089] #35977

External Libraries

General

  • Docs: Following [37085], properly indent the markdown-formatted examples in the DocBlockdocblock (phpdoc, xref, inline docs) for wpdb::esc_like(). [37086] #32246
  • Docs: Add missing quotes around a specifier in a query example in the DocBlock for wpdb::esc_like(). [37085] #32246
  • Update TinyMCE and jQuery UIUI User interface button styles. Part props liljimmi. [37076] #35571

JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/.

Mail

Query

  • Query: Ignore search terms consisting of a single dash. [37082] #36195

TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies.

  • After [36874], run the correct load-edit-tags.php hook on the new term edit page. When not misspelled, this hook is useful (and needed) for backward compatibility. UnpropsUnprops A commit that removes code gone awry may include unprops as a sign of respect for the risk taken by the original people working on it. swissspidy. [37084] #34988

Themes

  • Docs: Improve the DocBlocks for get_header_textcolor() and header_textcolor() to mention that they both retrieve color values in the HEX format. [37083] #36336

TinyMCE

Widgets

  • Improve inline documentation syntax throughout WP_Widget. [37065] #36298
  • Add missing information to the WP_Widget PHP4 constructor DocBlock. Also add several missing at @access tags to other method DocBlocks and clarify parameter docs for WP_Widget::form_callback(). [37064] #36298
  • Use third-person singular verbs for method summaries in WP_Widget_Factory. [37063] #36299
  • Add missing information to constructors DocBlocks for WP_Widget_Factory. [37062] #36299
  • Add a missing DocBlock for the WP_Widget_Factory::$widgets property. [37061] #36299

Thanks to @ankit-k-gupta, @azaozz, @boonebgorges, @celloexpressions, @dd32, @DrewAPicture, @ericdaams, @flixos90, @iseulde, @madvic, @maweder, @mikeschroder, @obenland, @ocean90, @pento, @raimy, @ramiy, @RomSocial, @SergeyBiryukov, @swissspidy, @theMikeD, @utkarshpatel, and @westonruter for their contributions!

#4-5, #week-in-core

jQuery Updates in WordPress 4.5

jQuery was updated from version 1.11.3 to 1.12.2, see [36285], [36680], and [37070].
At the same time jQuery Migrate – the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party to detect and restore APIs or features that have been deprecated in jQuery – was updated from 1.2.1 to 1.4.0 ([36285] and [37072]).

The non-minified version of jQuery Migrate throws a few more warnings now. See some examples from coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. in [36286-36288].

🔬 Please test your plugins and themes with the non-minified version to makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility). them compatible with future versions of jQuery.

Ticketticket Created for both bug reports and feature development on the bug tracker.: #35380

#4-5, #dev-notes, #external-libraries

The Editor in WordPress 4.5

Inline Link Toolbar

From WordPress 4.5 you will be able to link text with an inline toolbar, which replaces the link modal. You will still be able to access the modal with the gear icon in the toolbar, if you’re using one of the advanced fields or are using a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party that extends the modal. Eventually we will try to move all those fields inline, though still under an advanced toggle and not visible by default. For those interested, see #36312.

Inline link toolbar.

Text Patterns

We also added some more text patterns, or shortcuts if you like: `text` will change to <code>text</code> and --- (or more dashes) will change to <hr> while typing. We considered adding patterns for bold and italic, but there was no consensus yet and we’d like to test the inline text patterns first on an HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) mostly used by developers. See #33301.

#4-5, #dev-notes, #editor

Core Dev chat notes for March 23

Agenda

Schedule Notes, Status Updates, RC Triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors..

Schedule Notes

  • Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1 will go out today, as per the release schedule.
  • April 12 is the target releaseRelease A release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software. date for WordPress 4.5.
  • Release Candidate means a soft string freeze, except the About Page.
  • Also, every commit must be approved by two leads or permanent committers, and only regressions or blockers are addressed.
  • In other logistics, @jorbin had a couple of comments regarding the field guideField guide The field guide is a type of blogpost published on Make/Core during the release candidate phase of the WordPress release cycle. The field guide generally lists all the dev notes published during the beta cycle. This guide is linked in the about page of the corresponding version of WordPress, in the release post and in the HelpHub version page.:
    • There is a firm deadline of Monday 16:00 GMT for the two remaining posts (@rmccue on the Rest APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. and @iseulde on Editor Shortcuts).
    • He’s planning on posting the field guide on Monday, following that deadline.

Status Updates

  • Image Improvements: @joemcgill
    • Not much to report. All the remaining tickets from the Media component have been cleared. It looks like there was some movement on #36191.
  • Theme Logo Support: @obenland
    • We have 2 open tickets in the queue, both possibly fixed by the same commit.
    • The goal is to makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility). theme support arguments be closed to custom_header and remove the necessity to create a custom image size.
  • Editor: @azaozz, @iseulde
    • Everything looking good, squashing some minor bugs.

RC Triage

Ticketticket Created for both bug reports and feature development on the bug tracker. triage continued addressing tickets in preparation for Release Candidate 1.

 

Full meeting logs in Slack.

#4-5, #dev-chat

Week in Core, Mar 15 – Mar 22 2016

Welcome back the latest issue of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., covering changes [37001-37060]. Here are the highlights:

  • 59 commits
  • 30 contributors
  • 57 tickets created
  • 3 tickets reopened
  • 47 tickets closed

Ticketticket Created for both bug reports and feature development on the bug tracker. numbers based on trac timeline for the period above.

Note: If you want to help write the next WordPress Core Weekly summary, check out the schedule over at makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility)./docs and get in touch in the #core-weekly-update SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel.

Code Changes

4.5

Customize

  • Prevent preview iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser. from showing until fully loaded. Fixes #36276. [37060] #31195, #36276
  • Add support for flex sizes in CustomizeImageCropper. [37042] #36255, #34851
  • Require opt-in for selective refresh of widgets. [37040] #27355, #35855

Dashicons

  • Fix incorrect ID in SVG version of font. [37037] #34221
  • Updates .dashicons-googleplus (f462) and adds three new icons, .dashicons-move (f545), .dashicons-laptop (f547), and .dashicons-paperclip (f546). [37036] #34221

Docs

  • Mark optional method parameters as such in Walker_Page. Also normalizes parameter spacing following [37056]. [37057] #36300
  • The page object type in use in Walker_Page is WP_Post. [37056] #36300
  • Improve inline documentation for properties and methods in Walker_Page. [37055] #36300
  • The page object type in use in Walker_PageDropdown is WP_Post. [37054] #36300
  • Improve inline documentation for properties and methods in Walker_PageDropdown. [37053] #36300
  • Normalize Walker_Comment method parameter docs spacing following [37051]. [37052] #36300
  • Comment display element object types for Walker_Comment are WP_Comment since 4.4.0. [37051] #36300
  • Improve inline documentation syntax for Walker_Comment. [37050] #36300
  • Standardize the class DocBlockdocblock (phpdoc, xref, inline docs) summary for Walker_Comment. [37049] #36300
  • Improve inline documentation for properties and methods in Walker_Comment. [37048] #36300
  • Mark optional parameters in Walker_Category methods as such. Also cleans up some syntax. [37047] #36300
  • Improve inline documentation for property and methods in Walker_Category. [37046] #36300
  • Improve inline documentation in property and method DocBlocks for Walker_CategoryDropdown. [37045] #36300
  • Change the ‘HTTPSHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information.’ column headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. to ‘Supports HTTPS’ in the markdown providers tables in the hook doc for the oembed_providers filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output.. [37039] #32246
  • Add Twitter timelines and moments to the table in the hook doc for the oembed_providers filter, introduced in [36954]. [37038] #36197, #35986
  • Document default WP_Ajax_Response::add() arguments as a hash notation. Adds example output to the DocBlock description based on default argument values. [37032] #32246
  • Improve 4.5 changelog entries introduced in [36992] for wp_authenticate(), and the authenticate and wp_login_failed hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.. [37030] #9568, #35986
  • Clarify documentation for the xmlrpc_enabled filter to better explain that its scope only extends to methods requiring authentication [37025] #21509, #36055
  • Use a third-person singular verb in the DocBlock summary for WP_REST_Response::get_curies(), introduced in [36533]. Also adds a missing return description. [37015] #34729, #35986
  • Improve parameter description syntax in the hook doc for the rest_request_from_url filter, introduced in [36673]. [37014] #35803, #35986
  • Improve the DocBlock for WP_REST_Request::from_url(), introduced in [36673]. [37013] #35803, #35986
  • Use a third-person singular verb in the DocBlock summary for WP_Customize_Site_Icon_Control::content_template(), introduced in [36698]. Also adds a missing access notation. [37012] #33755, #35986
  • Add a missing version and access information to the DocBlock for the WP_Customize_Selective_Refresh->$manager property, introduced in [36586]. [37011] #27355, #35986
  • Standardize the file header and class summarries for the file containing WP_Customize_Selective_Refresh, introduced in [36586]. [37010] #27355, #35986
  • Standardize the file header and class summaries for the file containing WP_Customize_Partial, introduced in [36586]. [37009] #27355, #35986
  • Clarify the use of the get_currentuserinfo() for backward compatibility purposes in the DocBlock description for _wp_get_current_user(), introduced in [36651]. [37008] #19615, #35986
  • Use a third-person singular verb in the DocBlock summary for wp_authenticate_email_password(), introduced in [36617]. [37007] #9568, #35986
  • Add a couple of spaces before hook docs for filters introduced in 4.5. [37006] #35986

Editor

  • Fix exiting DFW with the keyboard shortcut on Mac (Opt+Ctrl+W). [37003] #36222

Emoji

  • The everythingExceptFlag browser support flag, introduced in [36816], wasn’t being initialised correctly. [37029] #35300
  • Fix the diversity emoji check in Safari. [37028] #36266

I18Ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

  • Move translatable Codex URLs to separate strings in wp-admin/includes/meta-boxes.php. [37016] #35751

Media

  • Fix erroneously inserting a rel attribute in get_image_send_to_editor(). Reverts most of [34259] and [34260] and adds a unit testunit test Code written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression.. [37035] #36084
  • When generating the base URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org to be used in the srcset attribute, use an https scheme when the image base URL’s host matches that of the current host, and the request is being served over HTTPS. This prevents mixed content warnings caused by httpHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. embedded media. [37022] #34945

Responsive Images

  • The src of the image has to be first in the srcset, because of a bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. in iOS8. Update the unit tests to reflect the changes. [37034] #35030
  • Skip images with a missing $image_meta['file'] value. [37018] #35480
  • Do not attempt to create srcset when the image metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. is missing or corrupted. [37002] #35480

REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.

  • Provide better method for generating CURIEs [37041] #34729
  • Add home_url to APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. index to avoid confusion with site_url. [37031] #35647
  • Remove unused variable $api_root from WP_Rest_Server->embed_links() method. [37021] #35803

Themes

  • Twenty Thirteen, Twenty Fourteen, Twenty Fifteen: Update screenshots to 1200 x 900 [37033] #34806

TinyMCE

  • Adjust textpattern tests for the changes in [37023]. [37024] #33300
  • Remove *** and ___ text pattern and support for spaces in ---. The only hr text pattern is 3 or more dashes, no spaces. Remove the *, _, and __ text patterns for bold and italic. [37023] #33300

TinyMCE, Inline Link

  • Add back the bottom box-shadow on the Apply button. Shrink .mce-btn.mce-primary to compensate for the bottom box-shadow. Tighten up/reduce the margins between the buttons. [37004] #33301
  • Remove bottom box-shadow from the Apply button so it matches the rest. Change the tooltip for the cogwheel button to Link options. [37001] #33301

Build/Test Tools

  • Allow to cache the node_modules directory. This should speed up the installation of npm dependencies. [37058] #36291
  • Bump grunt-contrib-qunit ~0.7.0 → ~1.1.0 [37020] #35104
  • Bump grunt-contrib-watch ~0.6.1 → ~1.0.0 [37019] #35104
  • Bump grunt-contrib-jshint ~0.11.3 → ~1.0.0 [37017] #35104

Users

  • In edit_user() check for a blank password when adding a user. [37059] #35715

XMLRPC

  • Unit tests left off [r37043] [37044] #35874
  • Fix bug where draft posts couldn’t be published in the future, and would publish immediately. [37043] #35874

Props

Thanks to @aargh-a-knot, @adamsilverstein, @azaozz, @DrewAPicture, @empireoflight, @gitlost, @iamtakashi, @jaspermdegroot, @joehoyle, @joemcgill, @johnbillion, @jorbin, @karmatosed, @liljimmi, @melchoyce, @mensmaximus, @mikeschroder, @netweb, @ocean90, @overclokk, @pbearne, @pento, @rachelbaker, @raimy, @ramiy, @redsweater, @SergeyBiryukov, @wesleye, and @westonruter for their contributions!

#4-5, #week-in-core

Implementing Selective Refresh Support for Widgets

WordPress 4.5 includes a new CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. framework called selective refresh. To recap, selective refresh is a hybrid preview mechanism that has the performance benefit of not having to refresh the entire preview window. This was previously available with JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors.-applied postMessage previews, but selective refresh also improves the accuracy of the previewed change while reducing the amount of code you have to write; it also just makes possible to do performant previews that would previously been practically impossible. For example, themes often include some variation of the following PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 and JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. to enable performant previewing of changes to the site title:

function mytheme_customize_register( WP_Customize_Manager $wp_customize ) {
	$wp_customize->get_option( 'blogname' )->transport = 'postMessage';
}
add_action( 'customize_register', 'mytheme_customize_register' );

function mytheme_customize_preview_js() {
	$handle = 'mytheme-customize-preview';
	$src = get_template_directory_uri() . '/js/customize-preview.js';
	$deps = array( 'customize-preview' );
	$ver = '0.1';
	$in_footer = true;
	wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
}
add_action( 'customize_preview_init', 'mytheme_customize_preview_js' );
( function( $, api ) {
	api( 'blogname', function( setting ) {
		setting.bind( function( value ) {
			$( '.site-title a' ).text( value );
		} );
	} );
} ( jQuery, wp.customize ) );

In 4.5, the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. themes now utilize selective refresh for previewing the site title and tagline. This allows the above code to be replaced with the following PHP:

function mytheme_customize_register( WP_Customize_Manager $wp_customize ) {
	$wp_customize->selective_refresh->add_partial( 'blogname', array(
		'selector' => '.site-title a',
		'render_callback' => function() {
			bloginfo( 'name' );
		},
	) );
}
add_action( 'customize_register', 'mytheme_customize_register' );

So as you can see, not only is the amount of code more than cut in half (also eliminating the JS file altogether), it also ensures that when a site title change is previewed it will appear with all of the PHP filters applied from core and plugins: for example wptexturize will apply so that curly quotes and dashes will appear as expected. In REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. parlance, selective refresh enables the Customizer preview to show title.rendered instead of just title.raw. (For more on this change to previewing the site title and tagline, see #33738. The previous JS-based previewing is retained for an instant low-fidelity preview while the selective refresh request returns.) Selective refresh is also the mechanism used for previewing the new custom logo feature in 4.5, ensuring that the logo image is rendered re-using the image_downsize logic in PHP without having to re-implement it in JS (keeping the code DRY).

With that recap of selective refresh out of the way, let’s turn to the focus of this post: selective refresh for widgets. When widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. management was added to the Customizer in 3.9, every change to a widget required a full page refresh to preview. This resulted in a poor user experience since a full refresh can take awhile, especially on weighty pages. So selective refresh of widgets is a key usability experience improvement for widget management in the Customizer in 4.5. However, as live postMessage updates to the site title and tagline have required supporting theme code (see above), so too will theme support be required for widgets, as noted in the Selective Refresh of Widgets section from the previous post on this topic:

Selective refresh for nav menus was enabled by default in 4.3. While some themes needed to add theme support for any dynamic aspects (such as the expanding submenus in Twenty Fifteen), generally nav menus seem to be fairly static and can be replaced in the document without needing any JS logic to be re-applied. Widgets, on the other hand, have much more variation in what they can display, since they can in fact display anything. For any widget that uses JavaScript to initialize some dynamic elements, such as a map or gallery slideshow, simply replacing the widget’s content with new content from the server will not work since the dynamic elements will not be re-initialized. Additionally, the sidebars (widget areas) in which the widgets are displayed may also have dynamic aspects associated with them, such as the Twenty Thirteen sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. which displays widgets in a grid using Masonry. For this theme, whenever a widget is changed/added/removed/reordered, the sidebar needs to be reflowed.

In order to allow themes to reflow sidebars and widgets to reinitialize their contents after a refresh, the selective refresh framework introduces widget-updated and sidebar-updated events. Additionally, since re-ordering widgets in a sidebar is instant by just re-ordering the elements in the DOM, some widgets with dynamically-generated iframes (such as a Twitter widget) may need to also be rebuilt, and for this reason there is a partial-content-moved event.

For the above reasons, I believe it will be much more common for widgets (and sidebars) to need special support for selective refresh, and so I think that at least for 4.5 the selective refresh should be opt-in for widgets (and perhaps in themes for sidebars). See theme support for Twenty Thirteen and plugin support for a few widgets in Jetpack (which won’t be part of the merge). At last week’s Core dev meeting, it was suggested that we add the opt-in for widget selective refresh at RC.

So as noted, selective refresh for widgets will be opt-in as of 4.5 RC1 (see #35855).

What do themes and widgets need to do to opt-in for selective refresh support?

Selective refresh will be used for previewing a widget change when both the theme and the widget itself indicate support as follows:

Adding Theme Support

If your theme does not do anything fancy with its sidebars (such as using Masonry to lay out widgets), then all that you need to do is add the following to your theme:

add_theme_support( 'customize-selective-refresh-widgets' );

On the other hand, if the theme is rendering a sidebar in a unique way, then to add a bit of logic to handle the changes properly. For example, as noted previously the footer area in Twenty Thirteen consists of a sidebar that is laid out using Masonry. When a widget is added, removed, or updated, the Masonry logic needs to be re-run to update the positioning of the widgets in the sidebar. The following highlighted code is what handles this:

jQuery( function( $ ) {
	var widgetArea = $( '#secondary .widget-area' );
	widgetArea.masonry( {
		itemSelector: '.widget',
		columnWidth: columnWidth,
		gutterWidth: 20,
		isRTL: body.is( '.rtl' )
	} );
	
	if ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh ) {
		wp.customize.selectiveRefresh.bind( 'sidebar-updated', function( sidebarPartial ) {
			if ( 'sidebar-1' === sidebarPartial.sidebarId ) {
				widgetArea.masonry( 'reloadItems' );
				widgetArea.masonry( 'layout' );
			}
		} );
	}
} );

Update 2016-07-17: Added the jQuery() DOM ready wrapper around this logic to ensure it runs after the DOM has been fully loaded, and thus ensuring the wp.customize.selectiveRefresh object exists if it is going to be loaded. See ​#37390 as this also turned out to be broken in Twenty Thirteen.

Note the if statement is there so the code will only run in the Customizer preview and if selective refresh is available (that is, if they are running 4.5 or later).

Adding Widget Support

If your widget lacks any dynamic functionality with JavaScript initialization, adding support just requires adding a customize_selective_refresh flag to the $widget_options param when constructing the WP_Widget subclass. If you are enqueueing any CSSCSS Cascading Style Sheets. for styling the widget, you’ll also want to enqueue this unconditionally in the Customizer preview (if is_customize_preview()) so that a widget can be added to the preview and be styled properly without doing a full page refresh. For example, note these highlighted lines in a sample widget:

class Example_Widget extends WP_Widget {

	public function __construct() {
		parent::__construct(
			'example',
			__( 'Example', 'my-plugin' ),
			array(
				'description' => __( 'Selective refreshable widget.', 'my-plugin' ),
				'customize_selective_refresh' => true,
			)
		);

		// Enqueue style if widget is active (appears in a sidebar) or if in Customizer preview.
		if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
		}
	}

	public function enqueue_scripts() {
		wp_enqueue_style( 'my-plugin-example-widget', plugins_url( 'example-widget.css', __FILE__ ), array(), '0.1' );
	}

	/* ... */
}

On the other hand, as with sidebars in a theme, if a widget uses JavaScript for initialization, you’ll need to add logic to makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility). sure re-initialization happens when the widget is selectively refreshed. So in addition to the above example, you must:

  1. Enqueue any dependent JS logic if is_customize_preview() just as noted above for enqueueing any CSS stylesheet.
  2. Add a handler for partial-content-rendered selective refresh events to rebuild a widget’s dynamic elements when it is re-rendered.
  3. As needed, add a handler for partial-content-moved selective refresh events to refresh partials if any dynamic elements involve iframes that have dynamically-written documents (such as the Twitter Timeline widget). (Adding this event handler should normally not be required.)

The Twitter Timeline widget in the Jetpack pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party is a good example for how to write these event handlers:

jQuery( function() {
	// Short-circuit selective refresh events if not in customizer preview or pre-4.5.
	if ( 'undefined' === typeof wp || ! wp.customize || ! wp.customize.selectiveRefresh ) {
		return;
	}

	// Re-load Twitter widgets when a partial is rendered.
	wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
		if ( placement.container ) {
			twttr.widgets.load( placement.container[0] );
		}
	} );

	// Refresh a moved partial containing a Twitter timeline iframe, since it has to be re-built.
	wp.customize.selectiveRefresh.bind( 'partial-content-moved', function( placement ) {
		if ( placement.container && placement.container.find( 'iframe.twitter-timeline:not([src]):first' ).length ) {
			placement.partial.refresh();
		}
	} );
} );

(This is adapted from a pending PR for Jetpack.)

Conclusion

All core themes and core widgets will have support for selective refresh in 4.5. Now it’s up to theme and plugin authors to also add support to also start taking advantage of these drastic performance improvements for previewing widget changes.

#4-5, #customize, #dev-notes, #feature-selective-refresh

Core Dev chat notes for March 16

Agenda

Schedule Notes, Status Updates, Let’s Triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors.!

Schedule Notes

  • BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 will go out today, as per the release schedule.
  • Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). 1 (RC1) is next Wednesday
  • Thanks to the a valiant effort headed up by @chriscct7, we’re down to 23 tickets in the 4.5 milestone.

Status Updates

  • Image Improvements: @joemcgill
    • Only a few open tickets left for 4.5, the big ones are related: HTTPSHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information. website with HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. images (#34945) and Incorrect URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org scheme for media in the adminadmin (and super admin) area when using administration over HTTPS (#34109).
  • CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.: @westonruter, @celloexpressions
    • Two non-logo related tickets remain:  Add QUnit tests for the Customizer preview (#35857) and Selective refresh of widgets (#35855). Feedback for whether (and how) to opt-in for selective refresh support.
    • @georgestephanis offered to nudge the Jetpack team to update their widgets to support selective refresh. @westonruter submitted a PR with the required updates.
  • Theme Logo Support: @obenland
    • @mor10 opened a couple of tickets that @westonruter has patched, so expect that to go in soon. Other than that it’s done. (Famous last words)
  • Editor: @azaozz, @iseulde
    • Discussion around More text patterns (#33300)
    • @jorbin and @helen both suggested removing bold/italic
  • @mike brought up #21602: Redirect_canonical can lead to infinite loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. on index navigation if site url is not all lower case

Ticketticket Created for both bug reports and feature development on the bug tracker. Triage

Ticket triage continued bringing the tickets left for the milestone down to 17.

Full meeting logs in Slack.

#4-5, #dev-chat

Week in Core, Mar 8 – Mar 15 2016

Welcome back the latest issue of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., covering changes [36889-37000]. Here are the highlights:

Ticketticket Created for both bug reports and feature development on the bug tracker. numbers based on trac timeline for the period above.

Note: If you want to help write the next WordPress Core Weekly summary, check out the schedule over at makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility)./docs and get in touch in the #core-weekly-update SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel.

Code Changes

About

  • Run w-logo-white.png through imagemin. [36929] #35661
  • Improve color contrast of WP Badge text, and update the logo to use the latest version. [36910] #35661

AccessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)

  • Improve accessibility for the PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party details modal. [36964] #33305
  • Reduce the WordPress shades of grey, Episode 3. [36904] #35783
  • Improve the color contrast ratio of the expandable panel “handles”. [36959] #35923
  • wpLink: fix accessibility issues [36991] #30468

Administration

  • Use admin_url() for “Add New” links in wp-admin/users.php. [36902] #36186
  • Use admin_url() for “Add New” links in wp-admin/upload.php. [36901] #36186

Build/Test Tools

  • Add Automated Tests for custom logo support [36905] #36086, #33755
  • Let’s not reinvent wp_get_attachment_image(). [36914] #36086
  • Update grunt-rtlcss ~1.6.0 → ~2.0.1. [36935] #35104
  • Rename the precommit:core task to precommit:base for clarification. [36955] #35557
  • Introduce multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site unit tests. [36949] #33755, #36086
  • Account for expected attachemnt size in custom logo output. [36911] #36086
  • Update grunt-browserify ~4.0.1 → ~5.0.0 [36979] #35104
  • Update grunt-postcss ~0.7.1 → ~0.8.0 [36978] #35104
  • Revert r36978 [36980] #35104
  • Increase beautificatedness of language in grunt precommit unit testunit test Code written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression. messages. [36924] #35557
  • Improve grunt precommit task [36906] #35557
  • Add grunt prerelease task [36930] #35557

Comments

  • On the Edit Comment screen do not show the permalink for unapproved comments. [36958] #36161

Customize

  • Restore body class removed in [36837] for when custom logo is present. [36903] #33755, #35945
  • Fix persistence of toggles for displayed nav menu item properties. [36908] #35273
  • Reduce vertical space of site icon control. [36907] #35943
  • Only add custom logo’s headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. text control if needed. [36915] #33755
  • Update cropper.js to match changes in [36931] #32783
  • Use full URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org to image to prevent breakage if moved. See #33755. [36948] #33755
  • Rely on selective refresh exclusively for previewing custom logo changes. [36990] #27355, #33755, #36096
  • Bump down the priority custom logo’s control. [36912] #35942
  • Remove selective refresh error message from appearing inline within the preview. [36890] #27355, #36164
  • Remove unused JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. variable to fix jshint error introduced in [36890]. [36892] #36164
  • Correct a unit test for custom icon functionality. [36952] #36086
  • Explicitly set full as the default custom logo size. [36950] #33755

Database

  • Reset connection status variables when the connection is closed. [36997] #36240

Docs

  • The $update_result parameter passed to WP_Automatic_Updater::after_core_update() is never a WP_Error. If an error is returned, the error object lives in the result property of the paramter. [36995] #32246
  • Re-add a @param that went missing in [36993]. [36994] #32246
  • Improvements and corrections for the $ver parameter of the dependencies APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. functions. [36993] #32246
  • Use a third-person singular verb for the get_the_excerpt() DocBlockdocblock (phpdoc, xref, inline docs) summary. [36942] #32246
  • Improve the DocBlock summary for wp_metadata_lazyloader(), introduced in [36566]. [36941] #35816, #35986
  • Improve the usefulness of the DocBlock summary for get_edit_term_link(). [36940] #32246
  • Improve the 4.5.0 changelog entry in the hook doc for the get_archives_link filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output., introduced in [36418]. [36939] #35573, #35986
  • Improve the $blog_id parameter description in the DocBlock for the_custom_logo(), introduced in [36698]. [36938] #33755, #35986
  • Improve inline documentation for has_custom_logo(), introduced in [36698]. [36936] #33755, #35986
  • Improve the DocBlock summary for the_embed_site_title(), introduced in [36693]. [36923] #34561, #35986
  • Improve the DocBlock summary for the clean_comment_cache action, introduced in [36405]. [36922] #35610, #35986
  • Improve syntax for the $lengths parameter in the hook doc for the wp_get_comment_fields_max_lengths filter, introduced in [36272]. [36921] #10377, #35986
  • Improve the DocBlock summary for wp_get_comment_fields_max_lengths(), introduced in [36514]. [36920] #10377, #35986
  • Improve the DocBlock summary for wp_queue_comments_for_comment_meta_lazyload(), introduced in [36566]. [36919] #35816, #35986
  • Improve the usefulness of associated reference info in the hook doc for the comments_template_query_args filter, introduced in [36235]. [36918] #34442, #35986
  • Add a missing DocBlock summary for the WP_Scripts->print_html_before property, added in [36633]. [36917] #14853, #35986
  • Improve syntax in the DocBlock for rest_get_server(), introduced in [36529]. [36947] #35329, #35986
  • Use a third-person singular verb in the summary for get_embed_template(), introduced in [36876]. [36963] #34561, #34278, #35986
  • Improve changelog entries added for the delete_term and delete_{$taxonomy} actions in [36080] and a third entry added for the clean_term_cache action in [36399] [36962] #35213, #35611, #35986
  • Improve the summary and return description in the DocBlock for unregister_taxonomy(), introduced in [36243]. [36961] #35227, #35986
  • Use a third-person singular verb for the DocBlock summary for remove_permastruct(), introduced in [36181]. [36960] #35235, #35986
  • Improve two 4.5.0 changelog entries added for the plugins_update_check_locales and themes_update_check_locales filters, introduced in [36630]. [36966] #34937, #35986
  • Correct a typo in the DocBlock summary for get_embed_template(), introduced in [36963]. [36965] #34561, #34278, #35986
  • Update default $size value for get_custom_logo filter after [36950]. [36975] #33755
  • Correct grammar when referring to “a URL” vs “an URL” in several places. [36970] #36218
  • Improve the DocBlock summary for wp_queue_posts_for_term_meta_lazyload(), introduced in [36566]. [36945] #35816, #35986
  • Improve the accuracy of the return description for unregister_post_type(), introduced in [36316]. [36944] #14761, #35986
  • Improve the DocBlock summary for WP::remove_query_var(), introduced in [36177]. [36900] #35234, #35986
  • Standardize file header summary for wp-includes/class-wp-metadata-lazyloader.php. [36899] #35986
  • Improve inline documentation syntax throughout WP_Metadata_Lazyloader, introduced in [36566]. [36898] #35816, #35986
  • Add a missing file header to wp-includes/class-wp-metadata-lazyloader.php, introduced in [36566]. [36897] #35816, #35986
  • Update the return type for get_active_blog_for_user() This is now a WP_Site object. [36895] #32450
  • Update param/return types for WP_Site in ms-blogs.php, get_blog_details() now returns a WP_Site object. clean_blog_cache() is now called with a WP_Site object. [36894] #32450
  • Update the return type for get_current_site() This is now a WP_Network object. [36893] #32246
  • Improve DocBlock syntax for wp_get_upload_dir(), introduced in [36565]. [36925] #34359, #35986

Editor

  • Fix size of the resize handle on RTL sites for HiDPI screens. [36934] #36193
  • Fix Mac keyboard shortcut for distraction free writing. [36973] #36214
  • Hide the Move to TrashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days. link for auto-drafts until they are auto-saved. [36972] #16116
  • Correct and update the Visual and Text editors description in the screen help. [36971] #35479

Embeds

  • Update Twitter oEmbed URL. [36946] #36197
  • Extend the provider list to support moments and timelines from Twitter. [36954] #36197
  • Add support for dai.ly embeds over HTTPSHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information.. [36951] #36189

Emoji

Media

  • Fix typo in test_image_preserves_alpha_on_rotate(). [36998] #30596
  • Media: Fall back to GD when loading URL in HHVM Imagick. [36996] #35973
  • Progressive enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. for Imagick; add profiles to whitelist. [36891] #33642, #28634
  • Support Imagick in HHVM. [36916] #35973
  • Merge two error messages and use sprintf() for the method names. [36968] #33642
  • Fix typo introduced in [36887]. [36987] #36230, #36089

Posts, Post Types

  • Call set_url_scheme() consistently on URLs passed through preview_post_link [36926] #35407

Query

Rewrite Rules

  • Allow rewrite rules to work in nested WordPress installations on IIS. [36953] #35558

TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies.

  • Correct @return annotation for wp_set_object_terms() and related functions. [36896] #36182
  • After [36874], rename $term_id to $tag_ID in wp-admin/edit-tag-form.php. [36969] #34988
  • Fix test related to cap check in get_edit_term_link(). [36986] #35922
  • Improve error handling in get_categories(). [36988] #36227

Themes

Tiny MCE

  • Update to 4.3.8, changelog: https://www.tinymce.com/docs/changelog/#version438-march152016. [37000] #36254
  • Remove unused user setting for wpLink. Remove redundant text and variable from wp_link_dialog(). [36985] #33301
  • Add audible confirmation when a link has been selected or inserted in the editor for both the inline dialog and the modal. Do not auto-search when the URL field is empty or already contains an URL. Remove a few redundant tabindex. [36984] #33301
  • When dragging, prevent error when a range cannot be created at the drop location. [36983] #36229
  • When doing undo/redo with keyboard shortcut, do not focus the inline dialog. Cannot do consecutive undo/redo if the focus is moved away from the editor. [36982] #33301
  • Ensure the inline dialog is in preview mode after updating a link from the (advanced) modal. [36977] #33301
  • Tweak the small animation shown while waiting for wpView data to make it sell CPU intensive. [36976] #33525
  • When searching, do not empty the URL input field when using the arrow keys to highlight items. [36974] #33301

Users

  • Add @since entries to wp_authenticate() and its filters now that the $username parameter can also be an email address. [36992] #9568, #35986

 

Thanks to @celloexpressions, @davidakennedy, @drebbitsweb, @hugobaeta, @iamtakashi, @@iseulde, @adamsilverstein, @afercia, @ahockley, @arush, @azaozz, @boonebgorges, @celloexpressions, @Chouby, @claudiosanches, @danielbachhuber, @DrewAPicture, @DuckDagobert, @ericlewis, @iseulde, @jeremyfelt, @joemcgill, @johnbillion, @johnjamesjacoby, @jorbin, @juliobox, @karmatosed, @markoheijnen, @melchoyce, @mikeschroder, @netweb, @niallkennedy, @obenland, @ocean90, @pento, @programmin, @rachelbaker, @RomSocial, @sebastianpisula, @SergeyBiryukov, @swissspidy, @tywayne, @virgodesign, @westonruter, @wido, @WiZZarD_, and @wonderboymusic for their contributions!

#4-5, #week-in-core

Beta 4, RC, and Core Dev Meeting Time

Schedule

Per the schedule, WordPress 4.5 BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 will be released in the hours following Wednesday’s weekly dev meeting, which is at March 16, 2016 at 2100 UTC.

For those on Daylight Saving Time – If you’re already on Daylight Saving Time, the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. dev meeting will be an hour later for you for two weeks, until Europe moves into DST. The above time link should give you the correct time and date for your local timezone.

Triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors.

There are currently 42 tickets in the milestone remaining. We hit the 50 ticketticket Created for both bug reports and feature development on the bug tracker. target before Beta 3, with 47 tickets remaining after the post-dev meeting triage. Great job! Before the releaseRelease A release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software. of Beta 4 (in two days), I’d like to see this down to 25, to help us hit RC next week.

To support this, like last week, we’ll run a triage, starting after status reports in the dev meeting, extending afterwards for as long as folks want to stay to work on the milestone.

I’d also like to run an impromptu triage today, for anyone around that would like to walk through tickets. If you’re interested in helping out with it, pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” me in #core in SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/.!

As a reminder, the report needs to be entirely clear before the Release Candidaterelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta). next week(!).

If you own ticket(s) on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. in the 4.5 milestone:

  • If your ticket will not be finished in the very near future, please puntpunt Contributors sometimes use the verb "punt" when talking about a ticket. This means it is being pushed out to a future release. This typically occurs for lower priority tickets near the end of the release cycle that don't "make the cut." In this is colloquial usage of the word, it means to delay or equivocate. (It also describes a play in American football where a team essentially passes up on an opportunity, hoping to put themselves in a better position later to try again.) it to Future Release.
  • If your ticket will be finished in the very near future, please add an update as to what is left as a comment on the ticket, including an estimated completion timeframe if possible.

Decisions

Feel free to raise any points of discussion for tomorrow in comments on this post.
So far, I have:

  • How should we add opt-in for selective refresh, or can opt-in be avoided altogether? #35855
  • Should we have duplicate shortcuts, and are single */_ the most user-friendly way to handle bold/italics? #33300

One more Beta to go. Thanks to everyone for your help!

#4-5, #agenda

Performance improvements for images in WordPress 4.5

WordPress 4.5 includes a few performance enhancements for images.

Increased image compression for custom sizes

WordPress 4.5 increases the amount of compression applied to intermediate sizes by changing the default quality in WP_Image_Editor from 90 to 82. As noted in the proposal for this change, this results in a noticeable reduction in file sizes with little change in visual quality. Developers can override the default image quality value using the wp_editor_set_quality filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output..

Improved resizing settings for ImageMagick

For sites making use of ImageMagick, we’ve reduced file sizes further by resizing images  more efficiently in WP_Image_Editor_Imagick and by stripping extraneous metadata using the new WP_Image_Editor_Imagick::strip_image() method.

For now, ‘icc’ and ‘icm’ color profiles are retained, along with ‘exif’, ‘xmp’, and ‘iptc’ profiles, which can contain copyright and orientation data. Those who want to retain additional metadata can disable profile stripping by adding a callback function to the image_strip_meta hook that returns false.

Note that the original full sized images uploaded to WordPress are unaffected by these changes.

Introduction of wp_get_upload_dir()

As Jeremy Felt mentioned in his post on Multisite changes, wp_upload_dir() received a major performance overhaul in this releaseRelease A release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software.. Those changes were pared with the addition of a new function, wp_get_upload_dir(), which can be used as a more performant way to display information about the uploads directory on the front end. This is particularly useful when building URLs for images in templates. (See #34359)

#4-5, #dev-notes, #images, #media, #optimization, #performance