The `wp_update_comment_data` filter introduced in 4.7 allows comment data to be filtered before it is updated in the database.
The patch aims to handle `WP_Error` as the filter above return value in a similar manner as is done for `wp_new_comment()`.
Fixes#39732.
Props: enricosorcinelli, swissspidy, gkloveweb, jnylen0, jbpaul17, afercia, SergeyBiryukov, audrasjb, imath, davidbaumwald.
Built from https://develop.svn.wordpress.org/trunk@48154
git-svn-id: http://core.svn.wordpress.org/trunk@47923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes the API a little more clear, whereas setting `false` used to mean `asc` and `true` meant `desc`, you can now use those directly, while maintaining back-compat.
Fixes#45089.
Props Tkama, SergeyBiryukov, shital-patel, desrosj, birgire, davidbaumwald.
Built from https://develop.svn.wordpress.org/trunk@48151
git-svn-id: http://core.svn.wordpress.org/trunk@47920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that the link still makes sense when read out of context by assistive technologies.
Additionally, underline the link per the accessibility coding standards.
Props samful, afercia, williampatton, audrasjb.
Fixes#50338.
Built from https://develop.svn.wordpress.org/trunk@48146
git-svn-id: http://core.svn.wordpress.org/trunk@47915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Per WCAG 2.0 guidelines, big chunks of italic text should be avoided for better accessibility.
Additionally, replace the legacy `.error` class for "You deactivated this plugin and may no longer need this policy" message with `.notice-info`.
Follow-up to [47147], [48116].
Props afercia, audrasjb.
See #47327, #44621.
Built from https://develop.svn.wordpress.org/trunk@48145
git-svn-id: http://core.svn.wordpress.org/trunk@47914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The new names make the purpose more clear. It also adds consistency with the `$allowed_options` global variable.
Also in this change, the `wp-deprecated` dependency has been removed from the password strength meter in favor of a `window.console.log()` call to avoid adding 3 dependencies for one deprecated notice.
Props SergeyBiryukov, ocean90, desrosj
Fixes#50413.
Built from https://develop.svn.wordpress.org/trunk@48142
git-svn-id: http://core.svn.wordpress.org/trunk@47911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `gettext_{$domain}`
* `gettext_with_context_{$domain}`
* `ngettext_{$domain}`
* `ngettext_with_context_{$domain}`
Additionally:
* Pass `$domain` parameter to the new hooks, for consistency with their pre-existing counterparts.
* Update documentation to explain the dynamic portion of the filter, for consistency with other dynamic hooks in core.
Follow-up to [48131].
Props swissspidy, knutsp, TimothyBlynJacobs, SergeyBiryukov.
Fixes#49518.
Built from https://develop.svn.wordpress.org/trunk@48136
git-svn-id: http://core.svn.wordpress.org/trunk@47905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If a user selects the top option, then chooses a different option, the top selection takes precedence. This update gives a new name to the bottom action, ensuring the proper update is carried out.
Fixes 46872.
Props clayray, garrett-eclipse, subrataemfluence.
Built from https://develop.svn.wordpress.org/trunk@48134
git-svn-id: http://core.svn.wordpress.org/trunk@47903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adding context to allow for more specific targeting. New hooks:
* `gettext-{$domain}`
* `gettext_with_context-{$domain}`
* `ngettext-{$domain}`
* `ngettext_with_context-{$domain}`
Fixes#49518.
Props geminilabs, garrett-eclipse, davidbaumwald, johnbillion, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48131
git-svn-id: http://core.svn.wordpress.org/trunk@47900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Also, remove the `version` argument from the `wp.deprecated()` call in `password-strength-meter.js`. This argument is for specifying the version a feature will be removed, not when the feature was removed.
Props hareesh-pillai.
Fixes#50413.
Built from https://develop.svn.wordpress.org/trunk@48124
git-svn-id: http://core.svn.wordpress.org/trunk@47893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes several improvements to the emails sent to site admins when plugin and theme auto-updates are attempted.
- Emails are now specifically tailored to the three results (success, failed, or mixed).
- Subject lines and body copy for mixed and failed results now correctly convey the importance of double checking the site in question.
- The site’s URL is now included in all emails.
- When failures occur, links to the Plugins and/or Themes pages in the admin are now included so that site owners can easily take action.
Props audrasjb, desrosj, azaozz, garrett-eclipse, paaljoachim, johnbillion, marybaum, pbiron.
Follow up to [47835].
See #50052.
Fixes#50268.
Built from https://develop.svn.wordpress.org/trunk@48123
git-svn-id: http://core.svn.wordpress.org/trunk@47892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”
With this commit, all occurrences of “whitelist” and “blacklist” (with the single exception of the `$new_whitelist_options` global variable) are removed. A new ticket has been opened to explore renaming the `$new_whitelist_options` variable (#50434).
Changing to more specific names or rewording sentences containing these terms not only makes the code more inclusive, but also helps provide clarity. These terms are often ambiguous. What is being blocked or allowed is not always immediately clear. This can make it more difficult for non-native English speakers to read through the codebase.
Words matter. If one contributor feels more welcome because these terms are removed, this was worth the effort.
Props strangerstudios, jorbin, desrosj, joemcgill, timothyblynjacobs, ocean90, ayeshrajans, davidbaumwald, earnjam.
See #48900, #50434.
Fixes#50413.
Built from https://develop.svn.wordpress.org/trunk@48121
git-svn-id: http://core.svn.wordpress.org/trunk@47890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Continues the removal of italic text where unnecessary or where used on whole lines and big chunks of text.
Removes italic type from:
- all the `howto` text e.g. the "Tags" meta box, the "Featured image" meta box, the "Insert/edit link" modal dialog in the Classic Editor
- the Taxonomies list pages
- the edit Taxonomies pages
- the Menus page
- the Settings pages
Props audrasjb.
See #47327.
Built from https://develop.svn.wordpress.org/trunk@48116
git-svn-id: http://core.svn.wordpress.org/trunk@47885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Partially reverts [48059] as there's no full consensus on the removal of the text prefix. Further actions should be taken to improve consistency and accessibility of the admin notices. Keeps some improvements to the translatable strings from [48059].
Fixes#47656.
Built from https://develop.svn.wordpress.org/trunk@48115
git-svn-id: http://core.svn.wordpress.org/trunk@47884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that `$pages` and other globals are only used after they have been set up in `setup_postdata()`.
Follow-up to [44941].
Props tessawatkinsllc, dontdream, spacedmonkey, squarecandy, davidbaumwald, SergeyBiryukov.
Fixes#47824. See #42814.
Built from https://develop.svn.wordpress.org/trunk@48114
git-svn-id: http://core.svn.wordpress.org/trunk@47883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Currently, only the X-WP-Total and X-WP-TotalPages headers are exposed which means that clients have to manually construct the URL to implement pagination instead of using the "prev" and "next" Links.
Additionally, a filter "rest_exposed_cors_headers" is introduced to make it simpler for plugins to expose additional headers.
Props Toro_Unit, ayeshrajans.
Fixes#50369.
Built from https://develop.svn.wordpress.org/trunk@48112
git-svn-id: http://core.svn.wordpress.org/trunk@47881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.
Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs.
Props alishanvr, jrf.
Fixes#50426.
Built from https://develop.svn.wordpress.org/trunk@48109
git-svn-id: http://core.svn.wordpress.org/trunk@47878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Enables developers to determine whether a section of CSS should be allowed or discarded. By default, the value will be false if the part contains \ ( & } = or comments. Returning true allows the CSS part to be included in the output.
Replaces the `safe_style_disallowed_chars` filter introduced in r47891.
Props azaozz.
Fixes#37134.
Built from https://develop.svn.wordpress.org/trunk@48086
git-svn-id: http://core.svn.wordpress.org/trunk@47853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Changelog: https://github.com/moment/moment/compare/2.22.2...2.26.0
This commit also fixes a deprecation warning regarding the usage of `moment.locale()` to set locale properties.
As of Moment.js 2.12.0, `moment.locale()` is deprecated and `moment.updateLocale()` should be used instead.
Additionally, minimize `moment.js` as part of build process to remove the source map reference.
This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.
Props yoancutillas, SergeyBiryukov.
Fixes#50408.
Built from https://develop.svn.wordpress.org/trunk@48075
git-svn-id: http://core.svn.wordpress.org/trunk@47842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
While web crawlers are able to discover pages from links within the site and from other sites, XML sitemaps supplement this approach by allowing crawlers to quickly and comprehensively identify all URLs included in the sitemap and learn other signals about those URLs using the associated metadata.
See https://make.wordpress.org/core/2020/06/10/merge-announcement-extensible-core-sitemaps/ for more details.
This feature exposes the sitemap index via `/wp-sitemap.xml` and exposes a variety of new filters and hooks for developers to modify the behavior. Users can disable sitemaps completely by turning off search engine visibility in WordPress admin.
This change also introduces a new `esc_xml()` function to escape strings for output in XML, as well as XML support to `wp_kses_normalize_entities()`.
Props Adrian McShane, afragen, adamsilverstein, casiepa, flixos90, garrett-eclipse, joemcgill, kburgoine, kraftbj, milana_cap, pacifika, pbiron, pfefferle, Ruxandra Gradina, swissspidy, szepeviktor, tangrufus, tweetythierry.
Fixes#50117.
See #3670. See #19998.
Built from https://develop.svn.wordpress.org/trunk@48072
git-svn-id: http://core.svn.wordpress.org/trunk@47839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Every block has a different set of attributes. These attributes are specified as a JSON Schema object. Previously, every block registered its own block renderer route using its attributes for the schema. This allowed for the attributes to be validated using the built in endpoint validation rules. It had the unfortunate side effect, however, of creating a large number of nearly identical REST API routes, one for each dynamic block. Each registered route has a performance impact. As the number of server side blocks goes up, this becomes more and more of an issue.
Now, we register a single block renderer route and dynamically validate the attributes based on the selected block.
Fixes#48079.
Props gziolo, TimothyBlynJacobs.
Built from https://develop.svn.wordpress.org/trunk@48069
git-svn-id: http://core.svn.wordpress.org/trunk@47836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
For a number of years, most of the WordPress error messages have been prefixed with "Error:". However, these messages appear in a context where it's already clear an error occurred. Whether it's an error, a warning, or any other classification, that's not so relevant for users. The content of the message is the relevant part. The "Error:" prefix doesn't add great value while it does add unnecessary complexity for the message readability.
Also, revises some of these messages to improve clarity and removes HTML from translatable strings.
Props garrett-eclipse, ramiy, SergeyBiryukov, afercia, sabernhardt, quadthemes, audrasjb.
See #47003, #43037, #42945, #15887.
Fixes#47656.
Built from https://develop.svn.wordpress.org/trunk@48059
git-svn-id: http://core.svn.wordpress.org/trunk@47826 1a063a9b-81f0-0310-95a4-ce76da25c4cd