Welcome back the latest issue of Week in Core Core is the set of software required to run WordPress. The Core Development Team builds WordPress., covering changes [37254-37314]. Here are the highlights:
Ticket Created for both bug reports and feature development on the bug tracker. numbers based on trac timeline for the period above.
Code Changes
Canonical
- Use
get_the_terms() to verify that a post belongs to the requested %category%. The get_the_terms() wrapper provides cache support, and saves a database hit
on sites with a persistent cache backend. [37262] #36602
- Tests: After [37260], use WP’s
setUpBeforeClass() wrappers. This ensures no leakage between tests of fixture IDs. [37261] #36602
- Add tests for permastruct containing
/%category%/. [37260] #36602
- Add a
$comment parameter to get_comment_author_url_link(). Add unit tests (none exist). [37305] #36573
- Add unordered list styling to Comments List Table rows and Moderate Comment screen. [37304] #36160
- Keep comments safe in the Edit Post screen. Warns users that have added a new Comment or began editing an existing without saving their changes, before they press the “update” button which would wipe out their comment changes. [37303] #32818
- Dashboard: toggle the “View” link for comments when Approving / Unapproving from the Dashboard widget 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.. [37302] #35518
Database
- Suppress connection error messages when
WP_DEBUG isn’t enabled. This is a partial revert of [35860], which has been causing un-catchable warnings to be generated on some server configurations. [37293] [37292] #36629, #21870
Date/Time
- Tests: Pre-declare the
$year_url property before initialization in Tests_Get_Archives::setUp(). [37271] #36611
Docs
- Add missing return descriptions for
WP_Filesystem_SSH2::chown() and WP_Filesystem_SSH2::run_command(). [37270] #30989
- Clarify the return descriptions for
get_the_time(), get_post_time(), and get_post_modified_time() to specify when an integer in the form of a Unix timestamp should be expected. [37265] #30989
- Clarify return descriptions in the DocBlocks for
set_user_setting() and delete_user_setting(). [37264] #30989
- Clarify parameter and return descriptions in the DocBlock (phpdoc, xref, inline docs) for
wp_set_all_user_settings(). [37263] #30989
- Capitalize URL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org – an acronym for Uniform Resource Locator – when used in the context of inline docs (phpdoc, docblock, xref) in wp-includes/link-template.php. [37259] #30406
- Notate more optional parameter defaults for a variety of function DocBlocks in wp-includes/link-template.php. [37258] #30406
- Notate optional parameter defaults for a variety of function DocBlocks in wp-includes/link-template.php. [37254] #30406
Editor
- TinyMCE: prevent showing the placeholder URL when adding a link and clicking more than once on the Insert Link button. [37301] #36637
Emoji
Feeds
- Revert [36230] which removed the
rss-http feed content type. Removing this means that any feeds which are using this feed content type are now being served as application/octet-stream instead of text/xml. [37284] [37282] #36620
General
- Customize/Formatting: Move
sanitize_hex_color(), sanitize_hex_color_no_hash(), and maybe_hash_hex_color() from class-wp-customize-manager.php into formatting.php. Adds missing braces. [37283] #33413, #27583
- Administration: Introduce
admin_print_footer_scripts-$hook_suffix", a dynamic version of the admin_print_footer_scripts hook. This is now more consistent with the generic admin_print_scripts and the dynamic admin_print_scripts-$hook_suffix hooks 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. fired in wp-admin/admin-header.php. [37279] #34334
Networks and Sites
- Tests: Account for flexible IDs in main network (versus site, blog) deletion test. [37300] #36566
- Tests: Exclude
ms-files test group from default PHPUnit config. [37269] #36566
- Tests: Add speedTrapListener to multisite 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’s PHPUnit config [37267] #36566, #30017
Posts, Post Types
- Add parameter documentation for ‘post_category’ to
wp_insert_post(). [37255] #36601
Post Thumbnails
- Fix logic bug 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. and tests from [37308] where post-thumbnails support wasn’t added if there were no previous post_types with support already. [37313] #22080
- When using
add_theme_support( ‘post-thumbnails’, array( $post_types) ) merge the supported post_types. [37308] #22080
Query
- Tests: More explicit fixture content when testing
s=0 query string. After [36647], the unit 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. generator sequence can put a 0 into the
‘post_excerpt’ field of a post fixture, causing false positives. [37280] #36622
Rewrite Rules
- Docs: Move the clarification of
is_tax() and WP_Query::is_tax() return value added in [37235] to @return description. [37281] #36331
Text Changes
Themes
Upgrade/Install
Users
- Remove the “Name” column of the Users table from appearing sortable. [37314] #28064
- Docs: Reflect the new
'user' option for wp_new_user_notification()‘s $notify parameter added in [37276] in wp_send_new_user_notifications() docs as well. [37278] #36009
- Add a unit test for [37276]. [37277] #36009
- In
wp_new_user_notification(), sdd 'user' option for the $notify parameter, which allows for sending notification only to the user created. [37276] #36009
Thanks to @akibjorklund, @alexkingorg, @flixos90, @rachelbaker, @azaozz, @boonebgorges, @davewarfel, @downstairsdev, @DrewAPicture, @flixos90, @grapplerulrich, @helen, @iseulde, @jeremyfelt, @jesin, @jmichaelward, @joemcgill, @johnbillion, @jorbin, @juanfra, @Latz, @mpol, @ocean90, @pbearne, @pento, @polevaultweb, @rachelbaker, @rmccue, @SergeyBiryukov, @spacedmonkey, @swissspidy, @tfrommen, @tollmanz, @Unyson, @welcher, @westonruter, @WiZZarD_, and @wonderboymusic for their contributions!
#4-6, #week-in-core