Commit Graph

43773 Commits

Author SHA1 Message Date
Sergey Biryukov
bd5322c635 Tests: Remove trailing commas in function calls in _wp_array_get() tests.
This fixes parse errors on PHP 7.2 and lower versions.

Follow-up to [49143], [49144], [49580], [50964].

See #51461, #51720, #52625.
Built from https://develop.svn.wordpress.org/trunk@50970


git-svn-id: http://core.svn.wordpress.org/trunk@50579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:47:56 +00:00
Sergey Biryukov
09177b1965 Tests: Rename classes in phpunit/tests/privacy/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50969


git-svn-id: http://core.svn.wordpress.org/trunk@50578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:38:58 +00:00
Sergey Biryukov
f6114ba4b4 Tests: Rename some classes in phpunit/tests/theme/ per the naming conventions.
https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967].

See #52625.
Built from https://develop.svn.wordpress.org/trunk@50968


git-svn-id: http://core.svn.wordpress.org/trunk@50577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:32:56 +00:00
Sergey Biryukov
19ea4bd412 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.
Built from https://develop.svn.wordpress.org/trunk@50967


git-svn-id: http://core.svn.wordpress.org/trunk@50576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 13:25:56 +00:00
Sergey Biryukov
645fffca13 Tests: Correct description for the Tests_Functions_wpArraySet class.
Follow-up to [50958], [50962], [50964], [50965].

See #53175, #52625.
Built from https://develop.svn.wordpress.org/trunk@50966


git-svn-id: http://core.svn.wordpress.org/trunk@50575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 12:28:54 +00:00
Sergey Biryukov
8f47c944d8 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.
Built from https://develop.svn.wordpress.org/trunk@50965


git-svn-id: http://core.svn.wordpress.org/trunk@50574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 12:25:55 +00:00
Sergey Biryukov
935ab6ecca Tests: Add missing tests for the _wp_array_get() function.
Follow-up to [49143], [49144], [49580].

Props jorgefilipecosta, johnbillion.
See #51461, #51720, #52625.
Built from https://develop.svn.wordpress.org/trunk@50964


git-svn-id: http://core.svn.wordpress.org/trunk@50573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 11:07:55 +00:00
gziolo
a380cdd21a Editor: Remove unused param in get_default_block_editor_settings
Follow-up for [50776].

Props nosolosw.
See #52920.



Built from https://develop.svn.wordpress.org/trunk@50963


git-svn-id: http://core.svn.wordpress.org/trunk@50572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 10:23:56 +00:00
gziolo
75f4e848f5 Editor: Rename the unit test file for _wp_array_set function
Follow-up [50958].
See #53175. 


Built from https://develop.svn.wordpress.org/trunk@50962


git-svn-id: http://core.svn.wordpress.org/trunk@50571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:59:56 +00:00
Sergey Biryukov
aabce962ae 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.
Built from https://develop.svn.wordpress.org/trunk@50961


git-svn-id: http://core.svn.wordpress.org/trunk@50570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:51:56 +00:00
gziolo
3143af5910 Editor: Fix failing unit test for i18n support in theme.json
As part of the change, I also did some code reorganization to match with how other test fixtures are handled.

Follow-up [50959].

See #52991.


Built from https://develop.svn.wordpress.org/trunk@50960


git-svn-id: http://core.svn.wordpress.org/trunk@50569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:50:59 +00:00
youknowriad
4e1dc7a28c 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.

Built from https://develop.svn.wordpress.org/trunk@50959


git-svn-id: http://core.svn.wordpress.org/trunk@50568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 08:37:55 +00:00
youknowriad
6c0578055c 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.

Built from https://develop.svn.wordpress.org/trunk@50958


git-svn-id: http://core.svn.wordpress.org/trunk@50567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 08:30:56 +00:00
gziolo
3989828e0b Editor: Add missing class WP_Block_Editor_Context
Follow-up for [50956].
See #52920.


Built from https://develop.svn.wordpress.org/trunk@50957


git-svn-id: http://core.svn.wordpress.org/trunk@50566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 07:38:58 +00:00
gziolo
4ae98860b9 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.



Built from https://develop.svn.wordpress.org/trunk@50956


git-svn-id: http://core.svn.wordpress.org/trunk@50565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 07:32:55 +00:00
gziolo
f8286bbd4d Editor: Add missing unit tests for block_has_support
Follow-up for [50761].
Props ntsekouras.
Fixes #53257. See #52991.


Built from https://develop.svn.wordpress.org/trunk@50955


git-svn-id: http://core.svn.wordpress.org/trunk@50564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 06:26:58 +00:00
Peter Wilson
5ce6da1a31 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.


Built from https://develop.svn.wordpress.org/trunk@50954


git-svn-id: http://core.svn.wordpress.org/trunk@50563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 02:18:58 +00:00
Sergey Biryukov
7670b7dca8 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.
Built from https://develop.svn.wordpress.org/trunk@50953


git-svn-id: http://core.svn.wordpress.org/trunk@50562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-23 08:51:58 +00:00
Sergey Biryukov
1e02e0f049 Docs: Use 3-digit, x.x.x-style semantic versioning for two _doing_it_wrong() calls.
Follow-up to [37985], [38420], [39021].

See #52628.
Built from https://develop.svn.wordpress.org/trunk@50952


git-svn-id: http://core.svn.wordpress.org/trunk@50561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-22 13:09:56 +00:00
Sergey Biryukov
5ffa346fd0 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.
Built from https://develop.svn.wordpress.org/trunk@50951


git-svn-id: http://core.svn.wordpress.org/trunk@50560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-22 13:00:02 +00:00
youknowriad
e0d91e047b 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.

Built from https://develop.svn.wordpress.org/trunk@50950


git-svn-id: http://core.svn.wordpress.org/trunk@50559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 15:57:56 +00:00
Adam Silverstein
5ddc1fb946 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.


Built from https://develop.svn.wordpress.org/trunk@50949


git-svn-id: http://core.svn.wordpress.org/trunk@50558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 15:29:55 +00:00
youknowriad
b2e311b85d 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.

Built from https://develop.svn.wordpress.org/trunk@50948


git-svn-id: http://core.svn.wordpress.org/trunk@50557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 11:13:57 +00:00
Sergey Biryukov
977e81b1a1 Text Changes: Improve the wording of some error messages.
Props dartiss, williampatton, johnbillion, SergeyBiryukov.
Fixes #50382.
Built from https://develop.svn.wordpress.org/trunk@50947


git-svn-id: http://core.svn.wordpress.org/trunk@50556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:49:57 +00:00
Sergey Biryukov
cbcd3ffef3 Boostrap/Load: Further update the language in wp-config-sample.php.
This restores "That's all, stop editing!" line to its previous format, to avoid breaking external integrations looking for that format specifically.

Follow up to [50915], [50917], [50918].

Props swissspidy, schlessera.
Fixes #37199.
Built from https://develop.svn.wordpress.org/trunk@50946


git-svn-id: http://core.svn.wordpress.org/trunk@50555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:40:56 +00:00
youknowriad
a225c5cdc6 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

Built from https://develop.svn.wordpress.org/trunk@50945


git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 10:14:23 +00:00
gziolo
40eb9c9f9c Editor: Add missing unit tests for construct_wp_query_args
Follow-up for [50929].
Props ntsekouras, jorbin.
Fixes #53240. See #52991.


Built from https://develop.svn.wordpress.org/trunk@50944


git-svn-id: http://core.svn.wordpress.org/trunk@50553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 06:29:57 +00:00
antpb
8284a1f6ae 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.


Built from https://develop.svn.wordpress.org/trunk@50943


git-svn-id: http://core.svn.wordpress.org/trunk@50552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 22:15:56 +00:00
ryelle
48660b62b6 Administration: List Tables: Wrap long search terms onto a new line.
Props sumitsingh, audrasjb, justinahinon, sahilmepani, hareesh-pillai.
Fixes #52749.


Built from https://develop.svn.wordpress.org/trunk@50942


git-svn-id: http://core.svn.wordpress.org/trunk@50551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 19:09:59 +00:00
gziolo
c7acbeda19 Editor: Update lodash to the latest version 4.17.21
It aligns with the version that Gutenberg uses.

Props peterwilsoncc.
See #52991.


Built from https://develop.svn.wordpress.org/trunk@50941


git-svn-id: http://core.svn.wordpress.org/trunk@50550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 13:02:17 +00:00
gziolo
6e4458c935 Build: Use hashed/deterministic moduleIDs in webpack config
Props peterwilsoncc, desrosj.
Fixes #53192.


Built from https://develop.svn.wordpress.org/trunk@50940


git-svn-id: http://core.svn.wordpress.org/trunk@50549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 12:20:04 +00:00
Clorith
c47c99900c 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.
Built from https://develop.svn.wordpress.org/trunk@50939


git-svn-id: http://core.svn.wordpress.org/trunk@50548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 11:09:56 +00:00
Peter Wilson
fabf5334a5 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.


Built from https://develop.svn.wordpress.org/trunk@50938


git-svn-id: http://core.svn.wordpress.org/trunk@50547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 04:52:56 +00:00
Sergey Biryukov
cf90ff2427 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.
Built from https://develop.svn.wordpress.org/trunk@50936


git-svn-id: http://core.svn.wordpress.org/trunk@50545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 00:04:56 +00:00
Sergey Biryukov
893beee31e 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.
Built from https://develop.svn.wordpress.org/trunk@50935


git-svn-id: http://core.svn.wordpress.org/trunk@50544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 22:11:56 +00:00
desrosj
4a20a75fa1 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.
Built from https://develop.svn.wordpress.org/trunk@50934


git-svn-id: http://core.svn.wordpress.org/trunk@50543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 20:00:57 +00:00
davidbaumwald
77cf4ea88d 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.
Built from https://develop.svn.wordpress.org/trunk@50933


git-svn-id: http://core.svn.wordpress.org/trunk@50542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:39:56 +00:00
Sergey Biryukov
96beaa51d3 App Passwords: Use "sites" terminology instead of "blogs" in application passwords help text.
Follow-up to [49270].

Props jeremy80, johnbillion, audrasjb.
Fixes #53225.
Built from https://develop.svn.wordpress.org/trunk@50932


git-svn-id: http://core.svn.wordpress.org/trunk@50541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:17:56 +00:00
davidbaumwald
f47a74a428 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.
Built from https://develop.svn.wordpress.org/trunk@50931


git-svn-id: http://core.svn.wordpress.org/trunk@50540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:10:59 +00:00
desrosj
77c434e130 Build/Test Tools: Use the new concurrency setting for GitHub Actions.
The new `concurrency` setting can be used to ensure only a single workflow run or job is in progress. When used in combination with the `cancel-in-progress` setting, incomplete workflow runs can be cancelled automatically to prevent running workflows unnecessarily.

The workflows that take longer to run previously had this built into a step and utilized a 3rd-party action. Now that this is natively supported by GitHub Actions, using that is preferred.

This option is currently in beta, but is stable enough to use in our workflows for the time being.

Props ocean90.
Fixes #53080.
Built from https://develop.svn.wordpress.org/trunk@50930


git-svn-id: http://core.svn.wordpress.org/trunk@50539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 17:37:59 +00:00
gziolo
c3ea09ebb8 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.



Built from https://develop.svn.wordpress.org/trunk@50929


git-svn-id: http://core.svn.wordpress.org/trunk@50538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 15:09:27 +00:00
gziolo
087934feea Docs: Include @since in register_block_type definition
See #53233.


Built from https://develop.svn.wordpress.org/trunk@50928


git-svn-id: http://core.svn.wordpress.org/trunk@50537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 14:00:01 +00:00
gziolo
2ca2feff15 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.


Built from https://develop.svn.wordpress.org/trunk@50927


git-svn-id: http://core.svn.wordpress.org/trunk@50536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 13:52:00 +00:00
Sergey Biryukov
2b6cc00455 Tests: Use assertInstanceOf() instead of assertTrue() in some tests.
See #52625.
Built from https://develop.svn.wordpress.org/trunk@50926


git-svn-id: http://core.svn.wordpress.org/trunk@50535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-18 21:06:02 +00:00
Sergey Biryukov
f4631a98f5 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.
Built from https://develop.svn.wordpress.org/trunk@50925


git-svn-id: http://core.svn.wordpress.org/trunk@50534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-18 12:49:01 +00:00
Sergey Biryukov
5343283f66 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.
Built from https://develop.svn.wordpress.org/trunk@50924


git-svn-id: http://core.svn.wordpress.org/trunk@50533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-18 12:47:05 +00:00
Sergey Biryukov
b8487747b8 KSES: Allow calc() and var() values to be used in inline CSS.
Props aristath, displaynone, joyously, olafklejnstrupjensen, sabernhardt, jamesbonham, poena.
Fixes #46197, #46498.
Built from https://develop.svn.wordpress.org/trunk@50923


git-svn-id: http://core.svn.wordpress.org/trunk@50532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 21:04:59 +00:00
Sergey Biryukov
ac943f171a 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.
Built from https://develop.svn.wordpress.org/trunk@50922


git-svn-id: http://core.svn.wordpress.org/trunk@50531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 20:48:01 +00:00
Sergey Biryukov
9fbc705dc0 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.
Built from https://develop.svn.wordpress.org/trunk@50921


git-svn-id: http://core.svn.wordpress.org/trunk@50530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 17:04:01 +00:00
gziolo
ff46fda58d 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.


Built from https://develop.svn.wordpress.org/trunk@50920


git-svn-id: http://core.svn.wordpress.org/trunk@50529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 15:08:00 +00:00