Prevents the modal from being displayed off screen, when there is only one
theme available and the menu is collapsed.
Props hardeepasrani for initial patch.
Fixes#36504.
git-svn-id: https://develop.svn.wordpress.org/trunk@37205 602fd350-edb4-49c9-b593-d223f7449a82
Previously, a deleted theme would remain in the list of allowed themes until manually cleared. This uses `WP_Theme::network_disable_theme()`, added in [37202].
Fixes#34182.
git-svn-id: https://develop.svn.wordpress.org/trunk@37203 602fd350-edb4-49c9-b593-d223f7449a82
* `WP_Theme::network_enable_theme()` can be used to enable a theme or array of themes on a network.
* `WP_Theme::network_disable_theme()` can be used to disable a theme or array of themes on a network.
* Use these new methods in the network admin vs direct `update_site_option()` calls.
* Add tests.
Props igmoweb.
Fixes#30594.
git-svn-id: https://develop.svn.wordpress.org/trunk@37202 602fd350-edb4-49c9-b593-d223f7449a82
Moving these functions to `wp-includes/capabilities.php` allows plugins to access more than just `is_super_admin()` and `get_super_admin()` from the front end without including a file via `wp-admin/`. Add an `is_multisite()` check to prevent use of these on single site environments now that they have left `ms.php`..
Props johnjamesjacoby.
Fixes#21788.
git-svn-id: https://develop.svn.wordpress.org/trunk@37200 602fd350-edb4-49c9-b593-d223f7449a82
Improper checking for 'Imagick::ALPHACHANNEL_UNDEFINED' and
'Imagick::ALPHACHANNEL_OPAQUE' caused fatal errors for some users
with Imagick when compiled against ImageMagick < 6.4.6, when these
constants were introduced. Fixes these compatibility checks.
Props gblsm.
Fixes#36501.
git-svn-id: https://develop.svn.wordpress.org/trunk@37192 602fd350-edb4-49c9-b593-d223f7449a82
* Following pattern of `wp_get_mime_types()`, introduce `wp_get_ext_types()` function. New function returns a filtered list of file types with their extensions.
* Use this function in new tests for `wp_ext2type()`.
Props borgesbruno.
Fixes#35987.
git-svn-id: https://develop.svn.wordpress.org/trunk@37189 602fd350-edb4-49c9-b593-d223f7449a82
Prevent tasks from running twice in parallel
if both .svn and .git directories are present.
Add `--ignore-externals` to `svn status`
and replace `git diff --name-only` with `git status --short`.
Merge some duplicate code.
Fixes#36394.
See #35557.
See [36906].
git-svn-id: https://develop.svn.wordpress.org/trunk@37185 602fd350-edb4-49c9-b593-d223f7449a82
`LEFT JOIN` ensures that `NOT EXISTS` queries will not miss posts that have
no taxonomy data whatsoever.
Props swissspidy, crstauf.
Fixes#36343.
git-svn-id: https://develop.svn.wordpress.org/trunk@37184 602fd350-edb4-49c9-b593-d223f7449a82
Also, flip the "Selective Refresh" and "Smart Image Resizing" section and remove script enqueues which are no longer used.
Props joemcgill, melchoyce, ocean90.
Fixes#36173.
git-svn-id: https://develop.svn.wordpress.org/trunk@37175 602fd350-edb4-49c9-b593-d223f7449a82
Also, replace the generic `.alignright` class with a more specific class to avoid styling issues with themes which have padding/margin attached to `.alignright`.
Props azaozz, imath.
Fixes#36461.
git-svn-id: https://develop.svn.wordpress.org/trunk@37174 602fd350-edb4-49c9-b593-d223f7449a82
This disables the concatenation of remaining enqueued scripts once `wp_add_inline_script()` is invoked, which allows us to reliably print these scripts and their before/after inline scripts in the desired order.
Props gitlost, azaozz, swisspidy, ocean90.
Fixes#36392.
git-svn-id: https://develop.svn.wordpress.org/trunk@37171 602fd350-edb4-49c9-b593-d223f7449a82
Theme support for `customize-selective-refresh-widgets` can be added _after_ the logic for registering the settings for incoming widgets that have been changed. This is due to themes adding the theme support in `after_setup_theme` which is also the action where `WP_Customize_Widgets::register_settings()` is called. If these both happen at priority 10, which one is called first depends on which one was added first. The other issue is that at the time that `WP_Customize_Widgets::register_settings()` is called at `after_setup_theme`, it is called before `widgets_init` and thus no widgets are yet registered. This means that any settings registered at this point will always have a `refresh` transport even if the theme supports `customize-selective-refresh-widgets`, since the `WP_Widget` instance is not visible yet to see if it supports selective refresh.
The fix: Defer `WP_Customize_Widgets::register_settings()` from `after_setup_theme` to `widgets_init` at priority 95 when the widget objects have all been registered. Also, ensure that the preview filter for `sidebars_widgets` is added before the sidebars are iterated for adding the controls.
Props westonruter.
Fixes#36389.
git-svn-id: https://develop.svn.wordpress.org/trunk@37166 602fd350-edb4-49c9-b593-d223f7449a82
Percent signs are reserved characters in URIs. As such, it was impossible for
plugins to route requests to trashed posts, as happens in bbPress. The new
`__trashed` suffix should be sufficiently unique.
Also adds a test that demonstrates that the `__trashed` suffix can be
appended to slugs that contain the suffix somewhere other than the end of
the string.
Props netweb, ericlewis.
Fixes#11863.
git-svn-id: https://develop.svn.wordpress.org/trunk@37165 602fd350-edb4-49c9-b593-d223f7449a82
We goofed, and parameters accessed through the REST API's methods
were slashed (inconsistently, even). This unslashes the data, so
you get the un-messed-with data that was sent.
Props joehoyle.
Fixes#36419.
git-svn-id: https://develop.svn.wordpress.org/trunk@37163 602fd350-edb4-49c9-b593-d223f7449a82
Replace the use of a `.screen-reader-text` element with an `aria-label` attribute to make the text easier to translate.
Props dimadin, ocean90.
See #35001.
Fixes#36410.
git-svn-id: https://develop.svn.wordpress.org/trunk@37162 602fd350-edb4-49c9-b593-d223f7449a82
You know what's wrong with the Moderate Comment Screen? It doesn't win anymore. Well, I'm going make the Moderate Comment screen win. It's going to win by showing the urls that are linked to from every anchor. It's going to win by having those urls be a lighter shade of gray than the surrounding text. Spammy links aren't going to be able to hide in commas. Spammy links aren't going to win. The Moderate Comment Screen is going to win and we are going to make the Moderate Comment Screen Great Again.
Fixes#36380
Props rachelbaker, mikeschroder, adamsilverstein, boonebgorges, melchoyce, ocean90, jorbin, pento
git-svn-id: https://develop.svn.wordpress.org/trunk@37161 602fd350-edb4-49c9-b593-d223f7449a82
Adds `aria-describedby` attributes to the modal form fields after it
was partly restored in [37154].
Fixes#33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37160 602fd350-edb4-49c9-b593-d223f7449a82
- Restore the bottom half of the modal.
- Make it always expanded and remove the toggle. It is used as advanced link options now, no need to have simple mode.
Props iseulde, adamsilverstein, azaozz.
Fixes#36359.
git-svn-id: https://develop.svn.wordpress.org/trunk@37154 602fd350-edb4-49c9-b593-d223f7449a82
Improves alignment with nav menus in the Customizer, fixing regression introduced in [36908].
See #35273.
Props sidati, westonruter.
Fixes#36353.
git-svn-id: https://develop.svn.wordpress.org/trunk@37153 602fd350-edb4-49c9-b593-d223f7449a82