This resets the main query variable, `$wp_the_query` during the `WP_UnitTestCase_Base::tear_down` method that runs after each PHPUnit test. This ensures any changes to the main query object is reset after each test to avoid cross contamination between tests, similar to how other globals are reset.
Props flixos90, spacedmonkey, joemcgill.
Fixes#58776.
Built from https://develop.svn.wordpress.org/trunk@56212
git-svn-id: http://core.svn.wordpress.org/trunk@55724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset modifies how the `dashicons-external` icon is used in external links by editing its styles and adding a space between the text and the icon
for better accessibility.
Props SergeyBiryukov, afercia, isabel_brison, mukesh27, sabernhardt, oglekler, audrasjb.
Fixes#47303.
Built from https://develop.svn.wordpress.org/trunk@56211
git-svn-id: http://core.svn.wordpress.org/trunk@55723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a global, `$_wp_current_template_id`, to allow the 'Edit site' link in the admin bar to be aware of the current template and pass it to the Site Editor, so it can load the appropriate one directly.
See https://github.com/WordPress/gutenberg/issues/37850 for further discussion.
Props Mamaduka, poena, abitofmind, audrasjb, mikinc860, alexstine, annezazu, beckej, jameskoster, bacoords, clubkert, paaljoachim, get_dave, priethor, skorasaurus.
Fixes#58746.
Built from https://develop.svn.wordpress.org/trunk@56209
git-svn-id: http://core.svn.wordpress.org/trunk@55721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update the Pattern post type `edit_item` label to be `Edit Block Pattern` instead of `Edit Pattern` so Chrome doesn’t open the translation modal.
Props andrewserong,, ramonopoly, eric.7186, audrasjb, wildworks, Toro_Unit.
Fixes#58716.
Built from https://develop.svn.wordpress.org/trunk@56200
git-svn-id: http://core.svn.wordpress.org/trunk@55712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a nonce so that activation works for block theme previews. Temporary fix until there is a REST API endpoint for activating themes.
Props scruffian, peterwilsoncc, nithins53, nithi22, jomonthomaslobo1, poena, syamraj24, vivekawsm, mrinal013.
Fixes#58712.
Built from https://develop.svn.wordpress.org/trunk@56199
git-svn-id: http://core.svn.wordpress.org/trunk@55711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve logic in `wp_theme_has_theme_json()` to improve caching soo it takes into account that a theme can be switched. Before this function would overly cache if the current theme has a theme.json file. Now it use the value of `get_stylesheet()` as a key to an array. This way, if the value of stylesheet is changed, by either a filter or in a unit test, a new check to see if the file exists is run. For this reason, the workaround to check if unit tests are running by checking if `WP_RUN_CORE_TESTS` constant exists can be removed.
Props westonruter, spacedmonkey, flixos90.
Fixes#58758.
Built from https://develop.svn.wordpress.org/trunk@56185
git-svn-id: http://core.svn.wordpress.org/trunk@55697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset fixes both `register_block_script_handle()` and `register_block_style_handle()` functions, allowing for child themes to access and utilise
blocks defined in parent themes.
Previously these functions could not handle blocks registered in Parent themes. This changeset fixes the issue by determining whether the given asset path
belongs to either of the template or stylesheet directories (Parent and Child themes respectively) as opposed to just checking using
`get_theme_file_path('')`.
Props jacknotman, Levdbas, audrasjb, guillaumeturpin, leprincenoir, whaze, isabel_brison.
Fixes#57566.
--Cette ligne, et les suivantes ci-dessous, seront ignorées--
M trunk/src/wp-includes/blocks.php
Built from https://develop.svn.wordpress.org/trunk@56183
git-svn-id: http://core.svn.wordpress.org/trunk@55695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset sets default width to `100px` for the Separator block, and sets the Separator block located in the Call to Action block pattern to `wide`.
Props haritpanchal, audrasjb, sakibmd, poena, Rahmohn, mikachan.
Fixes#57667.
Built from https://develop.svn.wordpress.org/trunk@56173
git-svn-id: http://core.svn.wordpress.org/trunk@55685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sets `font-weight: 700` for these elements in the editor, in order to match the front end styles. It overrides the default admin `font-weight` of `600` for
these HTML elements.
Props nkeller15, audrasjb, sabernhardt, pavanpatil1, iamfarhan09, poena.
Fixes#58383.
Built from https://develop.svn.wordpress.org/trunk@56172
git-svn-id: http://core.svn.wordpress.org/trunk@55684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a new Help text for Rollback feature in the WordPress Updates screen. Also adds a link to the "Common Errors" HelpHub documentation page.
Follow-up to [51857].
Props costdev, afragen, audrasjb, kebbet, marybaum.
Fixes#58199.
Built from https://develop.svn.wordpress.org/trunk@56171
git-svn-id: http://core.svn.wordpress.org/trunk@55683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This replaces `add_theme_support( 'experimental-link-color' )` with `add_theme_support( 'link-color' )`, to provide the feature to Twenty Twenty-One users, but
also to avoid throwing a "doing it wrong" message when Gutenberg version 16.2 is active.
Follow-up to [58597].
Props poena.
Fixes#58702.
Built from https://develop.svn.wordpress.org/trunk@56170
git-svn-id: http://core.svn.wordpress.org/trunk@55682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow-up to [56037], as that changeset accidentally did not consider the changes made in [55825]: Images that are programmatically injected into post content (e.g. through a block, or shortcode, or any hook calling a function like `wp_get_attachment_image()`) must be treated as part of the whole post content blob since otherwise the heuristics for applying `fetchpriority="high"` and `loading="lazy"` are skewed by parsing certain images before others rather than sequentially parsing the entire post content. [55825] addressed that for lazy-loading, but when [56037] introduced `fetchpriority` support, the related refactor missed making the same consideration for that attribute.
Props flixos90, spacedmonkey, thekt12, mukesh27.
Fixes#58235.
See #58089.
Built from https://develop.svn.wordpress.org/trunk@56164
git-svn-id: http://core.svn.wordpress.org/trunk@55676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Correctly return the existing autosave when an unchanged autosave is saved, instead of returning an error.
Fix regressions after r55154 where an error and not the original autosave was returned when saving with unchanged data (for example, clicking the preview button repeatedly). Returning the autosave (ID) is the expected behavior for the endpoint.
Follow up to [55154]
Props Mamaduka, jeroenrotty, mrfoxtalbot.
Fixes#58739.
Built from https://develop.svn.wordpress.org/trunk@56163
git-svn-id: http://core.svn.wordpress.org/trunk@55675 1a063a9b-81f0-0310-95a4-ce76da25c4cd