Week in Core, Feb. 23-Mar 1 2016

Welcome back the latest issue of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., covering changes [36672-36800]. Here are the highlights:

  • 128 commits
  • 52 contributors
  • 115 tickets created
  • 19 tickets reopened
  • 135 tickets closed

Ticketticket Created for both bug reports and feature development on the bug tracker. numbers based on trac timeline for the period above.

Note: If you want to help write the next WordPress Core Weekly summary, check out the schedule over at make/docs and get in touch in the #core-weekly-update SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel.

Code Changes

AccessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)

  • improve accessibility of the Dashboard “Recent Comments” widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user.. [36683] #35392

Comments

  • Avoid extra AJAX requests when undoing Spam or TrashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days. actions. [36774] #35904
  • Add missing placeholder for printf() after [36683]. [36767] #35392

Customize

  • Use selective refresh to preview changes to site title and tagline in core themes. Fixes #33738. [36797] #27355, #33738
  • Fix PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher notice when calling WP_Customize_Control::json() inside content_template() method. See #29572. [36776] #35926, #29572
  • Allow button_labels to be overridden in $args passed to WP_Customize_Media_Control and WP_Customize_Image_Control. [36769] #33755, #35542
  • Introduce Logo support for themes. See #33755. [36698] #33755
  • Allow controls to be registered without any associated settings. Fixes #35926. [36689] #27355, #35926
  • Introduce customize_nav_menu_searched_items filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. for modifying results of nav menu item searches. [36676] #34947
  • Fix nav menu item search after Backbone update. [36675] #34350

Docs

  • Correct filter reference in pre_get_avatar filter description. [36800] #36031
  • Correct _n_noop() and _nx_noop() descriptions to use third-person singular verbs. [36765] #35961
  • Improve a variety of DocBlocks in wp-includes/deprecated.php. [36763] #32246
  • Add missing parameter and return descriptions to the DocBlockdocblock (phpdoc, xref, inline docs) for the deprecated default_topic_count_text(). [36760] #32246
  • Add missing parameter and return documentation to the DocBlock for the deprecated _search_terms_tidy(). [36759] #32246
  • Add missing documentation for the &$post parameter in the DocBlock for the deprecated _get_post_ancestors(). [36758] #32246
  • Add missing documentation for the $fp parameter to the DocBlock for the deprecated debug_fclose(). [36757] #32246
  • Add missing parameter documentation to the DocBlock for the deprecated debug_fwrite(). [36756] #32246
  • Add missing parameter and return documentation to the DocBlock for the deprecated debug_fopen(). [36755] #32246
  • Add missing documentation for the $wp_admin_bar parameter in the DocBlock for the deprecated wp_admin_bar_dashboard_view_site_menu(). [36754] #32246
  • Add missing documentation for the $title parameter in the DocBlock for the deprecated parent_post_rel_link(). [36753] #32246
  • Remove a duplicate parameter notation in the DocBlock for the deprecated the_editor() function. [36748] #32246
  • Update the @deprecated tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) comment for wp-includes/embed-template.php to reference the correct file path following [36693]. [36746] #34561
  • Add a missing summary, @access tag, and parameter documentation to the DocBlock for WP_Customize_Filter_Setting::update(). [36745] #32246
  • Improve inline docsinline docs (phpdoc, docblock, xref) for WP_Dependencies, WP_Styles, and WP_Scripts. [36744] #35964
  • Fix two typos in return descriptions for WP_Theme private usort() methods. [36739] #32246
  • Add missing parameter and return notations in the DocBlock for WP_Theme::_name_sort_i18n(). [36738] #32246
  • Add missing parameter and return notations in the DocBlock for WP_Theme::_name_sort(). [36737] #32246
  • Add a missing description for the &$themes parameter in the DocBlock for WP_Theme::sort_by_name(). [36736] #32246
  • Correctly document parameters in the hook doc for the get_meta_sql filter as individual parameters rather than an array. [36735] #35962
  • Add missing parameter and return descriptions to the DocBlock for WP_Theme::__isset(). [36734] #32246
  • Add missing @since tags to WP_Styles properties/methods. [36733] #35964
  • In WP_Dependencies add a changelog entry for the $group parameter. [36732] #35964
  • In WP_Dependencies add a changelog entry to methods which were moved from WP_Scripts to WP_Dependencies. [36731] #35964
  • Document properties of WP_Scripts and add missing @since tags. [36730] #35964
  • Use correct @since tags for script enqueue functions. See #35964. [36729] #35964
  • Add missing @param and @return notations to the DocBlock for WP_Feed_Cache_Transient::save(). [36728] #32246
  • Use the correct variable name for the $post_ID parameter in the DocBlock for wp_add_trashed_suffix_to_post_name_for_trashed_posts(). [36727] #11863, #32246
  • Standardize summaries for two new internal functions used to handle suffixing trashed posts […] and a notation of private access to each. [36726] #11863, #32246
  • Add some missing @param notations to various DocBlocks in wp-includes/ms-deprecated.php. [36725] #32246
  • Add a missing @param entry for the $user_login parameter in the DocBlock for the deprecated is_site_admin() function. [36724] #32246
  • Add a missing @param entry for the $len parameter in the DocBlock for the deprecated generate_random_password() function. [36723] #32246
  • Correct the possible return types for WP_Dependencies::query(). [36713] #32246
  • Improve the description of the get_object_taxonomies() function. Uncertainty has no place in documentation. [36712] #32246
  • Use a third-person singular verb in the DocBlock summary for wp_add_inline_script(), introduced in [36633]. [36707] #14853, #32246
  • Standardize DocBlocks for two new WP_Scripts methods, add_inline_script() and print_inline_script(), introduced in [36633]. [36706] #14853, #32246
  • Make a few syntactical improvements to the DocBlock for _wp_get_current_user(), introduced in [36651]. [36705] #19615, #32246
  • Add an inline @see tag to link up the plugins_loaded hook in the description for the customize_loaded_components filter. [36687] #32246

Editor

  • Remove an unused JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. variable so the JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. lint tests pass. [36751] #33301

Embeds

  • Use a more accessible way to initially hide the iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser.. This [36708] #35894
  • Update embed template paths and messages in tests, missed in [36693]. [36694] #34561
  • Introduce embed templates into the template hierarchy via theme-compat. [36693] #34561

External Libraries

Formatting

  • In sanitize_title_with_dashes(), convert `,&ndash, and&mdash` HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. entities to hyphens on save. [36775] #31790

Forms

  • Swap “Submit” button label for “Enter” on password-protected pages. [36685] #35042

HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.

  • Add the missing 1xx HTTP response codes as constants of the WP_Http class, and add tests to ensure all available response codes are covered. [36749] #36294

I18Ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

  • Move the aria-label text in comment_form() to a separate string for easier translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization.. Add translator comments. [36794] #36014
  • Remove HTML tags from translatable string in wp-admin/includes/dashboard.php. [36793] #36013
  • Remove ` tags from translatable string in wp-admin/network/site-new.php`. [36773] #35994
  • Remove ` tag from translatable string in wp-includes/class-wp-customize-manager.php`. [36772] #35992
  • Remove ` tag from translatable string in wp-admin/network/site-new.php`. [36771] #35989
  • Remove HTML tags from translatable strings in wp-admin/network/themes.php. [36770] #35988
  • Fix placeholders and add translator comments after [36695]. [36697] #35705
  • Move the “Caution:” prefix to a separate string in wp-admin/includes/network.php. [36690] #35674

I18N Tools

  • In StringExtractor don’t strip slashes from URLs. [36781] #36015
  • Sync makepot.php with i18n.svn. Changes: https://i18n.trac.wordpress.org/log/tools/trunk/makepot.php?rev=40331&stop_rev=24749 [36752] #34910, #34749

L10nL10n Localization, or the act of translating code into one's own language. Also see internationalization. Often written with an uppercase L so it is not confused with the capital letter i or the numeral 1. WordPress has a capable and dynamic group of polyglots who take WordPress to more than 70 different locales.

Link Manager

  • Fix usage of translation functions after [35998].

Mail

Media

  • JSHint for wp-playlist.js. File was added to the watchlist in [36780]. [36783] #35984
  • Add support for minified versions of wp-playlist.js, wp-mediaelement.js and wp-mediaelement.css. [36780] #35984
  • Correct “Exception” typo in WP_Image_Editor_Imagick::strip_meta(). Exceptions are caught better if they’re not excpeted. [36742] #33642
  • Optimize Imagick settings for quality and filesize. [36700] #33642, #30402, #28634
  • Fix broken delete/trash functionality in the library after [36546]. [36681] #34350

Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site

  • Provide an “Edit user” link after adding a new user [36695] #35705
  • Use “Site Address (URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org)” in site-new.php. [36684] #35934
  • Show the main site’s domain and path in site-info.php [36682] #35632
  • Switch to a usermeta key for email confirmation. [36679] #23358

Posts

  • Add tests for the cascading fallback behavior of several ‘public’-related arguments in register_post_type(). [36768] #35985
  • Rename the $args parameter in get_post_types_by_support() to $feature for better self-documentation. [36704] #34010, #32246

REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.

  • Revert r36696. This broke embeds. Needs a better solution to also make sure all queries from the REST API aren’t broken. [36699] #35907
  • Permit sticky posts to affect the query in REST_REQUEST. Needed for https://github.com/WP-API/WP-API/issues/2210 [36696] #35907
  • Fix error in Request tests. [36678] #
  • Use WP_REST_Request::from_url() when embedding. [36674] #35803
  • Add WP_REST_Request::from_url(). Allows converting a REST URL into a Request object. [36673] #35803

Rewrite Rules

  • Ensure url_to_postid() operates as expected when it’s used in the context of another site within a Multisite networknetwork (versus site, blog) that uses mixed URL schemes. [36750] #35531

Spelling

  • Standardize on “front end”/”back end” (noun) and “front-end”/”back-end” (adjective). [36709] #34887

TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies.

  • Improve ‘offset’ calculation when querying for hierarchical terms. [36691] #8832, #35935

Tests

  • Add unit tests for number_format_i18n(). [36795] #36029
  • Use markTestSkipped() to skip a multisite-only test. [36791] #36016
  • Ensure that user __unset() tests make assertions. [36790] #36016
  • Remove erroneous return in date_query test. Introduced in [34989]. [36789] #36016
  • mbstring.func_overload test should be skipped properly. This avoids PHPUnit notices related to “risky” tests. [36788] #36016
  • Remove tests related to wp_*_post_meta() functions. [36787] #21767, #36016
  • Make sure that test_wp_mail_break_it() makes an assertion. Let’s make what is possibly the oddest test in WordPress even a bit odder. See #36016. [36786] #36016
  • setExpectedDeprecated and setExpectedIncorrectUsage tests should make assertions. Introduced in [31306]. [36785] #36016
  • More specific test for a bad callback in WP_Customize_Partial test. [36784] #27355, #36016
  • Remove test related to deprecated CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. export_preview_data() method. The method was gutted and deprecated in [36586], so there’s no reason to keep the test. [36782] #36016
  • Put an assertion in test_nonexistent_array() test. [36779] #36016
  • Make sure an assertion takes place in ‘visited’ test for get_category_parents(). [36778] #36016
  • Ad a unit testunit test Code written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression. for bool_from_yn(). [36764] #35972
  • Don’t modify global state before checking whether to skip get_locale() tests. Introduced in [36740]. [36741] #35965
  • Add tests for get_locale(). [36740] #35965
  • Remove (or at least reduce) the need to reset common $_SERVER variables before assertions or between tests, by introducing a method which automatically resets them during test setup. [36721] #35954
  • Correct some more tests which were using example.org instead of WP_TESTS_DOMAIN. [36717] #34000
  • Move some assertions in HTTPSHTTPS HTTPS is an acronym for Hyper Text Transfer Protocol Secure. HTTPS is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. This is especially helpful for protecting sensitive data like banking information. related tests, so failures that occur before the environment reset don’t result in a contaminated test environment. [36711] #35954
  • Unify the initialisation of $_SERVER variables during test bootstrap. This abstracts the (re-)initialisation into a function that can be used inside of tests too, before assertions are performed. [36715] #35954

TinyMCE

  • fix the close button position in the paste in text mode warning. [36799] #36035
  • update to 4.3.6. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. [36798] #36035
  • remove the iframe expansion CSSCSS Cascading Style Sheets. fix for iOSiOS The operating system used on iPhones and iPads. Safari. Not needed in iOS 9.x. Fixes #35939. [36692] #35939

TinyMCE inline link dialog

  • Fix running wpLink without tinymce.js and the TinyMCE pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party without wplink.js. Do not show the Advanced button in the inline link dialog when wpLink is not loaded. [36777] #33301
  • Fix in IE (again). Remove setting/getting placeholders, pass the link node instead. In the inline dialog: when the selected text looks like URL or email, pre-fill the URL field with it (same as in the modal). Fix setting the name of the main button in the modal: Add Link or Update. In the modal when clicking Update remove the link if the URL field is empty. That matches the inline dialog behaviour. Otherwise the modal remains open, nothing happens when clicking the Update button there. [36747] #33301
  • Fix applying the changes when pressing the Enter key in Firefox. [36743] #33301
  • Make sure the inline dialog is not showing under the advanced modal. Fix checking if the link node contains text. Fix undo levels so all actions can be undone and redone. [36716] #33301
  • Reset the inline dialog when canceling the advanced modal. If there is a link it should be on the first stage: follow/preview link. Fix tabbing in the inline edit dialog. [36703] #33301
  • Remove the bottom half of the (old) modal and add autocomplete on the URL field. Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there. Fix in IE10 and 11. Fix (most?) remaining edge cases. Fix focusing the inline dialog, the modal and the editor. [36677] #33301

TinyMCE textpattern

  • Horizontal line is translated, Horizontal rule is not. [36762] #33300
  • Add description of the new patterns to the Shortcuts help modal. Fix the layout a bit and make the patterns in two columns. Disable the textpatterns plugin in IE < 9. [36761] #33300
  • fix error when inserting “ if the new paragraph is not direct child of the body. [36720] #33300
  • Use editor.once instead of storing into variables. Add pattern for hr. [36719] #33300

Upgrade

  • Bump db version for upgrade_450() in upgrade_all(). [36686] #23358

Props

Thanks to @adamsilverstein, @afercia, @Ankit, @azaozz, @bhubbard, @boonebgorges, @borgesbruno, @celloexpressions, @chetanchauhan, @codex-m, @danielbachhuber, @dnewton, @DrewAPicture, @eliorivero, @enejb, @flixos90, @Gupta, @henrywright, @imath, @iseulde, @jeherve, @jeremyfelt, @joemcgill, @johnbillion, @jorbin, @K, @karmatosed, @kovshenin, @kwight, @maweder, @melchoyce, @MikeHansenMe, @mikeschroder, @obenland, @obrienlabs, @ocean90, @pbearne, @pento, @polevaultweb, @rachelbaker, @ramiy, @realloc, @rmccue, @ryan, @samhotchkiss, @SergeyBiryukov, @sudar, @swissspidy, @thewanderingbrit, @TimothyBlynJacobs, @westonruter, and @zinigor for their contributions!

#4-5, #week-in-core