A multi-type schema is a schema where the `type` keyword is an array of possible types instead of a single type. For instance, `[ 'object', 'string' ]` would allow objects or string values.
In [46249] basic support for these schemas was introduced. The validator would loop over each schema type trying to find a version that matched. This worked for valid values, but for invalid values it provided unhelpful error messages. The sanitizer also had its utility restricted.
In this commit, the validators and sanitizers will first determine the best type of the passed value and then apply the schema with that set type. In the case that a value could match multiple types, the schema of the first matching type will be used.
To maintain backward compatibility, if unsupported schema types are used, the value will always pass validation. A doing it wrong notice is issued in this case.
Fixes#50300.
Props pentatonicfunk, dlh, TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@48306 602fd350-edb4-49c9-b593-d223f7449a82
This aims to reduce some confusion and make it clearer that the email should be checked before attempting to log in right away.
Props rianrietveld, pratik028, bdbch, johnbillion, hankthetank, yashrs, williampatton, audrasjb, bmartinent, florianatwhodunit, henry.wright, birgire, SergeyBiryukov.
Fixes#40605, #41514.
git-svn-id: https://develop.svn.wordpress.org/trunk@48304 602fd350-edb4-49c9-b593-d223f7449a82
This allows for using multi-type support with a string that has a format. For backwards compatibility support, the format validation will still apply if the type is not specified, or it is invalid.
Two new doing it wrong notices are issued when omitting a type, or using an invalid type.
Props ryotsun.
Fixes#50189.
git-svn-id: https://develop.svn.wordpress.org/trunk@48300 602fd350-edb4-49c9-b593-d223f7449a82
Make the structure of `::$rendered_sidebars` and `::$rendered_widgets` properties consistent.
This resolves an issue with every widget being marked as inactive by default on the Widgets panel.
Props dlh, afercia, SergeyBiryukov.
Fixes#50508.
git-svn-id: https://develop.svn.wordpress.org/trunk@48299 602fd350-edb4-49c9-b593-d223f7449a82
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.
Follow-up to [46800], [48232].
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48298 602fd350-edb4-49c9-b593-d223f7449a82
This commit adds a unique ID attribute to script loader generated <script> tags as well as related <script> tags for inline JavaScript, translations, or parameters.
This is a first step in adding support for lazy loading scripts and styles, but for now is only used to assist in debugging generated output.
Props dd32, spacedmonkey.
See #48654.
git-svn-id: https://develop.svn.wordpress.org/trunk@48295 602fd350-edb4-49c9-b593-d223f7449a82
In `get_the_archive_title()` split the internal `$title` variable into `$title` and `$prefix`. By using the new `get_the_archive_title_prefix` filter the prefix can now wrapped with custom elements or removed completely by using
{{{
add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );
}}}
Also, wrap the title part with a `span` element and pass the original title and prefix to the existing `get_the_archive_title` filter, allowing further customization to the archive titles.
Props Kaira, milindmore22, shireling, grapplerulrich, audrasjb, desrosj, Confridin, ramiy, ocean90.
Fixes#31237.
Fixes#38545.
git-svn-id: https://develop.svn.wordpress.org/trunk@48294 602fd350-edb4-49c9-b593-d223f7449a82
Continues the introduction in core of new focus styles dedicated to Windows High Contrast mode. The new styles use a transparent CSS outline.
This change covers some parts of the interface for the meta boxes, Widgets, and the Customizer.
Props joedolson, kjellr, antpb, mikeschroder, Hareesh Pillai.
See #41286, #45910.
Fixes#47117.
git-svn-id: https://develop.svn.wordpress.org/trunk@48293 602fd350-edb4-49c9-b593-d223f7449a82
To facilitate inline image editing in Gutenberg, a new endpoint at wp/v2/media/<id>/edit has been introduced. This is functionally similar to the existing ajax image editor, however the REST API editor creates a new attachment record instead of updating an existing attachment.
Fixes#44405.
Props ajlende, ellatrix, spacedmonkey, azaozz.
git-svn-id: https://develop.svn.wordpress.org/trunk@48291 602fd350-edb4-49c9-b593-d223f7449a82
This clarifies some messages referring to Site Health checks and maintenance mode, and makes them more accurate.
Props dartiss.
Fixes#50549.
git-svn-id: https://develop.svn.wordpress.org/trunk@48287 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50553.
git-svn-id: https://develop.svn.wordpress.org/trunk@48285 602fd350-edb4-49c9-b593-d223f7449a82
After [48039] it became clear that the non-linked custom logo on the home page needs an empty alt attribute, as in most of the cases the logo is decorative and doesn't need its purpose to be described.
This change outputs an empty alt attribute by default for the custom logo on the home page. If necessary, it is possible to use the new 'get_custom_logo_image_attributes' filter to manipulate the default attributes for the logo image and set an alt attribute.
Props FlorianBrinkmann, Soean, sabernhardt, audrasjb, SergeyBiryukov, samful, knutsp.
See #36640.
Fixes#37011.
git-svn-id: https://develop.svn.wordpress.org/trunk@48283 602fd350-edb4-49c9-b593-d223f7449a82
- improves checkboxes alignment on the "Plugins" page table in the responsive view
- improves spacing between form controls on the "Add Plugins" page in the responsive view
- the layout of the "filter bar" on the "Add Plugins" page is now based on CSS Flexbox
- removes italic type from a paragraph in the "Favorites" page
Props passoniate, garethgillman, maxpertici, audrasjb, sabernhardt, afercia.
See #47327.
Fixes#49231.
git-svn-id: https://develop.svn.wordpress.org/trunk@48281 602fd350-edb4-49c9-b593-d223f7449a82
After working on support for register_block_type_args filter in #49615, it became clear that we need to use init action for core blocks to make it possible to use this filter.
Fixes#50263.
git-svn-id: https://develop.svn.wordpress.org/trunk@48279 602fd350-edb4-49c9-b593-d223f7449a82
This PR adds a new color scheme option, which uses a high luminosity blue spot color, almost-black menu, and pure white for menu items.
This helps increase contrast, and bring more consistency with some of the higher contrast colors used in the block editor.
Props joen, ibdz, shaunandrews.
Fixes#50504.
git-svn-id: https://develop.svn.wordpress.org/trunk@48277 602fd350-edb4-49c9-b593-d223f7449a82
These libraries were previously updated in [48038], but some changes were accidentally reverted in [48267].
Props kebbet.
See #50526.
git-svn-id: https://develop.svn.wordpress.org/trunk@48276 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90, afercia.
See #20491.
Fixes#50535.
git-svn-id: https://develop.svn.wordpress.org/trunk@48274 602fd350-edb4-49c9-b593-d223f7449a82
This allows for programatically determining the REST version of the current page. The links also aid human discovery of the REST API in general.
Props dshanske, tfrommen, TimothyBlynJacobs.
Fixes#49116.
git-svn-id: https://develop.svn.wordpress.org/trunk@48273 602fd350-edb4-49c9-b593-d223f7449a82
With this changeset, in addition to the already present `wp_lazy_loading_enabled` filter, developers can now opt out of lazy-loading template images via `wp_get_attachment_image()` by passing a `loading` attribute with boolean value `false`. This can be used e.g. by theme developers on images which are very likely to be in the initial viewport.
This changeset also improves related test coverage.
Props adamsilverstein, azaozz, joemcgill, johnbillion.
See #50425, #44427.
git-svn-id: https://develop.svn.wordpress.org/trunk@48272 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50527.
git-svn-id: https://develop.svn.wordpress.org/trunk@48270 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50526.
git-svn-id: https://develop.svn.wordpress.org/trunk@48267 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50525.
git-svn-id: https://develop.svn.wordpress.org/trunk@48266 602fd350-edb4-49c9-b593-d223f7449a82
Swaps the DOM order of the two main columns within the admin Image Editor.
When the sequence in which content is presented affects its meaning and the navigation sequences affect meaning or operation, visual order and DOM order must match. See WCAG 2.1 Success Criterion 1.3.2 Meaningful Sequence and Success Criterion 2.4.3 Focus Order.
Props sabernhardt, anevins, audrasjb, afercia.
Fixes#47136.
git-svn-id: https://develop.svn.wordpress.org/trunk@48265 602fd350-edb4-49c9-b593-d223f7449a82
Adds possibility to filter the settings of a block type during its registration.
Props aduth, azaozz.
Fixes#49615.
git-svn-id: https://develop.svn.wordpress.org/trunk@48263 602fd350-edb4-49c9-b593-d223f7449a82
Exposes all core blocks (excluding embeds) on the server to be used with the REST API block types endpoint.
Props spacedmonkey, timothyblynjacobs.
Fixes#50263.
git-svn-id: https://develop.svn.wordpress.org/trunk@48262 602fd350-edb4-49c9-b593-d223f7449a82
These endpoints facilitate the Block Directory Inserter feature in Gutenberg. Users can now install, activate, deactivate, and delete plugins over the REST API. The block directoryendpoint allows searching for available blocks from the WordPress.org block directory.
Props cklee, talldanwp, noisysocks, joen, soean, youknowriad, dufresnesteven, gziolo, dd32, tellyworth, ryelle, spacedmonkey, TimothyBlynJacobs.
Fixes#50321.
git-svn-id: https://develop.svn.wordpress.org/trunk@48242 602fd350-edb4-49c9-b593-d223f7449a82
Rename the `$keep` parameter of both filters to `$screen_option` for clarity, update the documentation to better reflect its purpose.
Props Chouby, sswells, SergeyBiryukov.
Fixes#50392.
git-svn-id: https://develop.svn.wordpress.org/trunk@48241 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the filters were hidden for single posts or attachments, which could only be achieved by editing the URL manually.
The `is_singular()` check was added long before the list tables were introduced, and appears to no longer serve any purpose in the current code.
As a side effect, this resolves an issue where a non-existing attachment ID in the URL would block further search in Media Library.
Props afercia, tomdude, audrasjb, bencroskery, desrosj, SergeyBiryukov.
Fixes#38221.
git-svn-id: https://develop.svn.wordpress.org/trunk@48240 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
This makes the signature of `WP_HTTP_IXR_Client::query()` compatible with the parent class method.
Follow-up to [48204].
Props ayeshrajans.
See #48267, #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@48238 602fd350-edb4-49c9-b593-d223f7449a82
Following up on [48170], this changeset moves the new logic to add missing `img` dimension attributes into a separate function that is run first within `wp_filter_content_tags()`. It also adds a utility function `wp_image_src_get_dimensions()` with logic reused from `wp_image_add_srcset_and_sizes()`, and it ensures that `width` and `height` attributes only get added if both of the attributes are missing on the original `img` tag.
This changeset furthermore improves test coverage and separates tests for the different aspects of `img` tag modification.
Props azaozz.
Fixes#50367. See #44427.
git-svn-id: https://develop.svn.wordpress.org/trunk@48237 602fd350-edb4-49c9-b593-d223f7449a82
This addresses an inconsistency where 0 could mean one of the three scenarios:
* Invalid comment ID.
* Invalid comment post ID.
* No DB rows updated. This is not an error and should not be treated as one.
With this change, `wp_update_comment()` always returns either `false` or a `WP_Error` object on failure, depending on the value of the `$wp_error` parameter.
Follow-up to [48154], [48215], [48216], [48218], [48230].
Props dd32, jnylen0, enrico.sorcinelli.
Fixes#39732. See #38700, #39735.
git-svn-id: https://develop.svn.wordpress.org/trunk@48235 602fd350-edb4-49c9-b593-d223f7449a82
Improves accessibility of the "Copy this section" button and "Return to Top" link:
- uses `setTimeout()` and `clearTimeout()` to properly handle the "Copied!" text
- simplifies the button text by removing the redundant visually hidden text
- fixes the mismatching visual and DOM order of the Copy button and the "Return to Top" link
- improves the "Return to Top" links by providing real page fragment identifiers, when possible
- hides the "Return to Top" up arrow from assistive technologies
- minor coding standards
Props afercia, garrett-eclipse.
See #48463, #50322.
Fixes#50335.
git-svn-id: https://develop.svn.wordpress.org/trunk@48234 602fd350-edb4-49c9-b593-d223f7449a82
- avoids a focus loss when clicking the "Copy site info" button
- uses `setTimeout()` and `clearTimeout()` to properly handle the "Copied!" text
- minor JavaScript coding standards
Props audrasjb, Clorith, afercia.
See #48463, #50335.
Fixes#50322.
git-svn-id: https://develop.svn.wordpress.org/trunk@48233 602fd350-edb4-49c9-b593-d223f7449a82
For a number of years, various screens in the WordPress admin provided users with a readonly input field to copy the attachment file URL. Manually copying from a readonly field is an annoying task at best even for mouser users. It's a usability and accessibility issue at the same time.
These fields now have a new "Copy URL" button that is easy to use and accessible to everyone.
Props theolg, markdubois, vabrashev, sajjad67, xkon, nrqsnchz, melchoyce, audrasjb, afercia.
See #41612, #50322, #50335.
Fixes#48463.
git-svn-id: https://develop.svn.wordpress.org/trunk@48232 602fd350-edb4-49c9-b593-d223f7449a82
Remove the ability to short-circuit comment update by returning `false` from the filter for now.
This was inconsistent with the `pre_comment_approved` filter, and should not be necessary if a more descriptive reason can be given by always using `WP_Error`.
See #39732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48230 602fd350-edb4-49c9-b593-d223f7449a82
Remove redundant checks for `wp_update_comment()` results being `false`, as the function always returns a `WP_Error` object now if `$wp_error` is true.
Follow-up to [48154], [48215], [48216].
See #39732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48218 602fd350-edb4-49c9-b593-d223f7449a82
* Revert the logic of `$wp_error` checks to avoid negation.
* Clarify the return value, restore the edits from [47017].
* Update `wp_update_comment_data` filter check to allow `false` to prevent the update.
Follow-up to [48154].
See #39732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48215 602fd350-edb4-49c9-b593-d223f7449a82
Improve the shape of package-lock.json file to make it stable. The main change is that both dependencies of WordPress packages that use npm aliases are listed as development dependencies: puppeteer and prettier. This patch includes also block.json files for dynamic blocks copied from WordPress packages.
Props ellatrix.
Fixes#50420.
git-svn-id: https://develop.svn.wordpress.org/trunk@48213 602fd350-edb4-49c9-b593-d223f7449a82
This makes the behavior consistent with that of locked posts, which can't be deleted via the list tables when another user is editing them.
Props dlh.
Fixes#50501.
git-svn-id: https://develop.svn.wordpress.org/trunk@48211 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a JS error when passing the message to `wp.a11y.speak()` when showing the "changeset is locked" overlay to prevent two users from editing the same changeset simultaneously.
Props dlh.
Fixes#50500.
git-svn-id: https://develop.svn.wordpress.org/trunk@48210 602fd350-edb4-49c9-b593-d223f7449a82
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
These functions now return false if the template file could not be found, to allow for easier debugging.
Props tferry, sphakka, johnbillion, pento, davidbinda, desrosj, birgire, garrett-eclipse, williampatton, davidbaumwald, SergeyBiryukov.
Fixes#40969.
git-svn-id: https://develop.svn.wordpress.org/trunk@48209 602fd350-edb4-49c9-b593-d223f7449a82
This makes the function signatures more consistent with `wp_update_comment()` and `wp_set_comment_status()`.
`wp_check_comment_flood()` is left as the only function with the `$avoid_die` parameter for now, as it does not return a `WP_Error` object.
Follow-up to [48154], [48207].
See #39732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48208 602fd350-edb4-49c9-b593-d223f7449a82
This was intended as a temporary fix until `add_magic_quotes()` is modified to leave non-string values untouched, which has now been done.
Follow-up to [47370], [48205].
See #48605.
git-svn-id: https://develop.svn.wordpress.org/trunk@48206 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props kraftbj.
See #48267, #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@48204 602fd350-edb4-49c9-b593-d223f7449a82
* Rename the `wp_approved_environment_types` filter to `wp_environment_types`.
* Introduce `WP_ENVIRONMENT_TYPES` system variable and constant to complement the filter.
* Correct the argument type for the `wp_environment_types` filter.
* Cache the result in a static variable to ensure consistent return value.
* Rename the `stage` type to `staging`.
Follow-up to [47919].
Props dlh, dd32, TimothyBlynJacobs, johnbillion, pbiron.
See #33161.
git-svn-id: https://develop.svn.wordpress.org/trunk@48188 602fd350-edb4-49c9-b593-d223f7449a82
Due to an unintended `break` instruction from a previous iteration, the function cached only one term in each taxonomy.
Follow-up to [48055].
Props Chouby.
Fixes#50352.
git-svn-id: https://develop.svn.wordpress.org/trunk@48187 602fd350-edb4-49c9-b593-d223f7449a82
The filter is the callback function added with `add_filter()`, therefore the hook passes a value to the filter, and the filter returns a value to change its behaviour.
The documentation is referring to the latter.
Props johnbillion.
See #49572, #16557.
git-svn-id: https://develop.svn.wordpress.org/trunk@48185 602fd350-edb4-49c9-b593-d223f7449a82
This improves the wording of the inline documentation for `redirect_guess_404_permalink()` and the related filters introduced in [47878].
Previously [47878,47885]
See #16557.
git-svn-id: https://develop.svn.wordpress.org/trunk@48182 602fd350-edb4-49c9-b593-d223f7449a82
Adds a Social Icons Filter to Twenty Twenty that allows for new icons to be added to the theme by filter.
Props JarretC, nielslange, acosmin, desrosj.
Fixes#48713.
git-svn-id: https://develop.svn.wordpress.org/trunk@48180 602fd350-edb4-49c9-b593-d223f7449a82
This endpoint allows a user to retrieve the block type definition for all server-side registered block types.
Props spacedmonkey, aduth, gziolo, ocean90, TimothyBlynJacobs.
Fixes#47620.
git-svn-id: https://develop.svn.wordpress.org/trunk@48173 602fd350-edb4-49c9-b593-d223f7449a82
This adds some extra details to the message:
* The current PHP or WordPress version.
* The plugin's minimum required PHP or WordPress version.
* A link to the support documentation on how to update PHP.
Props stuffradio, johnbillion, garrett-eclipse, sabernhardt, williampatton, SergeyBiryukov.
Fixes#48245.
git-svn-id: https://develop.svn.wordpress.org/trunk@48172 602fd350-edb4-49c9-b593-d223f7449a82
Currently themes can declare support for a given feature by using add_theme_support(). This commit adds a register_theme_feature() API that allows plugins and WordPress Core to declare a list of available features that themes can support.
The REST API uses this to expose a theme's supported features if the feature has been registered with "show_in_rest" set to true.
Props kadamwhite, spacedmonkey, williampatton, desrosj, TimothyBlynJacobs.
Fixes#49406.
git-svn-id: https://develop.svn.wordpress.org/trunk@48171 602fd350-edb4-49c9-b593-d223f7449a82
This changeset ensures that attachment images which are inserted without `width` and `height` attributes still receive them in the frontend, to reduce cumulative layout shift. Adding the dimensions happens as part of the logic for adding `srcset` and `sizes` attributes, which already assume the specific width and height of the respective image.
Images are now only lazy-loaded if they have `width` and `height` attributes present. While missing these attributes itself is what causes layout shifts, lazy-loading such images can make this problem more apparent to the user.
Props adamsilverstein, westonruter.
Fixes#50367. See #44427.
git-svn-id: https://develop.svn.wordpress.org/trunk@48170 602fd350-edb4-49c9-b593-d223f7449a82
This was deprecated in [20212] in favor of passing `”uploads” => true` to the `custom-header` feature, so it should not be specified as an available feature in the parameter documentation.
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48169 602fd350-edb4-49c9-b593-d223f7449a82
When files are copied into place, check whether opcode invalidation is available and attempt to invalidate to avoid unintended behavior or fatal errors from themes, plugins, or core.
Introduces `wp_opcache_invalidate()` to allow safe invalidation of PHP files from opcode cache, and a filter, `wp_opcache_invalidate_file` to override the behavior.
Replaces the existing calls to `opcache_invalidate()` in the plugin and theme editors to use the new function.
Thanks to jnylen0 for porting over a patch from ClassicPress that provided much of the approach for what is being committed.
Props nigro.simone, dd32, JasWSInc, szepe.viktor, swissspidy, JanR, asalce, Garavani, pavelevap, pputzer, GregLone, benoitchantre, jadonn, doc987, kraftbj, Krstarica, jnylen0, nextendweb, williampatton, ayeshrajans, joostdevalk, stevenkussmaul, boogah, jorbin, mikeschroder.
Fixes#36455, #50354.
git-svn-id: https://develop.svn.wordpress.org/trunk@48160 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48154 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48151 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48146 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48145 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48142 602fd350-edb4-49c9-b593-d223f7449a82
The function seems too specific and low-level for an abstraction, is only used in two places, and does not provide a significant benefit in terms of reducing code duplication.
Follow-up to [48133].
See #8973.
git-svn-id: https://develop.svn.wordpress.org/trunk@48140 602fd350-edb4-49c9-b593-d223f7449a82
* `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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48136 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48134 602fd350-edb4-49c9-b593-d223f7449a82
This commit caused the majority of blocks in the block editor to no longer
register as they reference the old category names.
See #50278.
git-svn-id: https://develop.svn.wordpress.org/trunk@48130 602fd350-edb4-49c9-b593-d223f7449a82
There was an early `wp_die` that was preventing the success notification from being sent in the upload process.
Fixes#44581.
Props pbiron, mikeschroder, joemcgill, rebasaurus, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48128 602fd350-edb4-49c9-b593-d223f7449a82
The attribute is specific to XHTML and is not needed in HTML5.
Props audrasjb, diddledan, hommealone, joyously, mukesh27, valentinbora, peterwilsoncc, SergeyBiryukov.
Fixes#49126.
git-svn-id: https://develop.svn.wordpress.org/trunk@48126 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the check is done on a sub-directory within `WP_CONTENT_DIR`, rather than outside of `ABSPATH`.
Props pbiron, Clorith.
Fixes#48199.
git-svn-id: https://develop.svn.wordpress.org/trunk@48125 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48124 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48123 602fd350-edb4-49c9-b593-d223f7449a82
“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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48121 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the "More Details" link does not randomly wrap to a second line depending on the length of the button label above.
Props sabernhardt, kharisblank, Otto42, paresh07.
Fixes#48648.
git-svn-id: https://develop.svn.wordpress.org/trunk@48120 602fd350-edb4-49c9-b593-d223f7449a82
The merging behavior which assigns the `layout` attribute in `WP_Block_Type` gets removed.
Props aduth, TimothyBlynJacobs.
Fixes#50257.
git-svn-id: https://develop.svn.wordpress.org/trunk@48118 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48116 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48115 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48114 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48112 602fd350-edb4-49c9-b593-d223f7449a82
Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48110 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48109 602fd350-edb4-49c9-b593-d223f7449a82
- Fix displaying of errors on the Themes screen.
- Correct the classes used for the error messages, and use `notice-alt` as notices are mostly shown on a white background.
Props afercia, azaozz.
Fixes#50405.
git-svn-id: https://develop.svn.wordpress.org/trunk@48092 602fd350-edb4-49c9-b593-d223f7449a82
This ensures the permissions are correct after a directory is created with `ssh2_sftp_mkdir()`, which appears to be affected by system `umask` settings.
Props bbrdaric.
Fixes#49218.
git-svn-id: https://develop.svn.wordpress.org/trunk@48090 602fd350-edb4-49c9-b593-d223f7449a82
Additionally, synchronize `$tempfile` and `$temphandle` variable names in `WP_Filesystem_FTPext` and `WP_Filesystem_ftpsockets`.
See #49542.
git-svn-id: https://develop.svn.wordpress.org/trunk@48089 602fd350-edb4-49c9-b593-d223f7449a82
Ensures back-compat while moving to paths off of the `/exports` directory.
Fixes: #44038.
Props: allendav, mrTall, desrosj, garrett-eclipse, cameronamcintyre, nmenescardi, xkon, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48087 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48086 602fd350-edb4-49c9-b593-d223f7449a82
This complements the `registration_errors` filter in `register_new_user()`.
Props wpdo5ea, dilipbheda.
Fixes#49521.
git-svn-id: https://develop.svn.wordpress.org/trunk@48084 602fd350-edb4-49c9-b593-d223f7449a82
This brings some consistency with `_default_wp_die_handler()`, where they are already combined.
Follow-up to [45909].
See #47580.
git-svn-id: https://develop.svn.wordpress.org/trunk@48082 602fd350-edb4-49c9-b593-d223f7449a82
Some of these were not caught when running `composer lint:errors`, but are fixed when running `phpcbf` directly.
Follow-up to [48072], [48080].
See #49542, #50117.
git-svn-id: https://develop.svn.wordpress.org/trunk@48081 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48075 602fd350-edb4-49c9-b593-d223f7449a82
Fixes issues where tables created by the table block have an extra border on the left side which extends below the table.
Props gsmumbo, mukesh27, JavierCasares.
Fixes#50180.
git-svn-id: https://develop.svn.wordpress.org/trunk@48074 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the issue by adding specific styles for the `<hr>` tag.
Props laurelfulford, nielslange, kjellr, samful, leprincenoir.
Fixes#45912.
git-svn-id: https://develop.svn.wordpress.org/trunk@48073 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48072 602fd350-edb4-49c9-b593-d223f7449a82