These additions are based on an audit and recommendations by the Accessibility team. #a11y'all
Props afercia.
Fixes#32147.
git-svn-id: https://develop.svn.wordpress.org/trunk@34891 602fd350-edb4-49c9-b593-d223f7449a82
In 4.3 the widget controls were fully initialized up front along with the sidebar controls. The sidebar control depended (unnecessarily) on the widget control to ensure that `wp.customize.Widgets.savedWidgetIds` was defined. So after [34563] there could be a situation where the widgets are added/removed from a sidebar before their controls are initialized (if the sidebar section is never expanded), resulting in an error attempting to get a property off of an undefined value. So this change does the right thing and defines `savedWidgetIds` up front.
Also changes the `savedWidgetIds` variable type from an array to an object, to match how it is used as a dictionary lookup.
See #33901.
git-svn-id: https://develop.svn.wordpress.org/trunk@34883 602fd350-edb4-49c9-b593-d223f7449a82
Defer to default styling provided by the theme (and browser) in `wp-activate.php` and remove the `font-family` and `color` from the provided internal stylesheet.
Previously, [17327] and [18406].
Fixes#34145.
git-svn-id: https://develop.svn.wordpress.org/trunk@34882 602fd350-edb4-49c9-b593-d223f7449a82
Up until now password protected posts would only get a identifying class when
the password was still required. This adds a class for the case when that
requirement has been met.
For the other visibility types we already have `status-publish`
and `status-private`.
Props mdgl, F4rkie, wonderboymusic for initial patches.
Fixes#21899.
git-svn-id: https://develop.svn.wordpress.org/trunk@34881 602fd350-edb4-49c9-b593-d223f7449a82
WordPress.org was taken down due to as Otto42 describes:
The previous version of this function added the query piece for the meta key = blog_id.capabilities, regardless of whether or not a role was requested. This limits the users returned to those with some defined role on this particular multisite instance.
See #22212
git-svn-id: https://develop.svn.wordpress.org/trunk@34880 602fd350-edb4-49c9-b593-d223f7449a82
The ajax delete comment tests are intermittently failing. Many of the assertions make it hard to tell why they are failing. This adds a message to one of those assertions that contains some info on what is being asserted with the goal that it helps developers understand why the failure is failing.
See #33968
git-svn-id: https://develop.svn.wordpress.org/trunk@34879 602fd350-edb4-49c9-b593-d223f7449a82
* 'role' now accepts an array or comma-separated list of role names. When passing multiple values for 'role', `WP_User_Query` will only match users that have all of the specified roles.
* 'role__in' accepts an array of role names, and allow the filtering of matched users to those with at least one of the specified roles.
* 'role__not_in' accepts an array of role names, and allows the filtering of matched users to those who have none of the specified roles.
Props swissspidy, mordauk, barrykooij, sirbrillig.
Fixes#22212.
git-svn-id: https://develop.svn.wordpress.org/trunk@34875 602fd350-edb4-49c9-b593-d223f7449a82
The static 'comment-form' class was originally added to `comment_form()` in [24525]. This new argument should provide needed flexibility in styling the comment form further.
Props flixos90.
Fixes#34170. See #23851.
git-svn-id: https://develop.svn.wordpress.org/trunk@34871 602fd350-edb4-49c9-b593-d223f7449a82
New functions in `media.php`:
* `wp_get_attachment_image_srcset_array()` - Returns an array of image candidate string data used to build a `srcset` value for an attachment given an `$attachement_id` and `$size`.
* `wp_get_attachment_image_srcset()` - Returns the `srcset` value for an attachment given an `$attachement_id` and `$size`.
* `wp_get_attachment_image_sizes()` - Returns the `sizes` value for an attachment given an `$attachement_id` and `$size` and optional arguments used to alter its output.
* `wp_make_content_images_responsive()` - A display filter for adding `srcset` and `sizes` to images embedded in content.
* `wp_img_add_srcset_and_sizes()` - A utility function used by `wp_make_content_images_responsive()` to add `srcset` and `sizes` to a single `<img>` element.
Modifies existing core functions:
* Modify `wp_get_attachment_image()` so the HTML returned for an image includes `srcset` and `sizes`.
* Modify `get_media_embedded_in_content()` (sup, 3.6 leftover) by adding `<img>` to the list of accepted tags that can be matched in content. This is used in `wp_make_content_images_responsive()` to find all of the images embedded in content before passing them off to `wp_img_add_srcset_and_sizes()`.
Tests:
* Add a new factory method to `WP_UnitTest_Factory_For_Attachment` named `create_upload_object()`
* Adds unit tests
* Updates unit tests
Props joemcgill, tevko, jaspermdegroot, mdmcginn, barryceelen, peterwilsoncc, fsylum, wonderboymusic, chriscoyier, benjaminpick, jrfnl, #12kingkool68, janhenckens, ryanmarkel, side777, ryelle, wturrell, micahmills, mattbagwell, coliff, DrewAPicture.
See #33641.
git-svn-id: https://develop.svn.wordpress.org/trunk@34855 602fd350-edb4-49c9-b593-d223f7449a82
The function encapsulates the existing `subdirectory_reserved_names` filter and reduces the maintenance burden of keeping the value of (currently) two instances of the same hook in sync.
See #33615.
git-svn-id: https://develop.svn.wordpress.org/trunk@34854 602fd350-edb4-49c9-b593-d223f7449a82
A number of the HTTP external tests can inconstantly fail. As the HTTP API is one that doesn't change often, this failure creates noise. With the goal of increasing the signal from the unit tests, these tests are now skipped if they timeout. A notice is added when running the external http tests so that the developer knows what skipped tests may mean here.
See #33968
git-svn-id: https://develop.svn.wordpress.org/trunk@34848 602fd350-edb4-49c9-b593-d223f7449a82