script-loader.php is sometimes called directly and in these situations, the Theme_JSON_Resolver class was not defined.
Props nosolosw, noisysocks.
Fixes#53175.
git-svn-id: https://develop.svn.wordpress.org/trunk@51001 602fd350-edb4-49c9-b593-d223f7449a82
This updates route arguments and schema descriptions to use more specific object types for clarity.
Follow-up to [39342].
Props lephleg, jnylen0.
Fixes#40720.
git-svn-id: https://develop.svn.wordpress.org/trunk@51000 602fd350-edb4-49c9-b593-d223f7449a82
This makes it easier to view the post on the front end of the site when moderating comments, without having to open the editor first.
Props trejder, audrasjb, vladytimy, lukecarbis, ayeshrajans, chaion07, paaljoachim, hareesh-pillai, SergeyBiryukov.
Fixes#52353.
git-svn-id: https://develop.svn.wordpress.org/trunk@50999 602fd350-edb4-49c9-b593-d223f7449a82
Moves the widgets block editor from Gutenberg into WordPress Core.
- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
@wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
editor control depending on wp_use_widgets_block_editor().
Follows [50996] which was missing these files.
See #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.
git-svn-id: https://develop.svn.wordpress.org/trunk@50997 602fd350-edb4-49c9-b593-d223f7449a82
Moves the widgets block editor from Gutenberg into WordPress Core.
- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
@wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
editor control depending on wp_use_widgets_block_editor().
Fixes#51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.
git-svn-id: https://develop.svn.wordpress.org/trunk@50996 602fd350-edb4-49c9-b593-d223f7449a82
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.
Fixes#41683.
Props TimothyBlynJacobs, spacedmonkey, zieladam, jorgefilipecosta, youknowriad, kevin940726.
git-svn-id: https://develop.svn.wordpress.org/trunk@50995 602fd350-edb4-49c9-b593-d223f7449a82
Adds the sidebars, widgets and widget-types REST API endpoints from the
Gutenberg plugin.
Fixes#41683.
Props TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@50993 602fd350-edb4-49c9-b593-d223f7449a82
Historically, the block editor has been opinionated about the size of the canvas and the alignments.
Themes with theme.json will have to define a "layout" in their settings and the classic stylesheet won't be loaded anymore for this.
Props nosolosw.
See #53175.
git-svn-id: https://develop.svn.wordpress.org/trunk@50992 602fd350-edb4-49c9-b593-d223f7449a82
The layout block allows containers to define the size of their inner blocks
and the allowed allignments.
It's only enabled for themes with theme.json files.
Props nosolosw.
See #53175.
git-svn-id: https://develop.svn.wordpress.org/trunk@50991 602fd350-edb4-49c9-b593-d223f7449a82
The PHPUnit 7.5+ method `assertEqualsWithDelta()` was polyfilled for PHPUnit < 7.5, but also overloaded for PHPUnit 7.5 itself, which was not necessary and created a higher chance of signature conflicts, especially when the WP test suite is used as a basis for integration tests with plugins/themes.
This change removes the unnecessary overloading for PHPUnit 7.5+ and simplifies the overloaded method for PHPUnit < 7.5, including removing the `IsEqual()` class alias declaration, no longer needed.
Follow-up to [48952].
Props jrf.
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50986 602fd350-edb4-49c9-b593-d223f7449a82
Used `hashed` IDs rather the `named` IDs to reduce file size and remove references to non-existent paths in the final build.
Follow-up for [50940,50984].
Props gziolo, peterwilsoncc.
See #53192.
git-svn-id: https://develop.svn.wordpress.org/trunk@50985 602fd350-edb4-49c9-b593-d223f7449a82
Always test for newer class names first and fall back to the older.
This improves compatibility when running PHPUnit via a phar while there is also a Composer-installed version of PHPUnit on the system.
Props jrf.
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50982 602fd350-edb4-49c9-b593-d223f7449a82
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
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
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
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
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
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
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
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
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
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
* 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
* 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
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
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@50960 602fd350-edb4-49c9-b593-d223f7449a82
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
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
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
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
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
* 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
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
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