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