Commit Graph

18683 Commits

Author SHA1 Message Date
Greg Ziółkowski
b589f04a03 Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956].
Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50983 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 21:20:31 +00:00
Jonathan Desrosiers
c3ef52ded7 General: Avoid unnecessary calls to update_user_option().
The `update_user_option()` function is a way to update a user meta value after adding a blog’s prefix to the beginning of the meta key. But when the fourth parameter is `true`, the behavior is exactly the same as calling `update_user_meta()` directly.

This replaces all instances of `update_user_option()` when the fourth parameter is `true` in Core with a direct call to `update_user_meta()` to prevent an unnecessary call to `update_user_option()`.

Props johnjamesjacoby, zkancs, obenland, desrosj.
Fixes #43339.

git-svn-id: https://develop.svn.wordpress.org/trunk@50981 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 19:58:13 +00:00
Jonathan Desrosiers
dda2f6af36 Editor: Hide the quicktags toolbar when JavaScript is disabled.
This adds the `hide-if-no-js` class to the quicktags toolbar in the Classic Editor. This prevents an empty space from showing when JavaScript is disabled.

Props DeusTron, sabernhardt, Boniu91, poena.
Fixes #40570.

git-svn-id: https://develop.svn.wordpress.org/trunk@50980 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 19:43:34 +00:00
Sergey Biryukov
6296427dd7 Site Health: Make sure the submit_button() function is available in request_filesystem_credentials().
This avoids a fatal error when the function is called via REST API from `WP_Site_Health_Auto_Updates::test_check_wp_filesystem_method()`.

Props lakrisgubben, mukesh27, Clorith, SergeyBiryukov.
Fixes #53206.

git-svn-id: https://develop.svn.wordpress.org/trunk@50979 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 19:23:05 +00:00
Sergey Biryukov
44e2c71fb5 Themes: Add an indication of whether a theme is a child theme on network admin Themes screen.
This shows the parent theme name in a child theme's metadata section in the list table, in a similar way it is displayed in the theme details modal on the single site Themes screen.

Props dpik, Mista-Flo, seanchayes, poena, johnbillion, jeremyfelt, bradt, jacklenox, helen, Travel_girl, karmatosed, Presskopp, joyously, SergeyBiryukov.
Fixes #30240.

git-svn-id: https://develop.svn.wordpress.org/trunk@50978 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 19:03:26 +00:00
Jorge Costa
73bf1dab6b Block Editor: Update color merging algorithm.
The npm packages in use were published a few hours ago, which include some changes to how we manage colors. This commit adds the corresponding PHP changes.

Props nosolosw.
See #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@50977 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 18:56:09 +00:00
Jonathan Desrosiers
7fc0ad094e Twenty Twenty: Hide some elements for print that are not useful in that context.
This adds the comment count, previous/next posts navigation, and category link list to the list of elements hidden from the print context.

Props kjellr, hareesh-pillai, poena.
Fixes #50433.

git-svn-id: https://develop.svn.wordpress.org/trunk@50976 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 18:40:16 +00:00
Jonathan Desrosiers
5da4eb1661 Twenty Twenty-One: Re-add px unit to the admin bar height custom property.
The `px` unit added in [50388] to prevent invalid values when using `calc` functions was inadvertently removed in [50972].

This re-adds the unit to ensure the issue reported in #52564 remains fixed. The same stylelint rule adjustment made in [50388] to `.stylelintrc-css.json` has also been copied over to `stylelintrc.json` file,  which is the configuration file used when linting `.scss` files.

Props ocean90.
See #52624, #52564.

git-svn-id: https://develop.svn.wordpress.org/trunk@50975 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 18:32:17 +00:00
Jonathan Desrosiers
4667ee6efe Bundled Themes: Update devDependencies for default themes.
This updates several `devDependencies` to their latest versions for the Twenty Twenty and Twenty Nineteen themes.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50974 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 18:08:16 +00:00
Jorge Costa
3d3aa3cd09 Block Editor: Add Global Styles support using theme.json file.
This is the second piece of landing the theme.json processing in WordPress core. 
It includes the mechanism that outputs the CSS styles of a theme.json file.

Props nosolosw, youknowriad.
See #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@50973 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 17:38:59 +00:00
Jonathan Desrosiers
3236645ae7 Twenty Twenty-One: Update devDependencies.
This updates several `devDependencies` to their latest versions.

The deprecated `stylelint-config-wordpress` package has also been replaced with the `@wordpress/stylelint-config` package.

This commit also includes several minor adjustments to `.scss` files to decrease the number of coding standards warnings produced when running `lint:scss`.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50972 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 15:36:45 +00:00
Sergey Biryukov
95f678bf3d Editor: Remove gutenberg text domain from Query and Social Links block patterns.
Follow-up to [50948].

Props ntsekouras.
Fixes #53265. See #53248.

git-svn-id: https://develop.svn.wordpress.org/trunk@50971 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 13:52:37 +00:00
Sergey Biryukov
e4947e935d Docs: Some documentation and test improvements for WP_Theme_JSON and WP_Theme_JSON_Resolver classes:
* Add missing `@since` tags.
* Update some DocBlocks per the documentation standards.
* Rename test files and classes per the naming conventions.
* Fix some code alignment issues reported by WPCS.

Follow-up to [50959], [50960].

See #52991, #53175.

git-svn-id: https://develop.svn.wordpress.org/trunk@50967 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 13:24:05 +00:00
Sergey Biryukov
fa0fca4670 General: Some documentation and test improvements for the _wp_array_set():
* Update the function DocBlock per the documentation standards.
* Move the unit tests to a more appropriate place.
* Rename and reorder the tests for consistency with `_wp_array_get()` tests.

Follow-up to [50958], [50962], [50964].

See #53175, #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50965 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 12:24:14 +00:00
Greg Ziółkowski
c35bfc0378 Editor: Remove unused param in get_default_block_editor_settings
Follow-up for [50776].

Props nosolosw.
See #52920.




git-svn-id: https://develop.svn.wordpress.org/trunk@50963 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 10:22:08 +00:00
Sergey Biryukov
2c7c677f25 Widgets: Make sure WP_Widget constructor creates a correct classname value for a namespaced widget class.
This reverts the changes to `id_base` from [50953] due to backward compatibility concerns, and instead focuses on the `id` and `class` attributes specifically.

With this change, any backslashes in the `id` or `class` attributes for a namespaced widget class are converted to underscores, making it easier to style the output or target the widget with JavaScript.

Follow-up to [50953].

Fixes #44098.

git-svn-id: https://develop.svn.wordpress.org/trunk@50961 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 09:50:30 +00:00
Riad Benguella
ef3da3363a Block Editor: Add Global Settings support using theme.json file.
This is the first piece of landing the theme.json processing in WordPress core. 
It allows themes to configure the different editor settings, allow cusomizations and define presets in theme.json file.
 
Props jorgefilipecosta, nosolosw.
See #53175.


git-svn-id: https://develop.svn.wordpress.org/trunk@50959 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 08:36:11 +00:00
Riad Benguella
c0084bccca General: Add _wp_array_set function.
This adds the _wp_array_set function, which is the counterpart of the existing _wp_array_get.
This utility is to be used by the Global Settings work.

Props nosolosw, jorgefilipecosta.
See #53175.


git-svn-id: https://develop.svn.wordpress.org/trunk@50958 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 08:29:03 +00:00
Greg Ziółkowski
d28766f8f2 Editor: Add missing class WP_Block_Editor_Context
Follow-up for [50956].
See #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50957 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 07:37:22 +00:00
Greg Ziółkowski
2a389ad7b7 Editor: Extract block_editor_rest_api_preload method for use with different editor screens
It is going to be used on the new widgets editor screen. This patch also introduced a new class WP_Block_Editor_Context that is going to be used with revised block editor filters to let extenders to keep their existing behavior. It should also allow to provide more settings through the context class as new screens get introduced like the navigation editor.

Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.




git-svn-id: https://develop.svn.wordpress.org/trunk@50956 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 07:31:49 +00:00
Peter Wilson
7cd5ecd667 XML-RPC: Set HTTP status code in accordance with the spec.
When the XML-RPC endpoint is enabled, always return a HTTP `200 OK` status code in accordance with the XML-RPC specification. Continue to return an HTTP `405 Method Not Allowed` status code when the endpoint is disabled.

Props ariskataoka, johnbillion.
Fixes #52958.



git-svn-id: https://develop.svn.wordpress.org/trunk@50954 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-24 02:17:36 +00:00
Sergey Biryukov
c4fd562663 Widgets: Make sure WP_Widget constructor creates a correct id_base value for a namespaced widget class.
The `id_base` value is used for the widget's `id` and `class` attributes and also for the option name which stores the widget settings (unless the widget specifies a custom `option_name` value).

With this change, any backslashes in the `id_base` for a namespaced widget class are converted to hyphens, making it easier to style the output or target the widget with JavaScript.

This also avoids a `preg_match(): Compilation failed` PHP warning from `next_widget_id_number()` on the Widgets screen, previously caused by unescaped backslashes.

Props Mte90, hermpheus, rogerlos, welcher, SergeyBiryukov.
Fixes #44098.

git-svn-id: https://develop.svn.wordpress.org/trunk@50953 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-23 08:50:44 +00:00
Sergey Biryukov
cc6d56f503 Docs: Use 3-digit, x.x.x-style semantic versioning for two _doing_it_wrong() calls.
Follow-up to [37985], [38420], [39021].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50952 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-22 13:08:12 +00:00
Sergey Biryukov
655fbb26ab Media: Some documentation and test improvements for the image_editor_output_format filter:
* Update the filter DocBlock per the documentation standards.
* Use a shorter variable name for consistency with the surrounding code.
* Delete the test file before performing assertions to avoid leftovers in case the test fails.

Follow-up to [50943].

See #52867.

git-svn-id: https://develop.svn.wordpress.org/trunk@50951 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-22 12:58:46 +00:00
Riad Benguella
2fc2afb107 Block Editor: Removed useless block editor render context value.
The "query" context value was meant to be used by the Query block.
But the block has been refactored to avoid relying on context for this.

Props ntsekouras.
Fixes #53250.


git-svn-id: https://develop.svn.wordpress.org/trunk@50950 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 15:56:31 +00:00
Adam Silverstein
62327715a0 Revisions: add a new filter for revisions to keep by post type.
Add a new `wp_{$post_type}_revisions_to_keep` filter that makes it convenient to filter the number of revisions created for a specific post type.

Overrides both the value of WP_POST_REVISIONS and the `wp_revisions_to_keep` filter.

Props dlh.
Fixes #51550.



git-svn-id: https://develop.svn.wordpress.org/trunk@50949 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 15:28:39 +00:00
Riad Benguella
b7c75ec920 Block Patterns: Include the Query and Social Icons block patterns from Gutenberg 10.7.0.
These block patterns are considered "core" block patterns and removed
when a them opts out of the core-block-patterns theme support flag.

Props ntsekouras.
Fixes #53248.


git-svn-id: https://develop.svn.wordpress.org/trunk@50948 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 11:12:39 +00:00
Sergey Biryukov
450df57289 Text Changes: Improve the wording of some error messages.
Props dartiss, williampatton, johnbillion, SergeyBiryukov.
Fixes #50382.

git-svn-id: https://develop.svn.wordpress.org/trunk@50947 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 10:48:53 +00:00
Riad Benguella
83c5f4d23b Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC.
This also includes:

 - The removal of the Post Author block.
 - Renaming build_query_vars_from_query_block function.
 - Update the block supports.

Props gziolo.
See #52991. 
-This line, and those below, will be ignored--

M    package-lock.json
M    package.json
M    src/wp-includes/assets/script-loader-packages.php
M    src/wp-includes/block-supports/colors.php
AM   src/wp-includes/block-supports/elements.php
D    src/wp-includes/block-supports/padding.php
AM   src/wp-includes/block-supports/spacing.php
M    src/wp-includes/block-supports/typography.php
M    src/wp-includes/blocks/column/block.json
M    src/wp-includes/blocks/index.php
D    src/wp-includes/blocks/post-author
D    src/wp-includes/blocks/post-author.php
M    src/wp-includes/blocks/post-content.php
M    src/wp-includes/blocks/post-featured-image.php
M    src/wp-includes/blocks/query/block.json
M    src/wp-includes/blocks/query-loop/block.json
M    src/wp-includes/blocks/query-loop.php
M    src/wp-includes/blocks/query-pagination/block.json
M    src/wp-includes/blocks/query-pagination-next.php
M    src/wp-includes/blocks/query-pagination-numbers.php
M    src/wp-includes/blocks/site-tagline/block.json
M    src/wp-includes/blocks/site-title/block.json
M    src/wp-includes/blocks.php
M    src/wp-settings.php
M    tests/phpunit/tests/blocks/block.php
M    tools/webpack/packages.js


git-svn-id: https://develop.svn.wordpress.org/trunk@50945 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-21 10:12:42 +00:00
Anthony Burchell
5a2c3706ee Media: Introduces image_editor_output_format filter for setting default MIME type of sub size image output.
This change introduces the `image_editor_output_format` filter, which fires as sub size images are generated allowing to define a default image MIME type for those items.

Props adamsilverstein, williampatton, spacedmonkey, mikeschroder, hellofromTonya, justinahinon, Boniu91, antpb, SergeyBiryukov.
Fixes #52867.



git-svn-id: https://develop.svn.wordpress.org/trunk@50943 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 22:14:47 +00:00
Kelly Choyce-Dwan
1ea3c49436 Administration: List Tables: Wrap long search terms onto a new line.
Props sumitsingh, audrasjb, justinahinon, sahilmepani, hareesh-pillai.
Fixes #52749.



git-svn-id: https://develop.svn.wordpress.org/trunk@50942 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 19:08:37 +00:00
Greg Ziółkowski
fb7ecd92ac Editor: Update lodash to the latest version 4.17.21
It aligns with the version that Gutenberg uses.

Props peterwilsoncc.
See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50941 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 13:00:08 +00:00
Marius L. J
556ee6cd18 Site Health: Skip REST tests during scheduled events.
This change fixes a false positive that would appear during scheduled events, by only running the REST test when a user visits the Site Health page, meaning an active session is available.

The test checking if the REST API is available, includes a parameter for `context=edit` to make sure the block editor can function properly. This means a user session with editor capabilities is required for the test to pass, which is not the case during a scheduled event.

Props szaqal21, TimothyBlynJacobs, hermpheus.
Fixes #52112.

git-svn-id: https://develop.svn.wordpress.org/trunk@50939 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 11:08:15 +00:00
Peter Wilson
b99332d260 Menus: Do not auto-set locations for new menus.
Do not auto-set new menus to all vacant locations on the Appearance > Menus screen in the dashboard.

Follow up to [48051].

Props Chouby, audrasjb, davidbaumwald, mukesh27.
Fixes #52949.



git-svn-id: https://develop.svn.wordpress.org/trunk@50938 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 04:51:16 +00:00
Sergey Biryukov
3da0ccdc95 General: Ensure consistent type for integer properties of a bookmark object.
Previously, these properties could be unexpectedly converted to strings in some contexts.

This applies to the following function:

* `sanitize_bookmark_field()`

and the following properties:

* `$bookmark::link_id`
* `$bookmark::link_rating`

Follow-up to [50935].

See #53235.

git-svn-id: https://develop.svn.wordpress.org/trunk@50936 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-20 00:03:04 +00:00
Sergey Biryukov
110f132f7e General: Ensure consistent type for integer properties of WP_Post, WP_Term, and WP_User.
Previously, these properties could be unexpectedly converted to strings in some contexts.

This applies to the following functions:

* `sanitize_post_field()`
* `sanitize_term_field()`
* `sanitize_user_field()`

and the following properties:

* `WP_Post::ID`
* `WP_Post::post_parent`
* `WP_Post::menu_order`
* `WP_Term::term_id`
* `WP_Term::term_taxonomy_id`
* `WP_Term::parent`
* `WP_Term::count`
* `WP_Term::term_group`
* `WP_User::ID`

Props grantmkin, SergeyBiryukov.
Fixes #53235. See #52995.

git-svn-id: https://develop.svn.wordpress.org/trunk@50935 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 22:10:58 +00:00
Jonathan Desrosiers
2207c248f0 Script Loader: Stop loading polyfills specific to Internet Explorer
This change removes the inline JavaScript attached to the `wp-polyfill` script responsible for loading polyfill libraries included specifically for Internet Explorer support.

Support for the final version of IE supported in WordPress Core (IE11) was removed in [50784] and will on longer be supported when the next version of WordPress is released.

These scripts are still registered and available to be enqueued, but WordPress will no longer load them by default.

For more information, see https://wordpress.org/news/2021/05/dropping-support-for-internet-explorer-11/.

Props youknowriad, gziolo, sergiomdgomes, desrosj.
Fixes #53078.

git-svn-id: https://develop.svn.wordpress.org/trunk@50934 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 19:59:55 +00:00
David Baumwald
d52fa9312c Twenty Twenty: Correct label attribute references to aria_label in get_search_form.
In the bundled Twenty Twenty theme, a `label` argument was passed to `get_search_form` but used as the `aria_label` on the form.  This change updates the argument name to `aria_label` and maintains backwards compatibility for usage of the original `label` argument.

Props poena, sabernhardt, ipulc2, kishanjasani, mukesh27.
Fixes #51877.

git-svn-id: https://develop.svn.wordpress.org/trunk@50933 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 18:38:53 +00:00
Sergey Biryukov
9d0cf7b4b1 App Passwords: Use "sites" terminology instead of "blogs" in application passwords help text.
Follow-up to [49270].

Props jeremy80, johnbillion, audrasjb.
Fixes #53225.

git-svn-id: https://develop.svn.wordpress.org/trunk@50932 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 18:16:12 +00:00
David Baumwald
07ce792fd6 I18N: Combine escaping and translation functions.
There are a few instances where two separate functions are used for both escaping and translating output.  This change combines the two functions into the appropriate Core helper function.

Props dimadin, SergeyBiryukov.
Fixes #53153.

git-svn-id: https://develop.svn.wordpress.org/trunk@50931 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 18:09:27 +00:00
Greg Ziółkowski
585f62ad8c Editor: Update WordPress packages published for Gutenberg 10.6
It contains several changes in addition to regular update to WordPress packages:
- All newly exposed blocks are now registered on the server.
- Dutone block support was added.
- Border block support was updated.
- New shared function `construct_wp_query_args` was added for the family of Query blocks - it might need some further work.

Props youknowriad.
See #52991.




git-svn-id: https://develop.svn.wordpress.org/trunk@50929 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 15:07:55 +00:00
Greg Ziółkowski
a805b90f45 Docs: Include @since in register_block_type definition
See #53233.



git-svn-id: https://develop.svn.wordpress.org/trunk@50928 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 13:58:52 +00:00
Greg Ziółkowski
6ad4e34c54 Editor: Extend register_block_type to accept the path file or folder with block.json
Rather than using two distinct methods to register block types in WordPress core, let's make `register_block_type` the canonical method to deal with all use cases. In practice, the patch proposed extends its usage to work as a proxy to `register_block_type_from_metadata`. It should remove some confusion that we observed and let us be more explicit what's the latest recommendation.

Props matveb, mcsf.
Fixes #53233.



git-svn-id: https://develop.svn.wordpress.org/trunk@50927 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-19 13:50:09 +00:00
Sergey Biryukov
00824d128a Twenty Nineteen: Update theme information in the package.json file.
This removes references to the archived Git repository and updates the URLs to point to the theme's WordPress.org Theme Directory URL and Trac.

Follow-up to [50924].

See #53196.

git-svn-id: https://develop.svn.wordpress.org/trunk@50925 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-18 12:47:37 +00:00
Sergey Biryukov
0900cb8144 Twenty Twenty: Update theme information in the package.json file.
This removes references to the archived Git repository and updates the URLs to point to the theme's WordPress.org Theme Directory URL and Trac.

Props arkrs, desrosj, mukesh27.
Fixes #53196.

git-svn-id: https://develop.svn.wordpress.org/trunk@50924 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-18 12:46:01 +00:00
Sergey Biryukov
8e498a8314 KSES: Allow calc() and var() values to be used in inline CSS.
Props aristath, displaynone, joyously, olafklejnstrupjensen, sabernhardt, jamesbonham, poena.
Fixes #46197, #46498.

git-svn-id: https://develop.svn.wordpress.org/trunk@50923 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 21:03:56 +00:00
Sergey Biryukov
15dffe06c8 KSES: Remove duplicate object-position property.
As part of some recent changes, the property was added to the list of safe CSS properties twice.

Follow-up to [50634], [50761].

See #52991.

git-svn-id: https://develop.svn.wordpress.org/trunk@50922 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 20:47:00 +00:00
Sergey Biryukov
0f45b89ffd Plugins: Add support for Update URI header.
This allows third-party plugins to avoid accidentally being overwritten with an update of a plugin of a similar name from the WordPress.org Plugin Directory.

Additionally, introduce the `update_plugins_{$hostname}` filter, which third-party plugins can use to offer updates for a given hostname.

If set, the `Update URI` header field should be a URI and have a unique hostname.

Some examples include:

* `https://wordpress.org/plugins/example-plugin/`
* `https://example.com/my-plugin/`
* `my-custom-plugin-name`

`Update URI: false` also works, and unless there is code handling the `false` hostname, the plugin will never get an update notification.

If the header is present, the WordPress.org API will currently only return updates for the plugin if it matches the following format:

* `https://wordpress.org/plugins/{$slug}/`
* `w.org/plugin/{$slug}`

If the header has any other value, the API will not return a result and will ignore the plugin for update purposes.

Props dd32, DavidAnderson, meloniq, markjaquith, DrewAPicture, mweichert, design_dolphin, filosofo, sean212, nhuja, JeroenReumkens, infolu, dingdang, joyously, earnjam, williampatton, grapplerulrich, markparnell, apedog, afragen, miqrogroove, rmccue, crazycoders, jdgrimes, damonganto, joostdevalk, jorbin, georgestephanis, khromov, GeekStreetWP, jb510, Rarst, juliobox, Ipstenu, mikejolley, Otto42, gMagicScott, TJNowell, GaryJ, knutsp, mordauk, nvartolomei, aspexi, chriscct7, benoitchantre, ryno267, lev0, gregorlove, dougwollison, SergeyBiryukov.
See #14179, #23318, #32101.

git-svn-id: https://develop.svn.wordpress.org/trunk@50921 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 17:02:49 +00:00
Greg Ziółkowski
0b6eb8daba Editor: Remove editor type specific filters for block editor configuration
Aligns with changes introduced in the Gutenberg plugin. The planned follow-up replace the editor name string with a context object to bring back an optional reference to the actual post.

Props youknowriad.
See #52920.



git-svn-id: https://develop.svn.wordpress.org/trunk@50920 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 15:06:27 +00:00
Greg Ziółkowski
d9f169a02a Editor: Rename should_load_separate_core_block_assets for consistency
Changes introduced:
- The `wp_should_load_separate_core_block_assets` function.
- The `should_load_separate_core_block_assets` filter.

Props hellofromTonya, SergeyBiryukov.
Fixes #50328.



git-svn-id: https://develop.svn.wordpress.org/trunk@50919 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-17 14:26:53 +00:00