Adds a `maybe_serialize()` comparison for the old and new values in `update_network_option()` to avoid unnecessary database writes when options contain identical objects.
Props bor0.
Fixes#44956.
git-svn-id: https://develop.svn.wordpress.org/trunk@44662 602fd350-edb4-49c9-b593-d223f7449a82
The Gallery Widget incorrectly tried to include the deleted image in the preview.
Props westonruter, janak007, afercia, mrasharirfan.
Fixes#43139.
git-svn-id: https://develop.svn.wordpress.org/trunk@44661 602fd350-edb4-49c9-b593-d223f7449a82
Their respective `post_category` and `post_categories` parameters were not correct.
Props Takahashi_Fumiki.
Fixes#45171.
git-svn-id: https://develop.svn.wordpress.org/trunk@44660 602fd350-edb4-49c9-b593-d223f7449a82
The "Your comment is awaiting moderation." message relied upon the comment author cookie being set. However, since it's now possible to opt-out of that cookie, submitting a comment won't show the comment preview when the comment is placed in moderation.
To avoid this issue, we now include a hash in the redirect URL, allowing the site to identify that a preview of the moderated comment should be displayed.
Props imath, tomdxw, birgire, lakenh, azaozz, pento.
Fixes#43857.
git-svn-id: https://develop.svn.wordpress.org/trunk@44659 602fd350-edb4-49c9-b593-d223f7449a82
In the non-latin font fallback styles, languages using the Devanagari alphabet were initially committed in a comma-separated list in the `:lang()` selector, which isn't fully supported. This update separates those languages into their own `:lang()` selectors.
Props mako09.
Fixes#45731.
git-svn-id: https://develop.svn.wordpress.org/trunk@44657 602fd350-edb4-49c9-b593-d223f7449a82
Fix the alignment of the "Nothing Found" page title when there are no posts, to match how it appears for the search results when nothing is found, and the 404 page.
Props kjellr, lorenzone92.
Fixes#45887.
git-svn-id: https://develop.svn.wordpress.org/trunk@44652 602fd350-edb4-49c9-b593-d223f7449a82
The theme's original approach to its non-latin font fallbacks required `!important`, which overrode fonts that shouldn't have been changed, like the icon fonts used for editor buttons.
Props kjellr, mako09, allancole.
Fixes#45731.
git-svn-id: https://develop.svn.wordpress.org/trunk@44650 602fd350-edb4-49c9-b593-d223f7449a82
When merging, [44244] and [44260] were committed to trunk the opposite way that they were committed to the 5.0 branch. They were originally committed in [43885] and [43861], respectively.
Due to this switch, a change in how the Custom Fields meta box was registered wasn't merged from the 5.0 branch, causing it to not be registered correctly in trunk.
Props dd32, pento.
Fixes#46028.
git-svn-id: https://develop.svn.wordpress.org/trunk@44648 602fd350-edb4-49c9-b593-d223f7449a82
A few sniffs have been renamed, this change includes the relevant `phpcs:ignore` comment updates.
Fixes#46002.
git-svn-id: https://develop.svn.wordpress.org/trunk@44645 602fd350-edb4-49c9-b593-d223f7449a82
When a `PUT` request is performed to update a user, a `rest_user_invalid_email` error is incorrectly being returned when the email exists with different letter casing, even if it belongs to the user being updated. `email_exists()` performs a case insensitive lookup, but the conditional statement following that lookup was performing a strict comparison between the new email and the user’s current email.
This changes that comparison to instead compare the user ID returned by `email_exists()` with the user ID being updated. This more closely matches the logic used in `edit_user()` and allows a user to change the letter casing of their email.
Props fuchsws, rachelbaker, desrosj.
Fixes#44672.
git-svn-id: https://develop.svn.wordpress.org/trunk@44641 602fd350-edb4-49c9-b593-d223f7449a82
Disables the "Delete Selected" button when unselecting media by clicking the
"checkmark" box in the media bulk selection mode.
Props subrataemfluence, adamsilverstein.
Fixes#42239.
git-svn-id: https://develop.svn.wordpress.org/trunk@44640 602fd350-edb4-49c9-b593-d223f7449a82
When Internet Explorer encounters a non interactive element with a `tabindex`
attribute, it adds the element to the accessibility tree with a `role=group` and
an accessible name computed from the element. This prevents JAWS from announcing
any fieldset legend within the element.
- removes `tabindex="0"` from the content and the toolbar containers: these tabindex attributes are no longer needed
- removes `aria-label="Main content"` from the content container: not needed
- keeps the media modal focus fallback introduced in [38142] by making the `#wpbody-content` element focusable only when needed
Props stevefaulkner, aardrian.
Fixes#43154.
git-svn-id: https://develop.svn.wordpress.org/trunk@44639 602fd350-edb4-49c9-b593-d223f7449a82
- properties should be followed by a colon and a space
- media queries shouldn't use spaces within parenthesis
- indentation should use tabs instead of spaces or mixed spaces / tabs
- the content property should use double quotes
- no double spaces
Props nadim0988, afercia.
Fixes#45185.
git-svn-id: https://develop.svn.wordpress.org/trunk@44637 602fd350-edb4-49c9-b593-d223f7449a82
For `wp_insert_attachment()` to do that, we need to be setting the `$wp_error` parameter to true.
Props subrataemfluence, jirihon.
Fixes#44303.
git-svn-id: https://develop.svn.wordpress.org/trunk@44634 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.
Props pento, laghee.
Fixes#44560.
git-svn-id: https://develop.svn.wordpress.org/trunk@44632 602fd350-edb4-49c9-b593-d223f7449a82
The count should only be comments made on that post by the current user, not all comments by them.
Props chetan200891, garrett-eclipse.
Fixes#46014.
git-svn-id: https://develop.svn.wordpress.org/trunk@44631 602fd350-edb4-49c9-b593-d223f7449a82
On the Privacy Policy Guide, there is currently a ‘Copy’ button below each section of suggested text. It is unclear what copy means without more context. It could be assumed, for instance, that the suggested text is copied to a new page.
This changes the button text to read `Copy this section to clipboard` to more clearly inform the user what is copied and how.
Props JoshuaWold, garrett-eclipse, birgire, vishaldodiya.
Fixes#44677.
git-svn-id: https://develop.svn.wordpress.org/trunk@44629 602fd350-edb4-49c9-b593-d223f7449a82
This allows users to sort the export and erase personal data request tables by “Requester” (`post_title`, or user email) and “Requested” (`post_date`, or when the request was created), which can be helpful when sites have many requests present.
Props birgire, ianbelanger, pbiron, desrosj.
Fixes#43405.
git-svn-id: https://develop.svn.wordpress.org/trunk@44628 602fd350-edb4-49c9-b593-d223f7449a82
This changeset uses the API functions introduced in [44476] to link to the resource about updating PHP when highlighting a plugin's required PHP version is not met. It furthermore expands them, introducing a new `wp_update_php_annotation()` function that prints the markup to indicate that the default URL has been altered by the web host, allowing it to be reused universally.
Furthermore, this changeset adds missing `update_php` capability checks before displaying the information about updating PHP.
Props afragen.
Fixes#45986. See #43986, #45686.
git-svn-id: https://develop.svn.wordpress.org/trunk@44627 602fd350-edb4-49c9-b593-d223f7449a82
In addition to AJAX and XML-RPC requests, `wp_die()` now handles JSON requests correctly, returning information in the expected content type.
Props spacedmonkey.
See #45933, #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@44625 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes the hack that was used before to display more complex HTML markup than a simple message in the default PHP error template via `wp_die()`. By removing HTML markup from the arguments passed to `wp_die()` it furthermore paves the way for supporting other content types than the default.
The message and arguments can be modified with new `wp_php_error_message` and `wp_php_error_args` filters respectively.
Furthermore this changeset fixes a few issues of functions not existing which could potentially have caused fatal errors when executed early in the WordPress bootstrap process.
Props flixos90, spacedmonkey.
See #45933, #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@44624 602fd350-edb4-49c9-b593-d223f7449a82
This is a first step on pausing extensions less aggressively. If a plugin or theme only causes a crash in the frontend, there is no point in pausing it in the admin backend.
See #45940, #44458.
git-svn-id: https://develop.svn.wordpress.org/trunk@44623 602fd350-edb4-49c9-b593-d223f7449a82
- Remove duplicate parameter names.
- Fix the wrong value being passed in the second parameter.
- Correct the type of the `$message` parameter.
Props ChriCo.
Fixes#45595.
git-svn-id: https://develop.svn.wordpress.org/trunk@44620 602fd350-edb4-49c9-b593-d223f7449a82
When the `$authordata` global isn't defined, return an empty string, rather than `void`.
Props mukesh27, subrataemfluence.
Fixes#45597.
git-svn-id: https://develop.svn.wordpress.org/trunk@44616 602fd350-edb4-49c9-b593-d223f7449a82
This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered.
Props jmdodd.
Fixes#45475.
git-svn-id: https://develop.svn.wordpress.org/trunk@44615 602fd350-edb4-49c9-b593-d223f7449a82