* Move all tests to a new 'multisite/isUploadSpaceAvailable.php'
* Store original `blog_upload_space` values before the class is loaded.
* Restore these values after each test tear down to avoid pollution.
Commit to testing `is_upload_space_available()` itself by always filtering the amount of space used through `pre_get_space_used`. This allows us to sanely test without worrying about the local environment. In the future, we may be able to remove some of these tests as `get_upload_space_available()` tests are built out and reliable.
See #34037.
Built from https://develop.svn.wordpress.org/trunk@34899
git-svn-id: http://core.svn.wordpress.org/trunk@34864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Move all tests to a new `multisite/getSpaceAllowed.php`
* Store original `blog_upload_space` values before the class is loaded.
* Restore these values after each test tear down to avoid pollution.
* Add a comprehensive set of expectations and results via data provider.
See #34037.
Built from https://develop.svn.wordpress.org/trunk@34898
git-svn-id: http://core.svn.wordpress.org/trunk@34863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@34883
git-svn-id: http://core.svn.wordpress.org/trunk@34848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@34881
git-svn-id: http://core.svn.wordpress.org/trunk@34846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Built from https://develop.svn.wordpress.org/trunk@34880
git-svn-id: http://core.svn.wordpress.org/trunk@34845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Built from https://develop.svn.wordpress.org/trunk@34879
git-svn-id: http://core.svn.wordpress.org/trunk@34844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* '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.
Built from https://develop.svn.wordpress.org/trunk@34875
git-svn-id: http://core.svn.wordpress.org/trunk@34840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@34855
git-svn-id: http://core.svn.wordpress.org/trunk@34820 1a063a9b-81f0-0310-95a4-ce76da25c4cd