Week in Core, November 30 – December 6, 2016

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

  • 150 commits
  • 63 contributors
  • 140 tickets created
  • 17 tickets reopened
  • 104 tickets closed
  • WordPress 4.7 released 🎉

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

Code Changes

Administration

  • Accessibility: Remove inappropriate content from the Themes screen heading. [39528] #26601
  • Accessibility: Remove inappropriate content from the Add Themes screen heading. [39527] #26601
  • Accessibility: Remove inappropriate content from the Media Library screens headings. [39526] #26601

Build/Test Tools

  • Correctly set up the current screen during list table tests so that they don’t fail when run individually. [39481] #38761
  • Specify exact node version in package.json. [39480], [39478] #35105, #38657
  • Remove PHP 7.1 from allowed failures [39424-39425] #37625

Bundled Theme

  • Default Themes: Update version numbers and readme files for 4.7 release [39496] #38858
  • Twenty Seventeen: Fix CSS specificity problem with CSS feature query for object-fit [39495] #39073
  • Twenty Seventeen: Improve display of video header and header image in modern browsers [39485], [39483] #39035
  • Twenty Seventeen: Add specific font stack for Thai language [39484], [39482] #38937
  • Twenty Seventeen: Improve ARIA for the nav menu. [39451-39452] #39029, #39026
  • Twenty Seventeen: Ensure header text color updates in Customizer preview when cleared [39447-39448] #38993
  • Twenty Seventeen: Fix broken menu toggle in Customizer after menu items are added [39419], [39423] #38992
  • Twenty Seventeen: Fix style issues with gallery image links [39418], [39422] #38969
  • Twenty Seventeen: Hide front section panels on page load of Customizer. [39417], [39421] #38951
  • Twenty Seventeen: Add .has-header-video styles for custom color schemes. [39416] #38995
  • Twenty Seventeen: Better handling of custom headers when no image is set. [39413-39414] #38995
  • Twenty Seventeen: Make spacing on pages without comments consistent [39404-39405] #38972
  • Twenty Seventeen: Make sure header text color is applied when color schemes are active. [39397-39398] #38980
  • Twenty Seventeen: Make fixed navigation apply at correct height on front page, without header video or image [39394], [39392] #38927
  • Twenty Seventeen: Provide a background color fallback for non-webkit browsers on input styles [39388] #38939
  • Twenty Seventeen: Allow child themes to easily extend custom color patterns [39386] #38949
  • Twenty Seventeen: Make screen reader text on scroll arrow more meaningful [39384] #38970
  • Twenty Seventeen: Keep header videos from extending past footer. [39380-39381] #38950

Comments

  • Merge a similar string between comments.php, XML-RPC and the REST API comments controller. [39508] #39013

Customize

  • Prevent infinite full refresh from occurring when selective refresh falls back for a nav menu that has items excluded from rendering via filtering. [39510-39511] #38612
  • Defer populating post_name for auto-draft posts in customized state until posts are published. [39506-39507] #39078
  • Ensure changeset_uuid query param is removed from the customize.php window’s location once a changeset has been published (committed) with starter content. [39504-39505] #39081
  • Prevent posts/pages imported via starter content from being dropped when adding post/page stubs via nav menus and the dropdown-pages control. [39502-39503] #38114, #34923, #39071
  • Ensure textarea for Custom CSS displays as code (in LTR) when an RTL language is active. [39499-39500] #35395, #39085
  • Ensure a custom_css post insertion gets an initial post revision. [39479], [39477] #30854, #38672, #35395, #39032
  • Custom CSS: Change the help link to something better for users. [39467], [39466] #39015
  • Fix posts limit query arg for WP_Query from incorrect number to posts_per_page. [39434-39435] #39022
  • Reuse existing non-auto-draft posts and existing auto-draft posts in the customized state with matching slugs when applying starter content. [39411] #38114, #38928
  • Reject a changeset update when a non-future date is provided and also ensure that a published changeset always gets set to the current date/time. [39409-39410] #30937, #38943
  • Fix handling of the nav menu item labels (titles) that match defaults (original titles) and fix the display of item type labels. [39395], [39393] #38015, #38955

Feeds

General

Help/About

Media

  • Accessibility: Improve keyboard accessibility avoiding confusing tab stops in the Media views. [39529] #30599
  • Docs: Add inline documentation for image-edit.js. [39493] #38748
  • Fix regression with display of small images in media library. [39399], [39396] #38965
  • Docs: Document the usage of the global $wpdb in _filter_query_attachment_filenames(). [39390] #38973

Misc

  • Tag 4.7 [39525] #
  • WordPress 4.7 “Vaughan”. [39524] #
  • Post-RC3 bump. [39519] #
  • WordPress 4.7 RC3. [39516] #
  • Post-RC2 bump. [39474] #
  • WordPress 4.7 RC2. [39473] #
  • Twenty Seventeen: Add .has-header-video styles for custom color schemes. [39415]

Options, Meta APIs

  • REST API: Register the admin_email setting in single site only. [39470-39472] #38990
  • REST API: Site URL setting should not be present on multisite installations. [39468] #39005
  • REST API: Correct the admin_email setting description for single site installs. [39406] #38990
  • Multisite: Display different descriptions for multisite or single site installations. [39407] #38990
  • Options: Pass the $passed_default parameter to the 'default_option_{$option} filter in add_option(). [39382] #38176, #38930

Plugins

REST API

  • Comments: Merge similar strings between comments.php and the REST API comments controller. [39490-39491] #39014
  • Merge similar date strings in the revisions and comments controllers. [39488-39489] #39016
  • Treat any falsy value as false in ‘rest_allow_anonymous_comments’. [39487] #39010
  • Docs: Add missing REST API-related args to register_post_type() and register_taxonomy(). [39462-39463] #39023
  • Merge similar strings in a comments endpoint parameter description. [39457] #39036
  • Fix bug where comment author and author email could be an empty string when creating a comment. [39446], [39444] #38971
  • Fix handling of some orderby parameters for the Posts controller. [39440-39441] #38971
  • Disable DELETE requests for users in multisite. [39438-39439] #38962
  • Return a WP_Error if meta property is not an array. [39436-39437] #38989
  • Add test for creating a comment with an invalid post ID. [39408] #38991
  • Fix incorrect uses of rest_sanitize_value_from_schema(). [39400-39401] #38984

Role/Capability

  • Don’t assign the delete_site capability to anyone on single site installs. [39494] #38326
  • Multisite: Replace is_super_admin() with manage_network for admin bar permissions. [39492] #39064, #37616

Taxonomy

  • Docs: Update an @since as there will not be a 4.6.2 before 4.7. [39475-39476] #37291
  • REST API: Capability check for editing a single term should use the singular form. [39464] #35614, #39012
  • REST API: Use the correct error message when editing a single term. [39460-39461] #39017
  • REST API: Fix incorrect capability check on term create. [39402-39403] #35614, #38958
  • Performance: Revert [38677] from the 4.7 branch. This avoids fatal errors caused with recursive calling of term functions within the get_terms filter. [39454] #21760

Themes

  • Reuse existing non-auto-draft posts and existing auto-draft posts in the customized state with matching slugs when applying starter content. [39412] #38114, #38928

TinyMCE

  • Fix the styling of notices generated by the editor UI. [39501] #38917

Users

  • Clarify the return value of get_current_user_id() for non-logged-in users. [39486] #39051
  • REST API: Require the reassign parameter when deleting users. [39426-39427] #39000

Thanks to @andizer, @mor10, @adamsilverstein, @afercia, @azaozz, @boonebgorges, @celloexpressions, @ChopinBach, @clorith, @coffee2code, @davidakennedy, @dd32, @desrosj, @dlh, @flixos90, @georgestephanis, @helen, @helen, @hnle, @iaaxpage, @imnok, @jbpaul17, @jeremyfelt, @jnylen0, @joedolson, @joehoyle, @joemcgill, @johnbillion, @jorbin, @kadamwhite, @karmatosed, @ketuchetan, @laurelfulford, @littlebigthing, @lucasstark, @melchoyce, @michaelarestad, @mikeschroder, @mt8.biz, @nacin, @netweb, @ocean90, @ovenal, @pento, @peterwilsoncc, @presskopp, @rachelbaker, @rahulsprajapati, @ramiabraham, @ramiy, @rensw90, @rianrietveld, @rmccue, @samuelsidler, @sayedwp, @SergeyBiryukov, @sstoqnov, @The PHP tea, @timmydcrawford, @utkarshpatel, and @westonruter for their contributions!

#4-7, #week-in-core

Week in Core, November 23 – 29, 2016

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

  • 39 commits
  • 30 contributors
  • 81 tickets created
  • 3 tickets reopened
  • 31 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

  • Build: Remove fsevents from npm-shrinkwrap.json [39368] #38657
  • Add an extra WP_Error assertion when testing a valid user activation key. This provides a better failure message if the assertion does fail. [39364] #38716
  • When testing the output of wp_list_pages(), use a known and fixed date for each post so the tests don’t fail when the date changes between the beginning and end of a test. [39363] #38688
  • Git: Prevent untracked files from being ignored by git in bundled themes. [39362] #27207, #38779
  • Add npm-shrinkwrap.json to 4.7. [39358] #38657

Bundled Theme

  • Twenty Seventeen: Add textdomain for starter content attachment titles. [39374-39373] #38981
  • Twenty Seventeen: Ensure edit button label displays properly in other languages [39341] #38876

Customize

  • Fix regression in ability to hide fields for advanced menu properties in nav menu item controls. [39379-39378] #34391, #38952
  • Fix regression in ability to create submenus for nav menus via drag and drop. [39377-39376] #34391, #38948
  • Fix logic for previewing the URL for nav_menu_item settings for terms and post type archives. [39365] #38114, #38945
  • Refactor logic for updating custom_css posts by introducing wp_update_custom_css_post() function and renaming update filter. [39350] #35395, #38672
  • Clean up docs and code style for customize changes in 4.7. [39345] #37770, #38908

Embeds

  • Correctly remove security attribute from iframes in IE 10 and IE 11. [39347] #38694

General

  • Git: Ignore patch related files, so they can’t be accidentally committed. [39361] #38727
  • SVN: Ignore patch related files, so they can’t be accidentally committed. [39360] #38727
  • Docs: Add a missing changelog entry for the point where the $tagnames parameter was added to get_shortcode_regex(). [39351] #38914

Misc

Plugins

  • WP_Hook: Re-initialize any actions added directly to $wp_filter by advanced-cache.php. [39370-39369] #38929

REST API

  • Add test for creating a comment with an invalid post ID. [39375] #38816, #38991
  • Add tests for empty or “no-op” updates. [39371] #38700, #38975
  • Special case the “standard” post format to always be allowed. [39353] #38916
  • Allow unsetting a post’s password. [39352] #38919
  • Add support for comments of password-protected posts. [39349] #38692
  • Always fire the rest_insert_* actions after the related object is updated or inserted. [39348] #38905
  • Make JS Client store schema in session storage. [39344] #38895
  • Allow unsetting of page templates in update requests. [39343] #38877
  • Update “resource” strings to use the appropriate nouns. [39342] #38811

Themes

  • Fix logic for previewing the URL for nav_menu_item settings for terms and post type archives. [39366] #38114, #38945
  • Theme starter content: Add support for featured images and page templates. [39346] #38615

TinyMCE

  • Fix the styling of notices generated by the editor UI. [39367] #38917

Thanks to @mor10, @adamsilverstein, @afercia, @azaozz, @celloexpressions, @danielbachhuber, @davidakennedy, @dd32, @delawski, @DrewAPicture, @flixos90, @georgestephanis, @helen, @iseulde, @jnylen0, @joehoyl, @joehoyle, @johnbillion, @karmatosed, @keesiemeijer, @lucasstark, @nacin, @ocean90, @odysseygate, @pento, @rachelbaker, @ramiy, @swissspidy, @tg29359, @westonruter, and @xrm for their contributions!

#4-7, #week-in-core

Week in Core, November 15 – 22, 2016

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

  • 108 commits
  • 53 contributors
  • 114 tickets created
  • 16 tickets reopened
  • 101 tickets closed

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

Code Changes

Bundled Theme

  • Twenty Seventeen: CSS coding standards [39340] #38901
  • Twenty Seventeen: Ensure galleries display correctly in IE11. [39339] #38872
  • Twenty Seventeen: Avoid an undefined index notice after [39291]. [39317] #38847
  • Twenty Seventeen: Adds background-attachment: fixed; to devices that should support it [39297] #38395
  • Twenty Seventeen: Ensure the use of proper image size for custom header image [39291] #38847
  • Twenty Seventeen: Remove some extraneous function calls. [39286] #38848
  • Twenty Seventeen: Additional default header image optimizations. [39279] #38793
  • Twenty Seventeen: Add styles for custom header video controls. [39273] #38697
  • Twenty Seventeen: Compress the default header image. [39248] #38793

Comments

  • REST API: On Comment create, limit the ability to set the author_ip value directly. [39302] #38819
  • REST API: Change “ipv4” types to “ip” to support ipv6. [39296] #38818
  • REST API: Remove the karma property and query parameter from the Comments endpoints. [39292] #38821
  • REST API: On comment create, return an error if the type property is set to anything other than comment. [39290] #38820
  • REST API: On comment create, return an error if the post parameter does not relate to a valid WP_Post object. [39288] #38816
  • REST API: On comment create, fallback to the user_agent header value. [39287] #38817
  • Query used to fill comment descendants should reset ‘offset’ and ‘number’ params. [39274] #37696

Customize

  • Prevent selective refresh from causing infinite fallback refreshes when nav menu contains invalid items. [39333] #38890
  • Remove iframe-specific behaviors from customize preview when previewing on frontend and not contained inside iframe. [39332] #30937, #38867
  • Ensure that WP_Customize_Manager::save_changeset_post() returns setting_validities even for supplied values that are unchanged from values in changeset. [39320] #38705, #30937, #38865
  • Ensure WP_Customize_Setting::value() returns previewed value for custom types utilizing the customize_value_{$id_base} filter. [39318] #38864
  • Autoprefixer for [39249]. [39301] #29158
  • Remove obsolete edit shortcut style rules from Twenty Seventeen. [39285] #38776
  • Ensure Close button actually closes customizer (instead of going back) after switching to a different theme inside a customize-loader iframe. [39271] #38833
  • Prevent edit shortcut buttons from being inserted into container elements in the head or into elements which should not get interactive children. [39270] #27403, #38672, #38830
  • Allow URL for Codex link in Additional CSS section to be translated. [39268] #35395, #38823
  • More visible focus and hover states for close and back buttons. [39249] #29158
  • Ensure edit shortcuts have same background color regardless of theme colors. [39243] #38776
  • Add !important line-height to edit shortcut buttons. [39242] #38787
  • Allow starter content to apply in a new theme when switching from another theme containing changes. [39241] #38114, #38541
  • Only show video header controls if previewing front page; show explanatory notice when controls are hidden. [39237] #38796, #38778
  • Adjust layout for edit shortcuts only when shown. [39233] #38651

Database

  • Add support for LIKE-escaped tables in ::get_table_from_query(). [39275] #38751

Emoji

General

  • Plugin install: De-duplicate a conditional, introduced in [38172]. [39336] #38190
  • Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.7.0 entries. [39281] #37770
  • Tests: Add a missing $message argument for assertEquals() in [39265]. [39267] #23626
  • Tests: Use assertEquals()‘ native functionality for delta comparison in test_wp_convert_bytes_to_hr(). [39265] #23626

I18N

  • In wp_dropdown_languages() rename the new show_site_locale_default argument to show_option_site_default. [39331] #38632, #38871
  • Add an additional caching layer for _load_textdomain_just_in_time(). [39330] #37997
  • Introduce more translator comments for strings that contain placeholders but don’t have an accompanying translator comment. [39326] #38882
  • Move the support forums URL in update-related HTTP API error messages to a separate translatable string that is already used elsewhere. [39325] #38880
  • Remove an erroneous @TODO introduced in [39323]. [39324] #38882
  • Begin introducing translator comments for strings which include placeholders but no accompanying translator comment. [39323] #38882
  • REST API: Merge two error messages for edit / update. [39322] #38879
  • REST API: Update error messages in WP_REST_Comments_Controller to use the common text for permission errors. [39321] #38875
  • Use ‘WordPress hook name’ instead of ‘PHP hook name’ in translator comments added in [39315]. [39316] #38862
  • Add translator comments for strings in _deprecated_*() functions. [39315] #38862
  • Remove unnecessary __() calls in _rotate_image_resource() and _flip_image_resource(). [39314] #38862
  • REST API: Merge some more permission error strings missed in [39309]. [39313] #38857
  • Text Changes: Merge strings referring to list_users capability. [39312] #38857
  • Merge two ‘RSS Error:’ strings. [39311] #38861
  • REST API: After [39306], move author_ip argument to the correct place. [39310] #38822
  • REST API: Merge and clarify some permission error strings. [39309] #38857
  • Text Changes: Merge and clarify some permission error strings in the admin. [39308] #38857
  • Merge two ‘ERROR:’ strings. [39307] #38860
  • REST API: After [39302], clarify author_ip parameter in error message. [39306] #38822
  • REST API: Merge two similar permission error strings in class-wp-rest-comments-controller.php. [39305] #38857
  • REST API: Merge two similar permission error strings. [39304] #38857
  • REST API: Clarify parameters when used in error strings. [39298] #38822
  • REST API: After [39252] and [39264], uppercase some more ‘ID’ references in translatable strings. [39266] #38791
  • REST API: Uppercase ‘ID’ in endpoint descriptions and error messages for consistency with other strings. [39264] #38791
  • REST API: Unify some more permission error messages. [39259] #38803
  • REST API: Unify permission error messages. [39257] #38803
  • Remove “ tags from translatable strings in wp-includes/class-wp-customize-manager.php. [39254] #38802
  • REST API: Remove two duplicate strings, use the ones we already have. [39252] #38791
  • REST API: Unify permission error messages. [39251] #38791, #34521
  • REST API: After [39238] and [39239], move the remaining translator comments to preceding line. [39245] #38791
  • Docs: Apply documentation standards to the new get_available_languages filter. [39244] #38788
  • REST API: Move translator comments to preceding line. [39239] #38791
  • REST API: Add translator comments to text with placeholders. [39238] #38791
  • Add the get_available_languages filter. [39235] #38788

Media

Misc

  • REST API: Check read permissions on posts when viewing comments. [39295]
  • Small coding standards cleanup of wp-custom-header.js. [39277]
  • Post-4.7 beta 4 bump. [39263]
  • WordPress 4.7 Beta 4. [39262]

Options, Meta APIs

  • REST API: Update description strings to match already existing ones in the admin. [39335] #38807

Posts, Post Types

  • Accessibility: Improve the Post Attributes meta box fields labels. [39247] #38790
  • Improve sanitisation of templates’ post types. [39236] #38766

REST API

  • Set the comment type to a readonly property in the schema. [39337] #38820, #38886
  • Trim trailing slashes from routes. [39329] #38873
  • Correctly map meta keys to field names. [39328] #38786
  • Disable anonymous commenting by default. [39327] #38855
  • Add test case for users/me endpoint that the context param defaults to view. [39293] #38842
  • Allow parent property to be explicitly set to 0 when creating or updating a Post. [39289] #38852
  • Clean up argument and property types. [39250] #38792

Taxonomy

  • Update register_taxonomy hook to use WP_Taxonomy object. [39283] #38765
  • Prevent wp_list_categories() from producing not well-nested output if hide_title_if_empty is true. [39280] #38839, #33460

Text Changes

  • Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy. [39278] #38808
  • Unify permission error messages in wp-admin/users.php. [39258] #38804
  • Unify permission error message in wp-ajax-response.js. [39253] #34521

Themes

  • Prevent unneeded database updates in wp_get_custom_css_post(). [39338] #38866
  • Twenty Seventeen: Make all Codex links in DocBlocks use HTTPS [39300] #38854
  • Twenty Seventeen: Rename the starter content menus to match the menu area names. [39294] #38615
  • Improve a11y and extendability of custom video headers. [39272] #38678
  • Theme starter content: Add reference IDs for most default widgets. [39261] #38615
  • Theme starter content: Refine the content for pages. [39260] #38615
  • Theme starter content: Add more social link items to select from. [39256] #38615
  • Theme starter content: Revamp the credits widget into an about widget. [39255] #38615
  • Remove front page restriction from video header functions. [39240] #38738
  • Customize: Use video-specific labels for buttons in Header Video media control. [39234] #38172

TinyMCE

  • Avoid calling editor.focus() on loading the content in the editor. It may trigger scroll-into-view in the browser. Call the quirks fix in TinyMCE directly. [39334] #38511
  • Fix automatic scroll on page load. [39299] #38511
  • Remove extra space in tooltip. [39284] #38063
  • Tews: fix Firefox issues. [39282] #36434, #38511

Upgrade/Install

Users

Thanks to @adamsilverstein, @afercia, @andy, @azaozz, @boonebgorges, @bradyvercher, @celloexpressions, @chesio, @ChrisWiegman, @danielbachhuber, @davidakennedy, @dd32, @derrickkoo, @dimadin, @flixos90, @folletto, @gitlost, @helen, @iseulde, @jnylen0, @joehoyle, @joemcgill, @johnbillion, @johnpgreen, @jrf, @laurelfulford, @lucasstark, @lukecavanagh, @markoheijnen, @melchoyce, @mikeschroder, @netweb, @ocean90, @odysseygate, @pento, @peterwilsoncc, @Presskopp, @rachelbaker, @ramiy, @rianrietveld, @rmccue, @schlessera, @SergeyBiryukov, @sharkomatic, @sirbrillig, @sstoqnov, @swissspidy, @tharsheblows, @timmyc, @transl8or, @welcher, @westonruter, and @yoavf for their contributions!

#4-7, #week-in-core

Week in Core, October 5 – 18, 2016

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

  • 74 commits
  • 76 contributors
  • 129 tickets created
  • 20 tickets reopened
  • 124 tickets closed

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

Administration

  • Accessible Tags autocomplete: [38797] #33902
  • Better consistency for the Media, Add Plugins, and Add Themes toolbars. [38795] #38010

Build/Test Tools

  • Continue eliminating randomness in tests. [38763] #37371
  • Begin eliminating unnecessary randomness in tests. [38762] #37371
  • Revert [38759]. PHPUnit’s @requires syntax was introduced in PHPUnit 3.7, but the tests for PHP 5.2 use PHPUnit 3.6 because it’s the latest version that supports PHP 5.2. [38761] #38256
  • Make use of PHPUnit’s @requires notation. [38759] #38256
  • HTTP API: Remove an unnecessary duplicate HTTP request in the HTTP tests. [38758] #30017
  • HTTP API: Convert the POST redirect test to use a dataProvider in order for its speed to be more accurately measured. [38757] #38237

Charset

  • Allow _canonical_charset() to handle mixed-case strings. [38809] #38337

Comments

  • When checking comments, returned error object should include HTTP status code. [38783] #36901
  • Abstract die() calls from comment submission routine. [38778] #36901
  • Pass $comment to the comment_max_links_url filter. [38748] #37955
  • Account for the comment_order option in get_page_of_comment(). [38740] #31101
  • Improve check for previous comments for authenticated users in check_comment(). [38738] #28603

Customize

  • Implement customized state persistence with changesets. [38810] #28721, #31089, #30937, #31517, #30028, #23225, #34142, #36485
  • Skip triggering initial click on pages section for available nav menu items if already open. [38807] #36984
  • Move Pages below Custom Links in available nav menu items panel. [38794] #36984
  • Show Pages section first and pre-expanded in list of available nav menu items. [38767] #36984
  • Improve message displayed in widgets panel when there are no widget areas currently displayed in the preview. [38766] #36922
  • Ensure customize_validate_{$setting->id} filters apply on input post values for WP_Customize_Setting subclasses that neglect to apply the filter themselves. [38765] #37638
  • Add workaround for Safari bug causing preview frame to be unscrollable via mousewheel after a refresh. [38742] #38149

Date/Time

Editor

  • Add a role button to the Tags meta box tag cloud links. [38800] #38318
  • Do not send the request for releasing the post lock on unload when post_ID or active_post_lock is missing. [38772] #38271

General

  • Docs: In get_pages() and wp_list_pages(), note that post_status argument can also be an array. [38798] #38136
  • XML-RPC: Re-add a global $wpdb missed in [38768]. [38775] #37699
  • Restore usage of $wpdb, instead of $this->db. [38768] #37699
  • Login: Don’t rely on wp_is_mobile() for functionality. [38739] #33704

Media

  • Media modal: make it possible to reorder images by dragging on devices with both touch screen and mouse support. [38793] #31652
  • Correct the hostname used in the wp_get_attachment_metadata() test. [38760] #36246

Menus

Misc

  • Emoji: Update Emoji CDN filter default for resource hints. [38764] #38724
  • Updates for 4.6. Merge of and to the 4.6 branch.

Networks and Sites

  • Multisite: Maintain switched state in site icon/logo functions. [38786] #38253
  • Multisite: Clarify that get_site_by_path() does not return exact matches. [38781] #38152

Pings/Trackbacks

  • Add new pre_trackback_post action before a trackback is added to a post. [38791] #37007
  • Trackbacks: Allow the error message strings passed to trackback_response() to be translatable. [38741] #38214

Plugins

  • Docs: Improve documentation for install_plugin_install_status(). [38805] #36912
  • Correctly display the current plugin in the plugin editor. [38745] #24122, #17552

Posts, Post Types

  • Docs: Document global variables used by get_the_content(). [38746] #37173

Query

  • Allow the hyphen-prefix-for-search-exclusion feature to be disabled by filter. [38792] #38099

REST API

Rewrite Rules

  • Make sure rewrite rules are not written until wp_loaded has fired [38751] #37892

Role/Capability

  • Disregard the order of capabilities when testing that single site and multisite capability tests match. [38802] #38191
  • Add tests for all user roles that check custom capabilities that do not have any form of handling (eg. in a map_meta_cap filter). [38769] #38191

Security

Taxonomy

  • Cache results of term count queries. [38784] #38295
  • Specify taxonomy when populating cached object terms. [38779] #37291
  • Avoid a fatal error in the_tags() in the event that get_the_term_list() returns a WP_Error. [38777] #37291
  • Better error handling when fetching object terms from cache. [38776] #37291
  • On wp-admin/term.php, don’t show a ‘Back to’ link which links to the current page. [38753] #37573
  • Remove paged argument from referer and add it only if current page is greater than 1. [38752] #38194
  • Don’t drop term order and current page when bulk deleting terms. [38750] #38194
  • Introduce WP_Taxonomy and use it in register_taxonomy() and unregister_taxonomy(). [38747] #36224, #36217
  • Docs: Improvements to register_taxonomy() docblock. [38737] #38007

Themes

  • Improve the inline documentation for the get_*_template() functions by providing examples instead of verbose explanations. [38789] #38249, #37770
  • Do not show an update button if there’s no update package. [38788] #37774
  • Remove paged.php from the theme template hierarchy. [38755] #38162

TinyMCE

  • Remove the calls to getBookmark() and moveToBookmark() in IE. [38808] #38335
  • When editing pages, add body class with the page template, or page-template-default. [38803] #37599
  • Restore the monospace font in textareas in the TinyMCE UI. Make it same as in the Text editor. [38801] #38125
  • Prevent applying Indent and Outdent while an image with a caption is selected. [38796] #38313
  • Prevent iOS Safari from expanding the iframe width beyond the container width. [38782] #38289
  • Update the charmap plugin to the latest dev. version. [38780] #37936
  • Add support for custom dashicon for wp.mce.View.setLoader(). [38774] #37900
  • Update to 4.4.3, changelog: ​https://www.tinymce.com/docs/changelog/#version443-september12016 [38773] #38081, #38245, #37507, #37808, #38000
  • Allow pasting in image captions. Remove blocks and insert “ tags instead, also remove elements that would break the caption like other images, video, audio, etc. [38756] #36211

Upgrade/Install

  • Show correct time of last checked update. [38743] #37554
  • Updates: Remove the ‘Download’ button on the Updates screen. [38736] #36811

Users

  • Use the role name instead of the role display name when fetching the list of users with no role. This avoids false positives when dealing with user roles that, for example, contain spaces in the display name. [38787] #38234

Thanks to @aaroncampbell, @abrightclearweb, @achbed, @adamsilverstein, @afercia, @akibjorklund, @aniketpant, @azaozz, @birgire, @bobbingwide, @boonebgorges, @boonebgorges for review, @celloexpressions, @Cheffheid, @choongsavvi, @choongsavvii, @Chouby, @chriseverson, @clarionwpdeveloper, @dd32, @desrosj, @dlh, @dmsnell, @DrewAPicture, @dshanske, @dungengronovius, @flixos90, @goranseric, @helen, @jamesacero, @jayarjo, @jdgrimes for initial patch, @jeremyfelt, @johnbillion, @jonathanbardo, @jorbin, @karmatosed, @koenschipper, @kraftbj, @lgedeon, @mattking5000, @MattyRob, @michalzuber, @mihai2u, @mikeviele, @morganestes, @mt8.biz, @needle, @ocean90, @pbearne, @pdufour for research, @pento, @peterwilsoncc, @PieWP for initial patch, @procodewp, @rachelbaker, @ryankienstra, @ryankienstra for initial patc, @sayedwp, @SergeyBiryukov, @solarissmoke, @stevenlinx, @stubgo, @sudar, @swissspidy, @tristangemus, @tristangemus for initial patch, @tywayne, @tyxla, @utkarshpatel, @valendesigns, @voldemortensen, @webmandesign, @websupporter, @westonruter, and @WraithKenny for their contributions!

#4-7, #week-in-core

Week in Core, September 7 – 20, 2016

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

  • 66 commits
  • 61 contributors
  • 171 tickets created
  • 15 tickets reopened
  • 106 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

Bootstrap/Load

  • Docs: Use a third-person singular verb for wp_doing_ajax filter added in [38334]. [38607] #25669
  • Bootstrap: Use dirname() when loading class-wp-hook.php from plugin.php. [38589] #37707

Charset

  • Database: Fall back to utf8 when utf8mb4 isn’t supported. [38580] #37982

Customize

  • Add wp-util as a dependency for customize-controls. [38628] #38107
  • Remove IE8 access to customizer to discontinue support. [38627] #38021
  • Let static_front_page section be contextually active based on whether there are any published pages. [38624] #34923, #38013
  • Ensure nav menu items lacking a label use the title from the original object. [38618] #38015
  • CBetter hover/focus state for section titles and available widgets. [38602] #29158
  • Implement previewing of form submissions which use the GET method. [38587] #20714
  • Prevent widget previewing logic from building invalid jQuery selectors when sidebars are registered without a class name in before_widget. [38577] #37993

Database

  • Normalise index names in dbDelta(). [38591] #34874
  • Increase the size of wp_posts.post_password to 255 characters. [38590] #881

Formatting

  • Docs: Use a third-person singular verb for smilies filter added in [38504]. [38608] #35905
  • Update autop() to match wpautop(). [38594] #4857, #4857
  • Docs: Fix an outdated comment. [38593] #4857
  • Add an extra line break before block elements in wpautop(). [38592] #4857
  • Don’t send an HTTP status code in wp_send_json() by default. This avoids clobbering an HTTP status code that may have been set prior to calling this function. [38576] #35666

General

I18N

  • Correct context for Next/Previous strings in get_the_posts_pagination(). [38611] #37952

Media

Menus

Networks and Sites

  • Multisite: Show always domain and path when deleting a site. [38633] #37309
  • Multisite: Use get_networks() in get_main_network_id(). [38632] #37218
  • Multisite: Provide $join as a possible SQL clause to the sites_clauses filter. [38631] #37922
  • Multisite: Add annotations for extended WP_Site properties. [38630] #37932
  • Docs: Synchronize docblocks for WP_Site_Query::__construct() and get_sites() after the changes in [37735], [38008], [38103], and [38336]. [38596] #38039
  • Docs: Correct description for domain and path arguments in WP_Network_Query::__construct(). [38595] #32504

Options, Meta APIs

  • Options: Build out register_setting like register_meta. [38635] #37885

Permalinks

  • Ensure Pending Review Posts permalink posts link to the draft [38572] #37423

Plugins

  • Style the primary action link in the non-js “Installing Plugin” page. [38617] #36430
  • Tests: Use add_filter() when it’s available. [38582] #17817
  • Docs: Fix minor formatting for inline docs in WP_Hook following its introduction in [38571]. [38573] #17817
  • Hooks: Add the new class WP_Hook, and modify hook handling to make use of it. [38571] #17817

Posts, Post Types

REST API

Shortcodes

Taxonomy

  • Docs: Correct the description of {$taxonomy}_term_new_form_tag hook, making it more consistent with other *_form_tag hooks. [38629] #38104
  • Pass taxonomy name to actions in term-relationship CRUD functions. [38621] #38006
  • Query: Eliminate unnecessary wp_list_filter() call in get_queried_object(). [38586] #37962
  • Query: Avoid PHP notice in get_queried_object() when query contains NOT EXISTS tax query. [38585] #37962

Themes

  • Docs: Correct two references to plugins in the $args parameter description for themes_api(). [38623] #37939
  • Docs: Use a third-person singular verb for {$type}_template_hierarchy filter added in [38385]. [38609] #14310
  • Docs: Use a third-person singular verb in the DocBlock summary for get_theme_file_uri(), get_parent_theme_file_uri(), get_theme_file_path(), and get_parent_theme_file_path(), introduced in [38578]. [38606] #18302
  • Docs: Use a third-person singular verb for theme_file_uri, parent_theme_file_uri, theme_file_path, and parent_theme_file_path filters added in [38578]. [38605] #18302
  • Add the non-encoded form of the queried item slug to the template hierarchy when the slug contains non-ASCII characters. [38583] #37655
  • Taxonomy: Revert accidental changes introduced in [38578]. [38579] #18302
  • Improve child theme file inheritance by introducing functions for locating and fetching the URL or path to files within child and parent themes. [38578] #18302

Toolbar

  • Add a ‘View Posts’ link to the toolbar when on the post listing screen. [38634] #34113

Upgrade/Install

  • Docs: Correct a comment and @return entry in WP_Upgrader::create_lock(). [38622] #38089
  • Automatically log users in after installation. [38619] #34084

XML-RPC

  • Avoid a PHP notice in ::pingback_ping() if page title was not found. [38620] #36727
  • Check the minimum number of arguments in ::wp_getUsersBlogs() and ::blogger_getUsersBlogs(). [38600] #29750

Thanks to @aaroncampbell, @adamsilverstein, @afercia, @akibjorklund, @DMing, @BjornW, @boonebgorges, @celloexpressions, @curdin, @danielpietrasik, @dd32, @DrewAPicture, @eliorivero, @enshrined, @ericlewis, @FlorianBrinkmann, @folletto, @georgestephanis, @gma992, @helen, @hideokamoto, @hugobaeta, @ian.edington, @iandunn, @jbrinley, @jeremyfelt, @joehoyle, @joemcgill, @johnbillion, @johnjamesjacoby, @jorbin, @karmatosed, @kitchin, @knutsp, @markshep, @MaximeCulea, @melchoyce, @monikarao, @nacin, @nazgul, @obenland, @ocean90, @paulwilde, @pento, @peterwilsoncc, @RedSand, @rmccue, @rnoakes3rd, @rommelxcastro, @ryankienstra, @ryanplas, @SergeyBiryukov, @skippy, @spacedmonkey, @swissspidy, @Takahashi_Fumiki, @websupporter, @welcher, @westonrute, @westonruter, and @wonderboymusic for their contributions!

#4-7, #week-in-core

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