Week in Core, Apr 19– Apr 26 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 [37254-37314]. 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.

Code Changes

Build/Test Tools

  • Build/Test Tools: Reset the PHPMailer mock in Tests_Mail::tearDown(). [37307] #36609
  • Tests: Use the same incrementor for all fields belonging to a given text fixture. [37299] #35199
  • Don’t announce PR builds 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/.. People may submit a PR to our travis build repo, we shouldn’t notify slack when that happens. [37268] #36607
  • Tests: Allow override of MULTISITE and SUBDOMAIN_INSTALL constants [37266] #36567

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

Comments

  •  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 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.. [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 DocBlockdocblock (phpdoc, xref, inline docs) for wp_set_all_user_settings(). [37263] #30989
  • Capitalize URLURL 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 docsinline 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

  • Smilies: Move convert_smilies to happen later in the the_content 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.. [37298] #36306
  • The :roll: smiley is now an emoji. [37296] #36365
  • The diversity support test was incorrectly passing on all browsers. [37257] [37256] #36604

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 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. fired in wp-admin/admin-header.php. [37279] #34334

Media

Networks and Sites

  • Tests: Account for flexible IDs in main networknetwork (versus site, blog) deletion test. [37300] #36566
  • Tests: Exclude ms-files test group from default PHPUnit config. [37269] #36566
  • Tests: Add speedTrapListener to 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’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 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. 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 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. generator sequence can put a 0 into the
    ‘post_excerpt’ field of a post fixture, causing false positives. [37280] #36622

Rewrite Rules

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.

  • Docs: Move the clarification of is_tax() and WP_Query::is_tax() return value added in [37235] to @return description. [37281] #36331

Text Changes

  • Consistently refer to https://wordpress.org/plugins/ and https://wordpress.org/themes/ as WordPress 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 Directory and WordPress Theme Directory, respectively. [37297] #35938

Themes

Upgrade/Install

  • Clear plugin/theme caches directly after a plugin/theme has been updated. This is a follow-up to [34751]. [37272] #34029, #36383

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