This requires only `wp-admin/includes/user.php` for `get_editable_roles()`, instead of `wp-admin/includes/admin.php`.
Follow-up to [43589].
Props johnwatkins0.
Fixes#49450.
git-svn-id: https://develop.svn.wordpress.org/trunk@47299 602fd350-edb4-49c9-b593-d223f7449a82
Although the file is already included via the `::insert_attachment()` method, this addresses an inconsistency and corrects a misleading comment.
It also reduces the possibility of a future error in case `::insert_attachment()` is no longer called earlier in `::create_item()` at some point.
Follow-up to [43850] and [44206].
Props luisrivera.
Fixes#49449.
git-svn-id: https://develop.svn.wordpress.org/trunk@47296 602fd350-edb4-49c9-b593-d223f7449a82
Other inputs are already restored to their previous values in that case.
Props Girishpanchal, nilamacharya, JoshuaWold, welcher, SergeyBiryukov.
Fixes#43031.
git-svn-id: https://develop.svn.wordpress.org/trunk@47294 602fd350-edb4-49c9-b593-d223f7449a82
This allow for using these functions outside of the loop.
Props donmhico, garrett-eclipse, Hinjiriyo, imath.
Fixes#48772.
git-svn-id: https://develop.svn.wordpress.org/trunk@47276 602fd350-edb4-49c9-b593-d223f7449a82
When an attempt is made to update an active plugin automatically, there is the potential currently for two negative scenarios:
- The plugin can be deactivated if the Plugins admin screen is loaded when the plugin update is incomplete, causing a PHP error.
- The WSOD protection could be triggered, sending a false alarm email to the site administrator.
By enabling maintenance mode before an active plugin update is attempted, these scenarios can be avoided.
This change implements the same approach as the `Theme_Upgrader` class of using the `upgrader_pre_install` and `upgrader_post_install` hooks to toggle maintenance mode.
Props desrosj, SergeyBiryukov.
Fixes#49400.
git-svn-id: https://develop.svn.wordpress.org/trunk@47275 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the pullquote color setting by moving `color` from `blockquote p` to `blockquote`. Also adds the border-left to the front-end stylesheet to match the editor. Also adds styles for rtl pullquote.
Props kokkieh, desrosj, mukesh27, khushbu19, disillusia, aliveic, abrightclearweb, SergeyBiryukov.
Fixes#47019.
git-svn-id: https://develop.svn.wordpress.org/trunk@47273 602fd350-edb4-49c9-b593-d223f7449a82
The string refers to the post type name specifically, not to a generic term to identify a publication on WordPress.
Props audrasjb, jdy68.
Fixes#49306.
git-svn-id: https://develop.svn.wordpress.org/trunk@47272 602fd350-edb4-49c9-b593-d223f7449a82
This commit makes sure that when uploading a plugin or theme file, the Install Now button is correctly aligned, and the button does not drops to the next line if filename is long.
Props seedsca, SergeyBiryukov, audrasjb.
Fixes#48859.
git-svn-id: https://develop.svn.wordpress.org/trunk@47271 602fd350-edb4-49c9-b593-d223f7449a82
* `erase_others_personal_data`
* `export_others_personal_data`
* `manage_privacy_options`
Previously mapped to `manage_options` or `manage_network` (on Multisite), these are now added to the Administrator role separately.
Additionally, `manage_privacy_options` is added to the Editor role.
Props garrett-eclipse, xkon, pbiron, desrosj, johnbillion, flixos90, juliobox, lakenh, Ov3rfly, ianatkins.
Fixes#44176.
git-svn-id: https://develop.svn.wordpress.org/trunk@47269 602fd350-edb4-49c9-b593-d223f7449a82
The result is still escaped with `esc_url_raw()` for retrieval, and with `esc_url()` for display in `the_header_video_url()`.
Props dlh, Tkama.
Fixes#40044.
git-svn-id: https://develop.svn.wordpress.org/trunk@47267 602fd350-edb4-49c9-b593-d223f7449a82
Implementation of bottom padding in overflow content differs across browsers. See https://github.com/w3c/csswg-drafts/issues/129. To make bottom spacing consistent across browsers there's the need for an alternate CSS method.
- uses a CSS `after` pseudo element or simply a bottom margin to reserve some bottom spacing
- removes a couple leftovers from [40428]
- fixes an annoying visual glitch where the media modal content is visible behind the bottom toolbar border
Props sabernhardt, afercia.
See #40152.
Fixes#48378.
git-svn-id: https://develop.svn.wordpress.org/trunk@47266 602fd350-edb4-49c9-b593-d223f7449a82
register_rest_field can be used to add properties to a schema, but no mechanism existed to alter existing properties like "content".
Running the schema through this filter lets plugins append additional sub-properties to existing schema definitions.
Props luisherranz, TimothyBlynJacobs, swissspidy, westonruter, kadamwhite.
Fixes#47779.
git-svn-id: https://develop.svn.wordpress.org/trunk@47265 602fd350-edb4-49c9-b593-d223f7449a82
The currently active widget controls should always be displayed on top.
Props audrasjb, fervillz, rinkuyadav999, jaydeep23290, ashokrd2013, melchoyce, pento, westonruter, SergeyBiryukov.
Fixes#42001.
git-svn-id: https://develop.svn.wordpress.org/trunk@47263 602fd350-edb4-49c9-b593-d223f7449a82
Rule out groups of API endpoints by simple namespace string comparison to reduce the number of regex checks necessary when matching a route.
Props TimothyBlynJacobs.
Fixes#48530.
git-svn-id: https://develop.svn.wordpress.org/trunk@47260 602fd350-edb4-49c9-b593-d223f7449a82
Fully list which first-party core theme features are supported in the /themes endpoint response. This brings the REST API themes controller's response more in line with the output of get_theme_support().
Props adamboro, apieschel, koke, spacedmonkey, TimothyBlynJacobs.
See #49037.
git-svn-id: https://develop.svn.wordpress.org/trunk@47258 602fd350-edb4-49c9-b593-d223f7449a82
This makes the box more consistent with the Publish meta box in classic editor.
Props birgire, nfmohit, melchoyce, afercia.
Fixes#43587.
git-svn-id: https://develop.svn.wordpress.org/trunk@47252 602fd350-edb4-49c9-b593-d223f7449a82