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 from January 12th – January 19th, 2016, changesets [36269]–[36350]. Here are the highlights:
- 81 commits
- 38 contributors with props
- 127 tickets created
- 19 tickets reopened
- 100 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 make/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 Updates
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)
- After [36333] correctly use
esc_attr()instead ofesc_attr__(). [36334] #35313 - Remove title attributes from the Posts list table. [36333] #35313, Media Library list table. [36331] #35136 & the Comments screen. [36298] #35304
- Improve focus handling on the Taxonomies Quick Edit. Moves focus back to a proper place when saving or closing the form. [36304] #35460
- Improve focus handling and audible feedback on the Posts Quick-Bulk Edit. Avoids a focus loss when saving or closing the form moving focus back to a proper place. Uses
wp.a11y.speak()to dispatch successful edits and error messages to screen readers. [36303] #34756
Administration
- CSSCSS Cascading Style Sheets.: Reference the original location of the CSS rule being overridden. [36342] #35229
- CSS: Stop using
wp-admin.min.cssand instead queue the individual stylesheets up throughload-styles.php. We still generate thewp-admin.*files for compabitility purposes, however they only include the@import()lines. [36341] #35229 - List Tables: Use the
$GLOBALSarray when unsetting the global post and comment inWP_Comments_List_Table::single_row(). [36339] #35506 - Allow searching for 0 throughout the adminadmin (and super admin). [36302] #31025
- Add a “Drag boxes here” message to empty dashboard 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. boxes so it’s clear to users that it’s possible to drag meta boxes into empty spaces. [36295] #26399
- Support searching for
'0'inWP_Query. [36278] #31025
Build/Test Tools
- Build/Test Tools: Move PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher factory classes into their own files. [36347] #35492\
- Build Tools: Append the timestamp to $wp_version instead of only the current date. [36315] #28722
Canonical
- After [36280] remove the unit tests which are no longer supported for 4.4. This also removes the
is_feed()code to avoid confusion – only pages & embeds will be redirected. [36281] #35344 - 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. [36280] #35344, #21602
Comments
- Ignore false values of ‘search’ in
WP_Comment_Query. [36345] #35513 - Remove unused
$default_comments_pagevariable inget_comment_link(). [36343] #34073, #35511 - Correct description of
comment_authorproperty inWP_Commentclass. Thecomment_authorproperty is the comment author’s name, not an ID. [36332] #35464 - Respect all post-related filters in
WP_Comment_Query. [36326] #35478 - Use TEXT column type in fallback for
wp_get_comment_column_max_length(). [36325] #10377 - Respect custom pagination params when using
wp_list_comments()in a query 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. [36324] #35402 - Remove unneeded
$reqvariable incomments_template(). [36322] #35473 - Add a new
pre_wp_update_comment_count_nowfilterFilter 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.. [36318] #35060 - Use
assertEqualSets()in comment_author test. The previous assertion was too specific, resulting in race conditions. [36279] #35377 - Use the post-filter
WHEREclause when querying for comment descendants. [36277] #35192 - Always respect
$commentsarray passed towp_list_comments(). [36276] #35175, #35356 - Ignore hierarchy in pagination calculation when comment threading is disabled. [36275] #8071, #35419
- Restrict the maximum characters for input fields within the comments template. [36272] #10377
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.
Embeds
- Allow embedding static front pages and pages having a child page with an embed slug. This makes embed a special slug that can’t be used for new pages/posts. When
https://example.com/foo/embed/is an existing page, embeds fall back tohttps://example.com/foo/?embed=true. Adds unit tests. [36307] #34971
Filesystem 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.
Formatting
- Emoji: adjust $wpsmiliestrans. Swap simple-smile.png with SLIGHTLY SMILING FACE and frownie.png with SLIGHTLY FROWNING FACE [36336] #31710
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. API
- Add response status code aliases on WP_Http for convenience. These provide a more descriptive way to set response codes elsewhere, so it’s readable and less chance for the wrong response code to be used such as 401 vs 403. [36294] #35426
- Add missing HTTP status code descriptions (specifically 308 and 421.) [36274]
- Add support for 451 http status code (Unavailable For Legal Reasons.) Though this is technically still in the proposal stage, there is support from the core team and precedent in #16914 [36273] #16914, #35333
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.
- Introduce tests for
WP_Locale. [36292] #34688 - Correct an argument description and return value for
wp_dropdown_languages(). [36290] #35294
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
- In
wp.Backbone.Subviews, extract subviews with proper Underscore.js functions. [36305] #34350 - jQuery: Replace use of deprecated methods and events. [36288], [36287], and [36286] for #35380,
- External Libraries: Update jQuery to 1.12.0 and jQuery Migrate to 1.3.0. [36285] #35380
Media
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
- Add initial tests for the
allowed_themes filter. [36350] #28436
Networknetwork (versus site, blog) and Sites
- Clarify the docblockdocblock (phpdoc, xref, inline docs) for get_current_site() so it’s clear that it returns the current network object, not anything to do with the current site. As a further exercise, the reader is invited to fix the nomenclature surrounding blogs, sites, and networks in WordPress. [36293] #35414
Performance
- Share post fixture in WP_Comment_Query tests. [36346] #30017
- Script Loader: Add Etag:
$wp_versionheaderHeader 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. inload-scripts.phpandload-styles.php. This improves performance since browsers won’t re-download the scripts and styles when there was no change in$wp_version. [36312] #28722
Plugins
- Prevent a warning when searching in the plugins list table. [36301] #35461
- Make sure the ‘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. testing’ tab is first in 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. installer. This makes feature plugins more discoverable for people running development builds. [36297] #29631
- In
_get_plugin_data_markup_translate()remove the fallback to the “default” textdomain for Akismet. Akismet has its own language files since WordPress 3.9. [36283] #35436
Posts, Post Types
- Correctly pass
$posttopost_password_required()inget_the_excerpt(). Corrects the relevant test. [36329] #35486 - After [36319], add
$postparameter to theget_the_excerptfilter. [36321] #35474 - Add a
$postparameter toget_the_excerpt(). [36319], [36320] #27246 - Introduce
unregister_post_type(). [36316] #14761
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.
- Don’t double-escape the ‘name’ param in get_terms(). [36348] #35493
- Populate term cache with proper clone of term objects. [36323] #35462
- Fix unit tests after [36308]. [36309] #34988
- Introduce
wp-admin/term.phpfor editing single terms. [36308] #34988 - Correct the accetped types for the taxonomy element in the arguments passed to
wp_dropdown_categories(). [36289] #35446
Themes
- Show template loading error to users with switch_themes cap. [36344] #21931
- Only users with proper capabilitycapability A capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the
current_user_canfunction. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). should see theme errors. [36338] #21931 - Show an error message to logged-in users if a template file isn’t loaded. [36335] #21931
- Clear floated theme cards on Themes page. Also maintains visual separation for Broken Themes table on searches that return no results. [36270] #26646
Upgrade/Install
Users
- Always return
$current_userinwp_get_current_user(), never a boolean. [36313] #19615 - Deprecate the
get_currentuserinfo()pluggable function. [36311] #19615 - Decode special characters in password and email change notification emails. [36306] #35283
Props
Thanks to @5um17, @adamsilverstein, @afercia, @andizer, @berengerzyla, @boonebgorges, @chriscct7, @danielbachhuber, @dd32, @DrewAPicture, @ericlewis, @firebird75, @grapplerulrich, @iseulde, @ivankristianto, @jeremyfelt, @jmdodd, @joehoyle, @johnbillion, @jrf, @kraftbj, @Latz, @meitar, @MikeHansenMe, @obenland, @ocean90, @peterwilsoncc, @rachelbaker, @realloc, @rmccue, @scribu, @sebastianpisula, @sergejmueller, @SergeyBiryukov, @swissspidy, @valendesigns, @westonruter, and @xavortm for their contributions this week!