Week in Core, August 31 – September 7, 2016

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

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

Code Changes

Accessibility

Administration

Bootstrap

Comments

Customize

  • Fix php warning due to WP_Customize_Manager::prepare_setting_validity_for_js() incorrectly assuming that WP_Error will only ever have arrays in its $error_data. [38513] #37890
  • Introduce paneVisible state and ensure pane is visible when a construct is expanded (or focused). Fixes #36678. [38492] #27403, #36678
  • Fix i18n by re-using the add_new_item post type label instead of using a post type name in a generic string. [38479] #34923, #37895
  • Use new $status_code parameter for wp_send_json_error() instead of calling status_header() separately. [38478] #35666, #37897
  • Improve handling of active state for dynamically-created controls/sections/panels. [38464] #37270

Database

  • Find the correct table names in DELETE queries with table aliases [38507] #37660

Docs

  • Update the $message parameter for _default_wp_die_handler() to notate that it can also accept a WP_Error object. [38518] #37770
  • Correct @since entry for the smilies filter added in [38504]. [38505] #35905
  • Move term_description() reference from filter docblock to get_the_archive_description() function docblock. [38495] #37259

Editor

  • fix jumpiness on pressing backspace and delete in the Text editor. Merge of [38426] to the 4.6 branch. [38487] #37690

Embeds

  • Clarify some assertion failure messages and correct a test URL for Twitter timelines. [38514] #32360
  • Update the oEmbed provider test suite. [38512] #32360

Formatting

HTTP

  • Handle an edgecase within the URI parsing library included in Requests, where if a double slash exists at the start of the path the URL is passed to cURL malformed. Merge of [38429] to the 4.6 branch. [38485] #37733
  • Accept non-string values in cookies, fixing a regression since 4.5. Merges [38430] to the 4.6 branch. [38461] #37768

HTTP API

  • Revert changes to wp_parse_url() while PHP 5.2 errors are investigated. [38456] #36356

General

  • revert [38386], functions.php was probably too tempting for some people to not load by itself. [38469] #36335
  • revert [38467], wp_is_IE() should not exist. [38468] #37699
  • use a new function, wp_is_IE(), instead of the $is_IE global in a number of places. [38467] #37699
  • use get_bloginfo( 'version' ) instead of global $wp_version in several locations – excluding those locations which reload version.php mid-flight. [38459] #37699

Help/About

  • Remove an outdated help sentence on “My Sites” screen. [38474] #37896

I18N

  • Add translator comments for XML-RPC strings with placeholders. [38510] #37792

Login and Registration

  • Change login label to Username or Email Address for clarity. [38477] #37871

Media

  • Sanitize upload filename. [38538] #

Menus

Multisite

  • Deprecate wp_get_network(). [38515] #37553
  • use get_current_site() instead of $GLOBALS['current_site'] (stop yelling!) in a few remaining spots. [38458] #37699
  • use get_current_blog_id() where applicable, in lieu of plucking the $blog_id global from outer space. [38457] #37699

Post Thumbnails

  • Prevent post thumbnail previews from spilling into other images. Merge of [38433] to the 4.6 branch. [38476] #37697

Press This

  • don’t check for already-hoisted global in press-this.php. [38466] #37699
  • in wp_ajax_press_this_save_post() and wp_ajax_press_this_add_category(), don’t check for a global instance. WP_Press_This is a Controller, but not really a Singleton. This also keeps it from being a pluggable class, which it is right now. [38465] #37699
  • in get_shortcut_link(), just check a class constant on WP_Press_This instead of instantiating the object and reading an instance prop. [38462] #37699

Query

  • ‘orderby=include’ should support comma-separated lists. [30052] assumed that ‘include’ would be an array. [38500] #37904
  • Use AND in a SQL query rather than &&. [38491] #37903
  • r38356, you were not long for this world. [38471] #37830
  • in wp_old_slug_redirect(), use get_query_var() instead of importing and touching the global $wp_query directly. [38463] #37699

Role/Capability

Script Loader

Shortcodes

Smilies

Taxonomy

  • Introduce some taxonomy capability tests in preparation for introducing more fine grained capabilities for terms. [38516] #35614
  • Introduce wp_insert_term_data and wp_update_term_data filters for altering term data before it is inserted/updated in the database. [38484] #22293
  • Correct the function description for wp_ajax_add_link_category(). [38490] #37770
  • Update various docs for parameters which are now WP_Term objects. See #14162 [38489] #37770, #14162

Template

  • After [38486], actually use the $description variable in get_the_archive_description(). [38493] #37259
  • In get_the_archive_description(), add support for author archives. [38486] #37259

Text Changes

  • Improve Error messages in XML-RPC [38509] #37792
  • Improve the timezone setting description in General Settings. Makes more clear users can set either a city or a UTC timezone offset. [38483] #34789

TinyMCE

  • fix toolbars alignment in RTL. Merge of [38349] to the 4.6 branch. [38488] #37760
  • change the default font for the vi locale to the same stack as he_IL. Merge of [38427] to the 4.6 branch. [38472] #37755

Toolbar

Upgrade/Install

  • After [37687], fix the number of params passed to the upgrade hooks. Merge of [38415] to the 4.6 branch. [38475] #37731
  • Sanitize file name in File_Upload_Upgrader. [38524] #

Upload

Users

  • After [33766], don’t reset the password when clicking “Show Password” and then “Cancel” on Add New User screen. [38494] #37902, #33419

Pass $profileuser parameter to user_profile_picture_description filter on “Edit User” screen. [38481] #37379

Widgets

  • Make the Delete/Remove links red. For consistency and accessibility, all the UI controls that perform destructive actions should be red. [38536] #35622, #37016

## Props

Thanks to @afercia, @Akeif, @akibjorklund, @andrewp, @atimmer, @azaozz, @batmoo, @boonebgorges, @celloexpressions, @Chaos, @curdin, @dd32, @deremohan, @dlh, @DrewAPicture, @Engine, @flixos90, @Frank, @fronaldaraujo, @GaryJ, @geminorum, @gitlost, @GrantDerepas, @henrywright, @ibachal, @ideag, @ionutst, @jeremyfelt, @joemcgill, @johnbillion, @johnjamesjacoby, @johnpgreen, @jorbin, @Klein, @lukecavanagh, @monikarao, @mte90, @netweb, @nmt90, @patilswapnilv, @pento, @peterwilsoncc, @PieWP, @Presskopp, @ramiy, @Rarst, @sayedwp, @scrappy@…, @SergeyBiryukov, @smerriman, @swissspidy, @TimothyBlynJacobs, @turtlepod, @westonruter, and @wonderboymusic for their contributions!

#4-1, #week-in-core

Week in Core, August 23 – 30, 2016

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

  • 110 commits
  • 62 contributors
  • 111 tickets created
  • 20 tickets reopened
  • 128 tickets closed

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

Code Changes

Accessibility

  • Hide the “No activity yet” smiley from assistive technologies. [38448] #37511
  • Improve the file upload inputs styling [38435] #35552

Admin

  • Allow WP_Screen to be checked via autoload in convert_to_screen(). [38414] #36335

Administration

  • Underline links in the admin footer for better accessibility. [38347] #37529

Bootstrap

  • Check that ini_get_all() exists before calling it, allows us to work around hosts who disable the function for “security purposes”. [38431] #37680
  • Fix failing external HTTP tests after [38411] [38416] #36335
  • After r38409 and r38410, revert r38402 which reverted r38399 [38411] #36335
  • Run composer install after r38409. [38410] #36335
  • Move composer.{json|lock} into src. [38409] #36335
  • Revert [38399] as it’s broken /build/ and subsequently core.svn.wordpress.org [38402] #36335
  • Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader [38399] #36335
  • Exclude more files from the autoloader.classmap in composer.json. [38395] #36335
  • Add composer.lock and src/wp-vendor files. Nothing is using this code yet, just going through the motions. Ignore the files in src/wp-vendor/composer that will explode in PHP 5.2. [38394] #36335
  • Run composer require xrstf/composer-php52 to get the updated suggested version. Change the vendor-dir to wp-vendor. [38393] #36335
  • Exclude some files from the Composer autoload setup via exclude-from-classmap. [38391] #36335
  • Load option.php in wp-settings.php, not in functions.php. [38386] #36335
  • Add a composer.json file to the project. No code relies on it (yet), and no vendor dir is checked in (yet). No autoloader is being used (yet). Taking this first step will hopefully encourage the perfectionists of our world to scrutinize each line [38384] #36335

Build/Test Tools

  • Add support for is_front_page() to assertQueryTrue() and assert that all the tested conditions are supported by the method. [38405] #37849
  • Remove many unnecessary calls to rand_str() which can, in theory, fail at random. Static strings are much more appropriate. [38382] #37371
  • Ensure the Tests_Query_Conditionals tests set up the environment correctly before re-registering initial taxonomies. [38407] #37851
  • Require Basic_Object and Basic_Subclass files earlier in call stack [38445] #37523
  • Add docblocks for Basic_Object and Basic_Subclass classes. [38444] #37523
  • Use shared fixture in comment_exists() tests. [38372] #37842

Comments

  • Don’t do direct SQL query when fetching decendants [38446] #37696
  • Add support for all HTTP protocol versions when returning a 405 from wp-comments-post.php. [38432] #37863

Cron

Customize

  • Allow users to more seamlessly create page-based nav menus during customization [38436] #34923
  • Circumvent the customizer attempting to preview links to static assets (such as uploaded images) [38396] #37828

Database

Docs

  • Alignment after [38369]. [38370] #37770
  • Correct various documentation around object and stdClass types. [38369] #37770
  • Add a missing parenthesis in an example in the DocBlock for wp_redirect(). [38350] #37770
  • Improve the docs for the_title() and make them more consistent with the_title_attribute(). [38348] #37732

Editor

  • Fix jumpiness on pressing backspace and delete in the Text editor. [38426] #37690
  • Use Beacon API over sync request [38425] #
  • Improve word-count.js documentation. [38358] #37718

Embeds

  • Wp-settings.php loads class-wp-embed.php, which currently produces side effects. Move the global instantiation to wp-settings.php. WP_Embed is then in a file by itself. [38362] #37827
  • Add a missing regex delimiter for Facebook URLs. [38368] #34737
  • Add support for embedding Facebook posts and videos via oEmbed. [38367] #34737
  • Many of our oEmbed providers now default to HTTPS embeds, redirect to the HTTPS oEmbed endpoint, or have complete support for HTTPS even if they don’t default to HTTPS [38366] #28507
  • Always use the HTTPS endpoint for YouTube embeds. The scheme parameter is no longer required as all YouTube assets now use HTTPS. [38365] #36274, #28507

FTP

  • Ensure that there is only one class named ftp, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won’t hiccup when it gets to these files. [38380] #36335

Feed

  • Move ‘WP_Feed_Cache’, ‘WP_Feed_Cache_Transient’, WP_SimplePie_File and WP_SimplePie_Sanitize_KSES into their own files via svn cp. If we move forard with autoloading, class-feed.php is useless. We could even remove it now, and just load these new files in wp-settings.php. That can be decided post-mortem. class-feed.php is an interesting name: there is no Feed or WP_Feed class. [38354] #37827

Formatting

  • Add a parameter to wp_send_json_error(), wp_send_json_success(), and wp_send_json() for specifying the HTTP response code [38422] #35666
  • For a performance boost in remove_accents(), convert chr() calls to string literals. [38359] #37643

General

  • AJAX actions for List Tables do not need to declare global $wp_list_table. List tables on admin screens are in global scope, and they contain hooks that don’t pass the the list table as context, hence using globals there so that functions can import them. That problem does not exist in the AJAX actions, which are virtually impossible to hook into as is. [38455] #37699
  • Move _WP_List_Table_Compat into its own file. [38392] #37827
  • There is no good reason for class-wp-site-icon.php to drop a global instance of itself whenever the file is loaded. The lone use of the global instance of WP_Site_Icon is in an AJAX action that provides virtually no way to override – the file is loaded immediately before the global is used. [38355] #37699
  • Correct the documentation for the wp_dropdown_users_args filter description and its parameters. [38406] #37770
  • After r38303, replace usage of global $_wp_additional_image_sizes with wp_get_additional_image_sizes(). [38383] #37699
  • Move WP_Session_Tokens and WP_User_Meta_Session_Tokens into their own files via svn cp. If we move forard with autoloading, session.php is useless. We could even remove it now, and just load these new files in wp-settings.php. That can be decided post-mortem. [38353] #37827
  • Move WP_Text_Diff_Renderer_inline (behold that lowercase “i”) and WP_Text_Diff_Renderer_Table into their own files via svn cp. [38352] #37827
  • Break up class-IXR.php into individual class files. [38389] #37827
  • After [38399], update the .gitignore file accordingly. [38401] #36335

HTTP API

  • Accept non-string values in cookies, fixing a regression since 4.5. [38430] #37768
  • Handle an edgecase within the URI parsing library included in Requests, where if a double slash exists at the start of the path the URL is passed to cURL malformed. [38429] #37733
  • Separate the test for wp_parse_url() with -1 as its component into a separate test, so the remaining tests can use strict type checking. This helps avoid gotches with the potentially empty values (ie. null) that we’re testing for. [38453] #36356
  • The tests for wp_parse_url() can’t be strict on type because this causes the tests to fail on PHP 5.2 which, bizarrely, returns the results of parse_url() (when called with a $component parameter) in a different order to later PHP versions. [38452] #36356
  • Prevent a fatal error on PHP < 5.4.7 due to changes introduced in [38449]. [38450] #36356
  • Add a $component parameter to wp_parse_url() to give it parity with PHP’s parse_url() function. [38449] #36356

I18N

  • Correct various instances of incorrect usage of esc_attr_e(). [38424] #37457Iimprove accuracy of docs. [38360] #37585
  • After r38364, check that global $wp_locale is an instance of WP_Locale before calling ->is_rtle() in is_rtl(). [38438] #37827
  • Retire another remaining wp-includes/locale.php require, and instead load the required WP_Locale class directly. [38404] #37827
  • Move is_rtl() to l10n.php (which loads way earlier). Load WP_Locale file in wp-settings.php. Retire wp-includes/locale.php – it only loaded the class and the one function, is_rtl(). If someone loaded this file for fun somewhere else, it would be a fatal error. [38364] #37827

Load

  • Move WP_MatchesMapRegex into its own file. [38376] #37827
  • Remove class-feed.php (There is no class named Feed or WP_Feed, it just loads other classes) and, instead, move the require calls to the only place they are ever included: inside fetch_feed(). This simplifies the include path. [38374] #36335
  • Remove session.php and, instead, move the 2 require calls to wp-settings.php. This simplifies the include path. [38373] #36335
  • Load class-phpass.php (PasswordHash class) early in wp-settings.php, instead of require_once()’ing it in several places. [38371] #36335
  • Move is_wp_error() to load.php so that WP_Error is in a file by itself. [38363] #37827

Media

  • Add a $wp_error parameter to wp_insert_attachment() to give it parity with wp_insert_post(). [38408] #37813

Multisite

  • Move get_current_site() to load.php so that it can be used in more places, instead of importing global $current_site. [38388] #37699

OEmbed

  • Add unit tests. @group external-oembed is not run by default. [38454] #32360
  • Move _wp_oembed_get_object() to embed.php, where all of the other embed functions live. WP_oEmbed is then in a file by itself. Load class-oembed.php in wp-settings.php and remove extraneous include calls. [38361] #37827

Permalinks

  • Correct an invalid peramstructure tag in a test. [38417] #37858

Post Thumbnails

  • Prevent post thumbnail previews from spilling into other images [38433] #37697

Posts, Post Types

  • Introduce a missing private query var that should have been introduced as part of #15459 [38451] #15459, #34982
  • Don’t improperly cast IDs when fetching post, user, or term objects. [38381] #37738

Press This

  • The file for the WP_Press_This class should not produce side effects. Similar to what we did in r38355 for WP_Site_Icon, drop the instances of global instantiation for $wp_press_this via loading the file. The variable can be set inline when necessary. In most of those places, if the global is already set, the file does not load and stomp it currently. [38397] #37699

Query

  • Add and improve tests for query conditionals on the front page and home page. [38413] #37851
  • Collapse several of the is_* methods using __call(). Add method annotations. [38356] #37830
  • Move WP_Query into its own file via svn cp. [38351] #37827

Role/Capability

  • Only users who can manage options should be able to trash/delete the page for posts or the front page, as they are the only users who can restore it or subsequently alter the “Front page displays” setting. [38378] #37580
  • Set a property, $db, on WP_Roles to reduce global imports. [38387] #37699

Script Loader

Security

  • Return a 403 instead of a 200 HTTP status when check_ajax_referer() fails [38421] #36362
  • Trigger a _doing_it_wrong() when check_ajax_referer() is called without its first parameter. This brings it inline with check_admin_referer(). [38420] #36361

Taxonomy

  • Remove unnecessary uniqueness check in get_attachment_taxonomies(). [38437] #37368
  • Eliminate unnecessary variable in WP_Term_Query. [38377] #37544

Themes

  • Correct the type for the $name parameter of the get_header, get_footer, get_sidebar, and get_template_part_{$slug} hooks. [38434] #37770
  • Correct the list of possible values for the dynamic portion of the {$type}_template_hierarchy and {$type}_template filters. [38428] #14310
  • Introduce tests for the theme template hierarchy. [38419] #14310
  • Update filter names in the inline documentation for the get_*_template() functions. [38418] #14310, #37770
  • Remove failing tests introduced in [38390]. [38403] #14310
  • Begin introducing unit tests for the expected theme template hierarchy. More to come. [38390] #14310
  • Make the template hierarchy for a given template type filterable [38385] #14310

TinyMCE

  • Change the default font for the vi locale to the same stack as he_IL. [38427] #37755
  • Fix toolbars alignment in RTL. [38349] #37760

Unit tests

  • Enforce $args object in wp_nav_menu() & Walker_Nav_Menu [38400] #24587

Upgrade/Install

  • Don’t display PHP errors during installation [38423] #37358
  • After [37687], fix the number of params passed to the upgrade hooks [38415] #37731
  • Wp-admin/includes/class-wp-upgrader-skins.php is unused, remove it. All of the same includes are loaded in class-wp-upgrader.php. [38379] #37827

Props

Thanks to @afercia, @Akeif, @andizer, @Ankit, @azaozz, @boonebgorges, @celloexpressions, @Chaos, @danielkanchev, @dd32, @deeptiboddapati, @diagnose, @DrewAPicture, @DylanAuty, @Engine, @flixos90, @fo, @Frank, @Frozzare, @GaryJ, @gitlost, @grapplerulrich, @Gupta, @helping, @henrywright, @ionutst, @iseulde, @issue, @ixkaito, @JakePT, @jipmoors, @joemcgill, @johnbillion, @JohnPBloch, @jrf, @K, @Klein, @kraftbj, @mapk, @melchoyce, @mrahmadawais, @nmt90, @ocean90, @pento, @peterwilsoncc, @Presskopp, @Rarst, @rodrigosprimo, @SergeyBiryukov, @shayanys, @stephenharris, @swisspidy, @swissspidy, @this, @TimothyBlynJacobs, @tnash, @to, @tollmanz, @valendesigns, @westonruter, @wonderboymusic, and @zsusag for their contributions!

#4-7, #week-in-core

Week in Core, August 16 – 23, 2016

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

  • 72 commits
  • 40 contributors
  • 100 tickets created
  • 9 tickets reopened
  • 96 tickets closed

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

Code Changes

Administration

  • Allow for .nav-tab-wrapper class to be used on elements other than h3 to increase flexibility for custom settings pages. [38306] #37257

AJAX

  • add a new function, wp_doing_ajax(), which can replace… (wait for it…) DOING_AJAX checks via the constant. [38334] #25669

Bootstrap/Load

Cache

  • in WP_Object_Cache, $cache_misses is public, but $cache_hits is private. They should both be public, because they’re useful for debugging purposes. [38335] #37726

Comments

  • in wp_handle_comment_submission(), $_wp_unfiltered_html_comment is passed as part of $comment_data, but is not used locally. [38313] #37771
  • in WP_Comment_Query::fill_descendants(), continue if there is an empty array in the loop. [38298] #37416
  • in WP_Comment_Query::fill_descendants(), compute count() in the first for expression so that it does not run on each iteration. [38297] #37416

Customize

  • Ensure a newly-added custom link nav menu item has the appropriate CSS class names. [38301] #37575

Database

  • WP_Network, WP_Network_Query, and WP_Site_Query call wpdb::_escape(), thus requiring it to be public. It previously had no access modifier. _ at the beginning of a method, believe it or not, does not enforce visibility constraints. [38314] #37771

Docs

  • Update jsdoc in customize-nav-menus.js to remove references to Menu Customizer plugin. Also fix @param for updateAssignedLocationsInSectionTitle. [38300] #37520
  • Update outdated phpdoc for WP_Customize_Manager::validate_setting_values() to reflect changes in [37942]. [38299] #37247, #37759
  • Correct usage examples for wpdb::prepare(), which should not be called statically. [38289] #37744
  • Fix typo in load_plugin_textdomain() parameter description. [38284] #37318

Embeds

  • In get_oembed_endpoint_url(), avoid inadvertent stomping of the $format parameter passed to oembed_endpoint_url filter. [38321] #37751

External Libraries

General

  • remove variable set needlessly in wp_check_jsonp_callback(). [38308] #37771

Hooks

  • Standardize naming of dynamic hooks to use interpolation vs concatenation. [38307] #37748

HTTP

  • in WP_HTTP_Response, the @param declarations for $status and $headers were swapped. Let us correct this. [38315] #37771

I18N

  • Add translator comments for strings in wp-includes/functions.wp-scripts.php. [38345] #37803
  • Add translator comments for strings in wp-includes/functions.php. [38344] #37802
  • Add translator comments for strings in wp-includes/deprecated.php. [38343] #37797
  • Add translator comments for strings in wp-includes/class-walker-comment.php. [38342] #37796
  • Add translator comments for strings in wp-includes/author-template.php. [38341] #37795
  • Add translator comments for strings in wp-includes/admin-bar.php. [38340] #37794
  • Remove unnecessary context for two strings on “Add New User” screen. [38329] #37784
  • Remove unnecessary context in wp_post_revision_title_expanded(). [38327] #37781
  • Use a consistent context for “Add New” submenu strings in admin bar (Toolbar). [38326] #37780
  • Allow for WordPress Plugin/Theme Directory URLs to be localized. [38325] #37501
  • Replace unnecessary context with translator comments in wp_post_revision_title() and wp_post_revision_title_expanded(). [38324] #37778
  • Replace unnecessary context with a translator comment for %s Sites string in network_step1(). [38323] #37777
  • Replace unnecessary context with a translator comment for %s KB string on Network Settings screen. [38322] #37496
  • Add translator comments for Edit Site: %s string in network admin. [38320] #37776

Locale

Login

  • retrieve_password() does not need to import 2 globals that it does not use. [38304] #37699

Mail

  • If post-by-email functionality is disabled, wp-mail.php should return a 403 Forbidden status code instead if 500 Internal Server Error. [38332] #37572
  • Don’t set Sender field when setting From. Merges [38286] to the 4.6 branch. [38287] #37736
  • Don’t set Sender field when setting From. [38286] #37736

Media

  • remove function_exists() call for ini_get() in _load_image_to_edit_path(). [38333] #37681
  • remove unnecessary variable assignment in gallery_shortcode(). [38309] #37771
  • add a function, wp_get_additional_image_sizes(), that wraps the retrieval of the global $_wp_additional_image_sizes. Removes 6 global imports. [38303] #37699
  • fix unit test after [38296].
  • use wp_get_attachment_metadata() instead of get_post_meta() where appropriate. [38296] #36246
  • wp_get_attachment_link() fails to output text for non-images if the attachment post doesn’t have a title and $text (argument #5) was not passed to the func. In this case, use the filename. [38295] #5, #37343
  • when calling pathinfo(), also pass a PATHINFO_* constant to avoid array notices for unset keys. [38294] #37608
  • Add some docs to media-gallery.js RIP. [38293] #37717

Multisite

  • Fix copy/paste issue in id attribute for a dismissible message on Sites screen. [38305] #37764

Nav Menus

  • remove unnecessary variable assignment in wp_nav_menu_item_post_type_meta_box(). [38311] #37771

Query

  • use correct description in the docblock for $number in WP_Comment_Query, WP_Network_Query, and WP_Site_Query. [38336] #37621
  • Non-scalar and negative values for ‘p’ should always result in a 404. [38288] #33372
  • use composition for $db in WP_Date_Query, removes need to import global $wpdb in multiple methods. [38280] #37699
  • use composition for $db in WP_Query, removes need to import global $wpdb in multiple methods. [38279] #37699
  • add a protected field, $db, (composition, as it were) to WP_*_Query classes to hold the value for the database abstraction, instead of importing the global $wpdb into every method that uses it. Reduces the number of global imports by 32. [38275] #37699

REST API

  • remove unnecessary variable assignments in rest_handle_options_request(). [38310] #37771

Taxonomy

  • in get_terms(), do not assume that legacy args are being passed when the only params are top-level meta_* values. Add keys in WP_Term_Query::__construct(). Adds unit tests. [38337] #37568
  • remove unnecessary break in WP_Term::__get(). [38312] #37771
  • In is_object_in_term(), return error object rather than caching it. [38277] #32044, #36814, #37721
  • Allow attachment taxonomies to be fetched as objects. [38292] #37368

Tests

  • Fix incorrect variable name from [38330]. [38331] #37630
  • Attachment create() method should match signature of other create() methods. Legacy argument format continues to be accepted. [38330] #37630
  • Move some utility classes to their own files. [38285] #37523
  • skip checking the value in Tests_User:test_user_properties for db. Casting to array is not the most elegant thing here, and various versions of PHP key protected/private fields differently when objects are cast. [38278] #37699
  • Introduce tests for get_attachment_taxonomies(). [38291] #37368
  • Introduce tests for get_object_taxonomies(). [38290] #37368
  • Add wordpress-importer tests demonstrating slashed data behavior. [38283] #21007

TinyMCE

  • make sure the temporary id is removed when using the default image dialog and inserting an external image. [38328] #37467

Users

  • after [38317], use a @property annotation, instead of a public field. [38319] #37771
  • $user_level has been publicly-accessed on instances of WP_User since version 2.0, but is has never been declared. [38317] #37771

Widgets

  • $option_name and $alt_option_name have been used as members ever since WP_Widget became an object in 2.8, but never declared. [38318] #37771

Props

Thanks to @afercia, @Akeif, @azaozz, @bcole808, @boonebgorges, @Clorith, @codemovementpk, @danhgilmore, @danielbachhuber, @dd32, @deremohan, @dlh, @DrewAPicture, @flixos90, @fomenkoandrey, @Frank, @gma992, @henrywright, @iandunn, @imath, @JaworskiMatt, @jipmoors, @Jonnyauk, @jorbin, @JorritSchippers, @Klein, @kouratoras, @Mte90, @Presskopp, @ramiy, @rpayne7264, @sebastianpisula, @SergeyBiryukov, @swissspidy, @tivnet, @TJNowell, @tomdxw, @vishalkakadiya, @westonruter, and @wonderboymusic for their contributions!

#4-6, #week-in-core

Week in Core, August 9 – 16, 2016

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

  • 35 commits
  • 38 contributors
  • 73 tickets created
  • 7 tickets reopened
  • 52 tickets closed
  • WordPress 4.6 released 🎉

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

Code Changes

Bootstrap/Load

Build/Test Tools

  • Build/Test Tools: Ensure PHP 7.1 is tested on Travis.[38273] #37625

Export

External Libraries

General

Help/About

Import

  • Update/Install error messages: do not escape from the template, escape the error message string before inserting it. [38240] [38241] #37623
  • Correct the documentation for the get_sample_permalink filter, and improve the documentation for the get_sample_permalink() function. [38272] #37682

Post Thumbnails,Post Thumbnails,Post Thumbnails

Script Loader

  • Fix protocol-relative URLs for the preconnect relation type. Props azaozz for review. [38255] #37652

Upgrade/Install

Users

Thanks to @afragen, @azaozz, @azaozz for testing and second sign off, @Clorith, @dd32, @dd32 for review, @dimadin, @DrewAPicture, @DrewAPicture for review, @flixos90, @helen, @hugobaeta, @Ipstenu, @ipstenu for research, @jeremyfelt, @jerrysarcastic, @JerrySarcastic, @joemcgill, @johnbillion, @johnpgreen, @jorbin, @macmanx, @MattyRob, @ocean90, @pento for review, @peterwilsoncc, @petya, @Presskopp, @RoseAppleMedia, @rosso99, @sebastian.pisula for the original patc, @SergeyBiryukov, @stephenharris, @swissspidy, @theMikeD for the initial patch, @voldemortensen, @westi for investigation, and @wonderboymusic for their contributions!

#4-6, #week-in-core

Week in Core, August 2 – 9, 2016

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

  • 58 commits
  • 47 contributors
  • 76 tickets created
  • 10 tickets reopened
  • 53 tickets closed

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

Code Changes

Help/ About

Boostrap/ Load

Customize

Dashboard

Docs

Embeds

  • Fix copy/paste error in WP_oEmbed::_add_provider_early() description. [38230] #37602

Emoji

Formatting

I18N

  • Correct the documented return types of get_translations_for_domain(). [38198] #32246

Media

Multisite

Plugins

Requests

Taxononmy

  • Set WP_Term_Query::terms when returning terms from the cache in WP_Term_Query::get_terms() [38212], [38214] #37591
  • Add unit that shows that WP_Term_Query is broken when the query is read from the cache. [38211] #37591

Themes

Upgrade/ Install

Props

Thanks to @adamsilverstein, @afercia, @Ankit, @azaozz, @boonebgorges, @celloexpressions, @cmillerdev, @dd32, @DrewAPicture, @endocreative, @fliespl, @flixos90, @gitlost, @Gupta, @hugobaeta, @iamfriendly, @Ipstenu, @ivantedja, @jbrinley, @jeremyfelt, @joemcgill, @johnbillion, @jorbin, @juhise, @K, @karmatosed, @macmanx, @mapk, @michael-arestad, @mikeschroder, @nacin, @obenland, @ocean90, @olarmarius, @ovann86, @pento, @peterwilsoncc, @petya, @rahulsprajapati, @ramiy, @rosso99, @SergeyBiryukov, @swissspidy, @vishalkakadiya, @westonruter, @wonderboymusic, and @zetaraffix for their contributions!

#4-6, #week-in-core

Week in Core, July 26 – August 2, 2016

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

  • 20 commits
  • 17 contributors
  • 69 tickets created
  • 4 tickets reopened
  • 38 tickets closed

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

Code Changes

Build/Test Tools

  • Add npm-shrinkwrap.json to 4.5. By shrinkwraping our dependencies, the same versions of everything will be installed no matter what rules the dependency package.json has specified. [38177] #37541

Bundled Themes

Customize

  • Prevent customize-preview-widgets JS errors in preview if a sidebar is registered with empty before_widget/after_widget params. [38166] #37478

Emoji

  • Add support for the Rainbow and Pirate flag emoji. Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development. Merge of [38179] to the 4.6 branch. [38180] #37543
  • Add support for the Rainbow and Pirate flag emoji. Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development. [38179] #37543

Filesystem API

  • Output buffering for request_filesystem_credentials() should wrap the function directly. [38167] #37488

HTTP API

  • Set $use_authentication property of Requests_Proxy_HTTP to true when proxy authentication is required. [38173] #37494
  • All non-GET/HEAD requests should put the arguments in the form body. [38165] #37456
  • Normalize cookies before passing them to Requests. [38164] #37437
  • Bump version of Requests to 1.7. [38163] #33055

I18N

  • After [38077], merge two duplicate strings in wp_insert_term() and wp_update_term(). [38162] #18218

Plugins

  • Use install_plugins_upload action to print the upload form. [38172] #37495
  • Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin(). [38168] #37490

Script Loader

  • Ignore deregistered dependencies in wp_dependencies_unique_hosts(). [38174] #37502
  • Script Loader: Clarify documentation of wp_resource_hints hook. [38161] #37458

Upgrade/Install

Misc

Props

Thanks to @davidakennedy, @DavidAnderson, @dd32, @dimadin, @francescobagnoli, @helen, @jorbin, @Koster, @ocean90, @pento, @peterwilsoncc, @ramiy, @SergeyBiryukov, @swissspidy, @westonruter, and @Yorick for their contributions!

#4-6, #week-in-core

Week in Core, July 19 – July 26 2016

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

  • 49 commits
  • 35 contributors
  • 73 tickets created
  • 4 tickets reopened
  • 67 tickets closed

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

Code Changes

Administration

  • System fonts: Adjust the smaller tabs so they appear as tabs. [38153] #36753
  • System fonts: Don’t quote single-word font names, per our coding standards. [38152] #36753

Build/Test Tools

Comments

  • Introduce the cache_domain argument for WP_Comment_Query to allow caching to a unique set of cache buckets. [38117] #37419
  • Tests: Include the check_comment function tests in the comment group. Adds @group comment notation to the Tests_Comment_CheckComment class. Introduced in [32519]. [38114] #37356

Cron API

  • Docs: In wp_schedule_single_event(), add a note about scheduling an event to occur within 10 minutes of another event with the same action hook. [38148] #37455

Database

  • Replace incorrect use of E_USER_NOTICE in wpdb::_real_escape() with the version number where the message was added. [38133] #36403

Editor

  • Inline link: Remove proxying through WordPress to test if an URL exists. Fix and enhance the regex that tests if the URL is well formed. [38159] #36638
  • Improve styling of “Add Media” button on mobile and make it more consistent with media buttons added by plugins. [38132] #36999
  • Link check: Use wp.a11y.speak() to announce bad URLs. Do not add a title to the link toolbar. Better error message. [38126] #36638

Feeds

  • Docs: Add missing class, method, and property DocBlocks for feed classes. [38112] #36295

Filesystem API

  • Filesystem API: Change the default value for the $context parameter of get_filesystem_method() and request_filesystem_credentials() to an empty string. [38138] #37412

General

  • Docs: Fix typo in hook description for customize_save_validation_before. [38140] #37318
  • Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6. [38121] [38125] #37318
  • Docs: Add missing inline documentation in WP_HTTP_Requests_Response. [38120] #37318, #33055

Media

  • Docs: Update the description of the $box argument of wp_nav_menu_item_taxonomy_meta_box() for consistency with [38129]. Missed in [38130]. [38142] #37211
  • Docs: In meta box functions, clarify that “Meta box ID” refers to the id attribute of the meta box and not a numeric ID. [38131] #37211
  • Docs: Correct and expand the docs for the $taxonomy argument of wp_nav_menu_item_taxonomy_meta_box(). [38128] #37211
  • Docs: Correct and expand the docs for the $post_type argument of wp_nav_menu_item_post_type_meta_box(). [38127] #37211
  • In wp_nav_menu_item_taxonomy_meta_box(): Rename the $taxonomy parameter to $box for clarity and consistency with other meta box functions. [38130] #37211
  • In wp_nav_menu_item_post_type_meta_box(): Rename the $post_type parameter to $box for clarity and consistency with other meta box functions. [38129] #37211
  • In get_page_uri(), don’t prepend a parent page slug if it’s empty. [38145] #36174

Plugins

  • Use history.pushState() to customize the URL during searches. history.pushState() requires an event handler for popstate which doesn’t exist (yet). [38154] #37233
  • Add a missing space between classes on “ element for custom columns of the Plugins list table. [38149] #37460
  • List Table: Improve WP_Plugins_List_Table::search_box() which was added in [38033]. [38146] #37230
  • Improve Ajax search of new plugins. [38119] #37233
  • Accessibility: Ensure only text is sent to aria-live messages. [38115] #37382
  • Make search field placeholder translatable. [38141] #37230

Posts, Post Types

  • Remove a redundant function_exists( 'mb_strlen' ) check in get_sample_permalink_html(). mb_strlen() is always available since [32114]. [38147] #30633
  • Unit Tests: Add a @ticket reference for test_get_page_uri_without_argument(). [38144] #26284
  • Unit Tests: Move get_page_uri() tests to post/getPageUri.php, added in [37345]. [38143] #26284

Post Thumbnails

  • Remove an unused nonce in _wp_post_thumbnail_html(). [38137] #12922
  • Only update featured images when saving a post. [38118] #12922

Script Loader

Themes

  • Docs: Fix typo in wp_title() description. [38135] #37442
  • Docs: Change type of WP_Upgrader_Skin::$result to string|bool|WP_Error. [38134] #32246

TinyMCE

  • Fix the calculation for the inline toolbar vertical position. [38160] #37481
  • wpView:
  • Add the wpview-wrap class and pass third param to the getNodes() callback for back-compat.
  • Attach the mutation observer that resizes a view iframe inside the iframe to minimize memory use/leaks.
  • Remove the wp-mce-view-unbind event. It has never been particularly reliable and now it doesn’t fire when the user deletes a view by typing or pasting over it.
  • Restore changing of a view iframe body classes when the editor body classes change. [38158] #36434
  • TinyMCE, wpView: bail early when the iframe node is not attached to the DOM. We can’t load any HTML in it as here is no iframe.contentWindow in these cases. [38157] #36434
  • Fix selecting an image on touch in iOS Safari for TinyMCE 4.4.1. [38156] #37427
  • Upgrade to 4.4.1, changelog: https://www.tinymce.com/docs/changelog/#version441-july262016. [38155] #37427, #37476

Upgrade/Install

  • Prevent an endless self-calling loop in wp_tempnam(). [38151] #33999

Thanks to @adamsilverstein, @afercia, @afineman, @andizer, @azaozz, @bradt, @Chouby, @chriscct7, @crstauf, @DrewAPicture, @flixos90, @FolioVision, @gma992, @helen, @ideag, @inderpreet99, @iseulde, @ixkaito, @joemcgill, @jorbin, @medariox, @mehulkaklotar for initial patch, @mikeschroder, @netweb, @ocean9, @ocean90, @pento, @peterwilsoncc, @rachelbaker, @rahulsprajapati, @rahulsprajapati for initial patch, @ramiy, @SergeyBiryukov, @stevenkword, and @swissspidy for their contributions!

#4-6, #week-in-core

Week In Core, July 12 – July 19 2016

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

  • 71 commits
  • 40 contributors
  • 82 tickets created
  • 7 tickets reopened
  • 78 tickets closed

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

Code Changes

Accessibility

  • Improve keyboard navigation on the themes browser modal window [38084] #37383

Bundled Themes

Canonical

Comments

  • Use wp_strip_all_tags() to strip HTML tags [38092] #37208
  • Include comment_content with html and without in blacklist_keys comparison [38048] #37208
  • Strip html tags from comment content before blacklist_keys comparison [38047] #37208

Database

  • Add unit test to test that a column type change for a table name with a hyphen is working after [38044] #31679

Docs

  • Use the three-digit, x.x.x-style version in the DocBlock for the nested lowercase_octets() function. [38107] #32246
  • Add a missing DocBlock for the lowercase_octets() function, which is nested within redirect_canonical() [38106] #32246
  • Clarify the fields argument description in WP_Network_Query::__construct(). [38104] #32504
  • Clarify the fields argument description in WP_Site_Query::__construct(). [38103] #35791
  • Correct comment_max_links_url filter and $url param descriptions to communicate values are found links [38098] #37319
  • Correct type of WP_Post_Type::$cap from array to object. [38097] #36217
  • Correct $post parameter name and description for wp_attachment_is() and wp_attachment_is_image(). [38068] #37377
  • Update a cross-reference in the DocBlock for wp_register_plugin_realpath() from plugin_basename() to wp_normalize_path(). [38061] #37357
  • Add an initial since version to wp-includes/feed.php [38056] #32246, #36295
  • Update the default value for the optional $args parameter in get_networks() following [38055] #32504
  • Add and clarify changelog entries for elements that can now accept, use, or return WP_Post_Type objects [38051] #36217

Editor

  • Enqueue the wp-embed script to fix embed previews inside the media modal. [38062] #37334

Emoji

External Libraries

Filesystem API

HTTP API

  • Pass proxy settings to Requests [38054] #33055, #37107
  • Update Requests. Fixes an issue where you couldn’t set a Requests_Proxy_HTTP object as a proxy setting. [38053] #37107, #33055
  • Remove duplicate documentation for the http_api_debug hook. [38043] #37081

I18N

  • Remove non-translatable link attributes from translatable strings in wp_plugin_update_row(), wp_theme_update_row(), and get_theme_update_available() [38082] #36048
  • Combine duplicate “Menu Locations” and “Menu Options” strings. [38080] #18218
  • Combine two duplicate “Invalid post type” strings. [38076] #18218
  • Change unnecessary uppercased words in WP_Upgrader::generic_strings() to lower case. [38074] #18218
  • Combine two duplicate “Unable to locate WordPress Theme directory” strings. [38073] #18218
  • After [38057], consistently use a context for other instances of Activate %s,Network Activate %s, and Delete %s strings [38071] #37290
  • Remove a stray translator comment added in [38070] #37290

Import

Mail

Media

Meta

  • Ensure $wp_meta_keys is an array in get_registered_meta_keys(). [38108] #37415, #35658
  • Remove object subtype handling from register_meta() [38095] #35658
  • Ensure filters are backwards compatible for pre-4.6 style meta registration [38041] #35658

Multisite

  • Correct default value for orderby in WP_Network_Query::__construct() [38102] #32504
  • Correct default values for orderby and order in WP_Site_Query::__construct() [38085] #35791
  • Set default $args to an empty array in get_networks() [38042] #32504

Permalinks

  • In wp_install_maybe_enable_pretty_permalinks() [38109] #36628
  • Rename $usingpi to $using_index_permalinks for clarity. [38067] #37380
  • After [37747], make sure $usingpi, $writable, and $update_required are defined before checking them on permalinks update.

Plugins

  • Use the correct admin screen when searching for plugins via Ajax [38091] #37373

Readme

  • Link to the Plugin Developer Handbook on DevHub as the primary resource for information on extending WordPress [38105] #37399

Role/Capability

  • Introduce capability tests for non-logged-in users. [38096] #37405

Script Loader

  • Limit resource hinting to enqueued assets [38100] #37385
  • Increase priority of wp_resource_hints() so hints get printed before scripts and styles [38046] #37317

Taxonomy

  • Improve back compat of values passed to ‘terms_clauses’ filter [38099] #37378
  • Correct WP_Error usage in WP_Tax_Query::clean_query() and WP_Tax_Query::transform_query(). [38079] #37389
  • On term.php, use $taxnow when fetching currently edited term. #37205. [38069] #37205

Text Changes

  • Change Network deactivate %s to upper case, for consistency with Network Activate %s. [38081] #37290
  • Add a full stop to “Invalid taxonomy” and “Invalid term ID” strings, for consistency with similar post-related messages. [38077] #18218, #32329
  • After [37297], replace two more instances of “WordPress.org Plugin Directory” with “WordPress Plugin Directory”.

TinyMCE

  • Replace the editor iframe title on MacOS to fix the help shortcut. [38110] #36863

Twenty Thirteen

  • Fix selective refresh of Masonry-laid out widgets by deferring initialization until DOM ready [38083] #37390

Unit Tests

Update/Install

  • Give context to some install/update strings to allow for differentiation between theme and plugin translations. [38057] #37290

Users

  • Update help text for user-new.php to remove reference to sending passwords via email. [38064] #36763

WP Mail

Props

Thanks to @ramiy, @afercia, @alleynoah, @ambrosey, @anneschmidt, @azaozz, @boonebgorges, @bpetty, @celloexpressions, @cfinke, @Clorith, @dabnpits, @davidakennedy, @dlh, @DrewAPicture, @flixos, @flixos90, @iandunn, @jeremyfelt, @joemcgill, @johnbillion, @karmatosed, @morganestes, @ocean90, @pbearne, @pento, @peterwilsoncc, @rachelbaker, @ramiy, @rmccue, @ruudjoyo, @SergeyBiryukov, @stephenharris, @swissspidy, @szepeviktor, @underdude, @vishalkakadiya, @westonruter, and @zuige for their contributions!

#4-6, #week-in-core

Week In Core, July 6 – July 12 2016

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

  • 59 commits
  • 39 contributors
  • 61 tickets created
  • 3 tickets reopened
  • 20 tickets closed

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

Code Changes

Administration

  • Add aria-button-if-js class to links in the media list table that behave like buttons when JavaScript is on. [38031] #26504, #36555

Bootstrap

Comments

Customize

  • Fix panel indentation in Firefox. [37984] #34622
  • Ensure that WP_Customize_Setting::value() can return a previewed value for aggregated multidimensionals. [37982] #37294
  • Ensure that WP_Customize_Nav_Menu_Section is able to represent a placeholder nav menu. [37981] #37293

Docs

  • The $labels property in WP_Post_Type is of type object as returned from get_post_type_labels(), not an array. [38030] #36217
  • Standardize references to “meta box” or “meta boxes” as two distinct words throughout core documentation per the core spelling guide. [38029] #32246
  • Standardize capitalization of Ajax throughout core documentation per the core spelling guide. [38028] #32246
  • Link the 4.6 changelog entry in the DocBlock for register_meta() to its corresponding dev note on make/core. [38027] #35658, #37318
  • Fix a typo in the DocBlock for themes_api(), themes_api, plugins_api(), and plugins_api. [38025] #32246
  • Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6. [38024] #37318
  • Cross-reference parent classes in DocBlocks for upgrader classes moved to their own files in 4.6 [38023] #36618, #37318
  • Improve usefulness of DocBlocks for ajax-actions.php functions introduced in 4.6. [38022] #37318
  • Fix a typo in the hook doc description for the enable_loading_advanced_cache_dropin run-time filter. [38021] #34936, #37318
  • Fix a typo in an inline hook reference in the DocBlock for comment_form(). [38018] #32246
  • Fix typo in a comment in Core_Upgrader::upgrade(). [38014] #37314
  • Correct the description of the $network_id in WP_Site_Query. [38008] #35791
  • Fix an incorrect @since comment. [37994] #36495
  • Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core. [37985] #36495

Embeds

  • Include locale stylesheets after default styles. [38010] #36839
  • Don’t print the HTML for a featured image if a post has no featured image. [37988] #37288

HTTP API

I18N

  • I18N: Introduce an on/off switch for locales where comment number needs to be declined. [37987] #13651

Media

  • Don’t use ‘full’ as array key in wp_calculate_image_srcset(). [37986] #36345

Meta

  • Add a missing @since param for wp_object_type_exists(). [38038] #35658
  • Don’t pass an empty $meta_key to get_metadata(). [37996] #35658
  • Introduce an initial set of tests for register_meta(). [37995] #35658
  • Make registration error conditions return consistently. [37991] #
  • Ensure $object_subtype is available before use in register_meta(). [37990] #35658

Multisite

  • Use hash_equals() when comparing hashes to mitigate timing attacks. [38032] #37324
  • Correct logic used to display an Edit User link after adding a user. [38007] #37223
  • Add a nonce to the “Cancel” URL when changing a site’s admin email. [38006] #36954
  • Don’t store max_num_pages in WP_Network_Query query cache. [38003] #32504
  • Don’t store max_num_pages in WP_Site_Query query cache. [38002] #35791

Plugins

  • Improve Ajax search of installed plugins. [38033] #37230
  • In plugin_basename() sort plugin paths before resolving symlinks. [37983] #28441

Resource Hints

  • Remove schemes from dns-prefetch resource hint outputs. [38036] #37240

Revisions

Taxonomy

  • Remove an unnecessary double assignment in WP_Term_Query::get_terms(). [38020] #37254

Tests

  • Don’t change the memory_limit setting during tests. See #32075. [38016] #32075
  • Ensure that test for invalid user ID actually uses an invalid user ID. [38005] #37308
  • Add description for data_get_comments_number_text_declension(). [37997] #13651

Text Changes

Themes

  • PHP 7 compatibility issues fixed in Twenty Thirteen and Twenty Fourteen [38026] #37227

TinyMCE

  • preserve and tags inside the editor. Uses image placeholders for the tags and makes then visible. [38039] #32923
  • update to 4.4.0, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. [38034] #36434, #37327

Toolbar

  • Allow 0 as a value for the tabindex property of a menu item. [38035] #32495

Upgrade/Install

  • Do not remove event handlers when trying to update a theme. [38019] #37285

Widgets

  • After [37972], ensure that $box['args'] is an array before trying to access __widget_basename. [38004] #35021

Props

Thanks to @A5hleyRich, @adamsilverstein, @afercia, @azaozz, @birgire, @boonebgorges, @DrewAPicture, @elrae, @ericlewis, @Faison, @helen, @iseulde, @jaspermdegroot, @jdgrimes, @jeremyfelt, @joedolson, @joemcgill, @johnbillion, @jrf, @karmatosed, @metodiew, @niallkennedy, @ocean90, @pento, @peterwilsoncc, @rachelbaker, @ramiy, @rmccue, @sc0ttkclark, @scottbasgaard, @SergeyBiryukov, @spacedmonkey, @stubgo, @swissspidy, @valendesigns, @westonruter, @wpfo, @xknown, and @Zuige for their contributions!

#4-6, #week-in-core

Week In Core, June 29 – July 5 2016

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

  • 77 commits
  • 50 contributors
  • 87 tickets created
  • 12 tickets reopened
  • 86 tickets closed

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

Code Changes

Administration

  • List tables: Make the pagination links and text better responsive. [37912] #33962

Build/Test Tools

  • Unit Tests: Change some @group annotations to @ticket. [37954]
  • Unit Tests: Remove @group foo annotation from Tests_WP_Resource_Hints::test_dns_prefetch_styles(). [37951]
  • Unit Tests: Remove an unused parameter from Tests_Ajax_DimComment::test_with_bad_id(). Prevents a “too few arguments” error in PHP 7.1.0. [37950] #37271

Comments

Customize

  • Fix site icon preview in RTL. [37964] #37286
  • Prevent image controls with selected images smaller than pane width from being distorted through stretching to fit width. [37957] #37277
  • Use the correct variable when referring to the media frame. [37955] #36236
  • Text change on Widgets and Menus screens for buttons directing users to the Customizer. [37904] #37159
  • Add a RTL version of “browser.png” for the site icon preview. [37963] #37063
  • Reverse order of setting sanitization/validation, validating prior to sanitizing. [37942] #34893, #37192, #37247

Editor

Embeds

  • After [37745], check if a featured image exists before attaching an event listener. [37977] #35657

General

  • Docs: Fix a typo across some function and hook docs. s/filterss/filters. [37961] #32246
  • Remove the Pragma header from responses. [37944] #37250
  • Docs: Add changelog entries to the hook doc for the safe_style_css filter denoting recent CSS attribute additions. [37931] #35877, #32246
  • Return “O B” when passing 0 to size_format(). [37962] #36635

HTTP API

  • Add unit tests for wp_get_http_headers() and wp_remote_retrieve_headers(). [37907] #37090

I18n

  • Make the translator comment added in [37858] more explicit and consistent with other similar instances. [37948] #37147
  • Localize the jQuery UI datepicker. [37908] #29420
  • Adjust the regex in wp_maybe_decline_date() to avoid \w and \b, as they don’t work with Unicode characters correctly in PHP 5.3.3 and earlier versions. [37979] #36790
  • Add tests for wp_maybe_decline_date(). Reverts [37718], $wp_locale needs to be cloned. [37975] #36790

Media

  • Avoid PHP notices when trying to show a parent post title of an orphaned post type. [37952] #37186
  • Only show parent post titles when the user can read said post. [37941] #37186
  • Improve form validation errors handling when editing images. [37966] #36316
  • In Walker_Nav_Menu_Edit::start_el() initialize $original_title with false. Prevents displaying “Original:” without a title when adding a menu item without a title. [37953] #36729

Networks and Sites

  • Docs: Remove duplicate text for is_main_site() parameter. [37932] #37241
  • Simplify logic assigning orderby in get_site_by_path(). [37930] #37215
  • Revert [37874]. After [37923], get_blog_details() contained a now unnecessary attempt at back-compat for objects stored in cache. [37929] #36717
  • Revert property type changes in WP_Site. [37922] #34292
  • Docs: Supplement a changelog entry in the DocBlock for the $id property in WP_Network. [37919] #36717
  • Lazy load extended WP_Site properties when requested. [37918] #36935
  • Docs: Add changelog entries to the DocBlocks for the $blog_id and $site_id properties in WP_Site. [37917] #36717
  • Fire the ms_loaded action after multisite’s bootstrap has finished. [37916] #37235
  • Network Admin: Replace “Options saved.” notice with “Settings saved.”. [37959] #37279

Options, Meta APIs

  • Make retrieving registered metadata actually work. The initial implementation used a single argument, which has now been added to the whitelist. [37934] #35658
  • Ensure $args is an array and simplify compat logic. [37933] #35658
  • Actually use fallback auth for the previous registration method. [37928] #35658
  • Introduce an expanded meta registration API. There still need to be lots of tests written for previous and new behaviors, and many things are subject to change. Maybe things will explode. #yolo [37924] #35658

Plugins

  • Return the original value in apply_filters_deprecated() if no filter is registered for the tag. [37911] #10441
  • Tests: After [37861] move tests for deprecated filters into filters.php. [37909] #10441
  • Clean up uninstall_plugins option during database upgrade. [37965] #31625

Posts, Post Type

  • In wp_ajax_inline_save(), do not apply level for non-hierarchical post types. [37913] #35010

Post Thumbnails

REST API

  • Include a refreshed nonce in a X-WP-Nonce header when responding to an authenticated request. [37905] #35662
  • Include auto-discovery Link header when serving API requests. [37903] #35580
  • Reverse order of setting sanitization/validation, validating prior to sanitizing. [37943] #37247, #37192

Script Loader

Text Changes

Themes

  • Avoid announcing the theme search results too many times. [37967] #36848
  • After [37287], remove deprecated feature category. [37947] #33407
  • After [37287], add deprecated theme features to the tag list in WP_Theme::translate_header().
  • Add “Custom Logo” to the list of WordPress theme features. [37945] #33407, #36744
  • Docs: Fix typo in WP_Theme_Install_List_Table description. [37937] #37234
  • After [37742], fix the color of the “Upload Theme” button to match other page title actions. [37968] #35457

Upgrade/Install

  • dbDelta() will no longer try to downgrade the size of TEXT and BLOB columns. [37939] [37938] #36748
  • Change priority for theme/update update rows. [37978] #13071
  • Reject invalid messages in the Shiny Updates postMessage handler. [37976] #37125
  • Fix plugin updates from the details modal on the Dashboard. 37974] #37131, #37126
  • Fix plugin updates from the details modal on update-core.php. [37973] #37126
  • Correctly decrement the update count after translation updates. [37971] #37127
  • Trigger a JS event when updating a theme. [37970] #37216
  • Trigger the correct event after installing an importer plugin. [37969] #37273

Users

  • Docs: In wp_list_authors(), clarify that include and exclude arguments can also be an array. Fix duplicated exclude argument description. [37949] #37239
  • Check zxcvbn is defined before calling. [37940] #34905

Widgets

  • Dashboard: Don’t add a “Configure” link to the toggle button. [37972] #35021

XML-RPC

Thanks to @aaires, @adamsilverstein, @afercia, @aidvu, @azaozz, @barryceelen, @birgire, @borgesbruno, @celloexpressions, @clubduece, @danielbachhuber, @DavidAnderson, @DrewAPicture, @ericlewis, @Faison, @flixos90, @Frozzare, @geekysoft, @grapplerulrich, @helen, @jeremyfelt, @jipmoors, @joemcgill, @jorbin, @Kenshino, @littler.chicken, @markjaquith, @nicholas_io, @Nikschavan, @ocean90, @Offereins, @patilswapnilv, @noahsilverstein, @pento, @peterwilsoncc, @polevaultweb, @Presskopp, @rabmalin, @rachelbaker, @ramiy, @rmccue, @sc0ttkclark, @schlessera, @SergeyBiryukov, @sidati, @spacedmonkey, @swissspidy, @voldemortensen, @welcher, and @westonruter for their contributions!

#4-6, #week-in-core