Fixes warning related to a non-array argument for `array_merge()` in `WP_Customize_Widgets::customize_register()`.
See [37166].
See #36389.
Fixes#36660.
git-svn-id: https://develop.svn.wordpress.org/trunk@37352 602fd350-edb4-49c9-b593-d223f7449a82
Adds parity with setting instance being passed as second argument to `customize_sanitize_{$id}` and `customize_sanitize_js_{$id}`. Allows the actual ID of the (multidimensional) setting value being filtered to be inspected.
Props celloexpressions, westonruter.
Fixes#36452.
git-svn-id: https://develop.svn.wordpress.org/trunk@37350 602fd350-edb4-49c9-b593-d223f7449a82
Also adds a missing return description for `get_comment_author_email_link()`.
Props flixos90 for the initial patch.
Fixes#36571.
git-svn-id: https://develop.svn.wordpress.org/trunk@37349 602fd350-edb4-49c9-b593-d223f7449a82
Pressing Esc collapses any expanded widget or nav menu item controls, or any control that implements the expanding interface. Also improves alignment between `WidgetControl` and `MenuItemControl`, adding the `expanded` state and associated `expand`/`collapse` methods to nav menu items.
Props purcebr, celloexpressions, westonruter.
Fixes#22237.
git-svn-id: https://develop.svn.wordpress.org/trunk@37347 602fd350-edb4-49c9-b593-d223f7449a82
Also disables Save & Publish button while save request is open. After the save request completes, any settings changed during the request can then be saved via an additional click to the button.
Props chandrapatel, westonruter.
Fixes#32941.
git-svn-id: https://develop.svn.wordpress.org/trunk@37346 602fd350-edb4-49c9-b593-d223f7449a82
`get_page_uri()` can now be called without an argument, which will return the page URI for the current post in the loop.
Props pollett.
Fixes#26284.
git-svn-id: https://develop.svn.wordpress.org/trunk@37345 602fd350-edb4-49c9-b593-d223f7449a82
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.
Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.
See #32246.
git-svn-id: https://develop.svn.wordpress.org/trunk@37342 602fd350-edb4-49c9-b593-d223f7449a82
To improve accessibility on touch devices increase the size of the button in the collapsed view from 24×28 to 44×45 pixel.
Props celloexpressions.
Fixes#36093.
git-svn-id: https://develop.svn.wordpress.org/trunk@37341 602fd350-edb4-49c9-b593-d223f7449a82
Caching of node modules was added in [37058]. `npm prune` removes extraneous packages so the cache contains only current modules.
Props netweb.
Fixes#36490.
git-svn-id: https://develop.svn.wordpress.org/trunk@37340 602fd350-edb4-49c9-b593-d223f7449a82
`wp_register_plugin_realpath()` calls `dirname( $file );` to remove the basename. The basename must be included in the argument or the symlinked directory won't be registered.
Props andy.
Fixes#36709.
git-svn-id: https://develop.svn.wordpress.org/trunk@37331 602fd350-edb4-49c9-b593-d223f7449a82
Allows widgets to be registered which rely on dependency injection. Also will allow for new widget types to be created dynamically (e.g. a Recent Posts widget for each registered post type).
See #35990.
Props mdwheele, PeterRKnight, westonruter.
Fixes#28216.
git-svn-id: https://develop.svn.wordpress.org/trunk@37329 602fd350-edb4-49c9-b593-d223f7449a82
This allows a plugin to short circuit `get_blogs_of_user()` in cases where the default behavior of the function is unnecessary or slow. (e.g. A user is a member of thousands of sites.)
Props jsternberg.
See #31746, Fixes#36707.
git-svn-id: https://develop.svn.wordpress.org/trunk@37326 602fd350-edb4-49c9-b593-d223f7449a82
`WP_Query` discards most non-array date values ('year', 'monthnum', etc) by
casting to integer. Since [25138], the 'm' parameter has been handled
as a string; see #24884. However, the string-handling introduced in [25138]
blindly attempted to handle arrays and other non-scalar types as strings,
resulting in PHP notices and invalid MySQL syntax.
Props vortfu.
Fixes#36718.
git-svn-id: https://develop.svn.wordpress.org/trunk@37324 602fd350-edb4-49c9-b593-d223f7449a82
The issues occur in themes that register sidebars that reference a single format placeholder (`%1$s` and `%2$s`) multiple times, such as in the `id` and `class` attributes for `$before_widget`.
Props martin.krcho, westonruter.
Fixes#36473.
git-svn-id: https://develop.svn.wordpress.org/trunk@37322 602fd350-edb4-49c9-b593-d223f7449a82
Setting the background color on `body` is more flexible than on the `html` element. This patch assigns the background color to `body` instead of the `html` element.
Fixes#35314
git-svn-id: https://develop.svn.wordpress.org/trunk@37321 602fd350-edb4-49c9-b593-d223f7449a82
The tests for `is_blog_user()` and `is_user_member_of_blog()` should be refactored. Until then, we can shave several seconds from the test time by avoiding unnecessary loops of the same tests.
See #36566.
git-svn-id: https://develop.svn.wordpress.org/trunk@37318 602fd350-edb4-49c9-b593-d223f7449a82
`is_user_spammy()` falls back to the current user if one is not provided. There is no current user during authentication, so the result is always `false`. Pass a user to fill the void.
Adds tests for `wp_authenticate_spam_check()`.
Props websupporter.
Fixes#36546.
git-svn-id: https://develop.svn.wordpress.org/trunk@37316 602fd350-edb4-49c9-b593-d223f7449a82
The “Name” column of the Users WP List Table is not sortable because this column displays a concatenation of two optional values, `first_name` and `last_name`. Even if WP_User_Query supported ordering queries in this manner, the resulting sequence would be chaotic.
Fixes#28064.
Props jesin, and rachelbaker.
git-svn-id: https://develop.svn.wordpress.org/trunk@37314 602fd350-edb4-49c9-b593-d223f7449a82
Allow the adding of post-thumbnail support for one or more post_types without unsetting any previously added post_types. This matches the behavior of other uses of `add_theme_support()` and the expectations of a function with a prefix of “add”.
To unset post-thumbnail support use `remove_theme_support()` instead.
Fixes#22080
Props alexkingorg, jmichaelward, and flixos90.
git-svn-id: https://develop.svn.wordpress.org/trunk@37308 602fd350-edb4-49c9-b593-d223f7449a82
Warns users that have added a new Comment or began editing an existing without saving their changes, before they press the “update” button which would wipe out their comment changes.
Fixes#32818.
Props polevaultweb.
git-svn-id: https://develop.svn.wordpress.org/trunk@37303 602fd350-edb4-49c9-b593-d223f7449a82