In `WP_Theme_JSON::get_block_nodes()`, remove redundant check for `$theme_json['styles']`, which means `WP_Theme_JSON::get_blocks_metadata()` is only called if necessary.
Also skip unnecessary `$selector` assignment if only nodes are to be returned.
Props ramonopoly, mukesh27.
Fixes #62234.
Built from https://develop.svn.wordpress.org/trunk@59262
git-svn-id: http://core.svn.wordpress.org/trunk@58654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Loads the font family files from style variations defined within a theme for user in the site and post editors. This is to ensure the fonts are shown while editing without the need for a reload after switching styles.
Props ironprogrammer, mmaattiiaass.
Fixes#62231.
Built from https://develop.svn.wordpress.org/trunk@59260
git-svn-id: http://core.svn.wordpress.org/trunk@58652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes a fatal error in `array_keys()` (PHP 8.0+) as `$wp_filesystem->dirlist()` will return `false` when the source directory doesn't exist or becomes unreadable for some reason.
Props: verygoode, lifelightweb, da5f656f, costdev, afragen, azaozz
Fixes#61114
Built from https://develop.svn.wordpress.org/trunk@59257
git-svn-id: http://core.svn.wordpress.org/trunk@58649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This caches the generated CSS from block nodes in merged Theme JSON data to avoid repeated costly operations required to compute style properties for blocks. The generated CSS is saved to a transient that expires every hour.
This is a follow-up that reimplements [58334], which was previously reverted in [58710].
Props thekt12, spacedmonkey, pereirinha, mukesh27, isabel_brison, oandregal, andrewserong, ramonjd, joemcgill, costdev, aaronrobertshaw, peterwilsoncc.
Fixes#61679. See #59595.
Built from https://develop.svn.wordpress.org/trunk@59256
git-svn-id: http://core.svn.wordpress.org/trunk@58648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[59252] made the path filtering a bit too broad for the Test Old Branches workflow.
Though `v3` of the reusable PHPUnit workflow is used by some older branches, this version is updated much more frequently because it’s the latest version.
To limit the number of times this workflow runs, old branches should only be tested when old versions of the workflow are updated.
Follow up to [59252].
See #61564.
Built from https://develop.svn.wordpress.org/trunk@59254
git-svn-id: http://core.svn.wordpress.org/trunk@58646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Some GitHub Action workflows use the `paths` filter to limit when workflows run for pull requests. This helps avoid running workflows unnecessarily when the pull request does not change any relevant code.
Currently, a few of these workflows are configured to run when any `.yml` file in the `.github/workflows/` directory is changed. This updates those workflows to target more specific workflow files for more efficient running.
See #61564.
Built from https://develop.svn.wordpress.org/trunk@59252
git-svn-id: http://core.svn.wordpress.org/trunk@58644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This switches from using the `test`/`cp` commands when copying the `.env.example` file to using `node:fs`. `test` and `cp` are not available on Windows machines.
This also adds the `.env` file to the `svn:ignore` list to prevent it from being committed accidentally.
Follow up to [59038].
Props afercia, Clorith, poena.
Fixes#52668.
Built from https://develop.svn.wordpress.org/trunk@59249
git-svn-id: http://core.svn.wordpress.org/trunk@58641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix an issue where Imagick did not properly set image quality for AVIF images. Adds a call to `setCompressionQuality` where we currently call `setImageCompressionQuality`
Props: jamesosborne, adamsilverstein, mukeshpanchal27.
Fixes: #61614.
Built from https://develop.svn.wordpress.org/trunk@59247
git-svn-id: http://core.svn.wordpress.org/trunk@58639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Load block patterns for bundled themes on the `init` hook to avoid triggering notices caused by loading the translations too early.
The change is applied to Twenty Ten, Twenty Twelve, Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen and Twenty Twenty.
Props domainsupport, swissspidy.
Fixes#62237.
See #44937.
Built from https://develop.svn.wordpress.org/trunk@59244
git-svn-id: http://core.svn.wordpress.org/trunk@58636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes:
* Moving `@covers` tags to the class-level DocBlock, since this is the only function tested in the class.
* Adjusting the assertion messages for clarity, as `rss_enclosure()` does not return anything directly.
* Using a static closure for improved performance.
Follow-up to [59241].
See #61530.
Built from https://develop.svn.wordpress.org/trunk@59243
git-svn-id: http://core.svn.wordpress.org/trunk@58635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Relocate the defintion of `absint()` to `load.php` to allow it to be available to `get_current_blog_id()` and `get_current_network_id()`. These functions may be called by caching drop-ins, prior to the loading of `functions.php`.
Props flixos90, geekofshire, johnjamesjacoby, sergeybiryukov, wonderboymusic.
Fixes#40682.
Built from https://develop.svn.wordpress.org/trunk@59242
git-svn-id: http://core.svn.wordpress.org/trunk@58634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent possible PHP warnings caused by malformed enclosure meta data. This change ensures the enclosure meta data has at least three lines of text before generating the tag in `rss_enclosure()`.
Props arypneta, johnjamesjacoby, nihar007, rahmohn, rghedin, zahardoc.
Fixes#58798.
Built from https://develop.svn.wordpress.org/trunk@59241
git-svn-id: http://core.svn.wordpress.org/trunk@58633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There is a bug where the attributes panel is not shown in custom post types. This is caused because each post type can define a capability_type, which by default is post, so the logic to map the capabilities wasn't correct and it was returning false.
Props santosguillamot, cbravobernal.
Fixes#62226.
Built from https://develop.svn.wordpress.org/trunk@59239
git-svn-id: http://core.svn.wordpress.org/trunk@58631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Bootstrap block bindings sources earlier in the process through an inline script to ensure they are available when developers want to extend them in the client. Following the same pattern other APIs like registering block types are doing.
Props santosguillamot, cbravobernal, gziolo.
Fixes#6225.
Built from https://develop.svn.wordpress.org/trunk@59238
git-svn-id: http://core.svn.wordpress.org/trunk@58630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates `update_post_thumbnail_cache()` to account for `WP_Query` objects that only contain the post ID field rather than the entire post object.
This changes passes the `$post` value to `get_post_thumbnail_id()` rather than assuming the presence of the ID property. Additionally, the posts to which the thumbnail is attached are now primed prior to calling the function to avoid numerous unnecessary database queries.
The test `WP_Test_REST_Posts_Controller::test_get_items_primes_parent_post_caches()` is modified to account for an order of operations change for the priming of post meta caches. The cache is no longer primed in the final call to `update_meta_cache()` so the tests need to account for the post meta to be primed in any call to the function.
Props antpb, jorbin, khokansardar, linsoftware, mukesh27, oglekler, rajinsharwar, sumitsingh, xendo.
Fixes#59521.
Built from https://develop.svn.wordpress.org/trunk@59235
git-svn-id: http://core.svn.wordpress.org/trunk@58627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introducing the new content for the 6.7 About page. As with the last release, this About page has a simple layout, and links off to WordPress.org for a full overview.
Props ndiego, annezazu, provenself, ryelle, joen, parinpanjari.
See #61961.
Built from https://develop.svn.wordpress.org/trunk@59234
git-svn-id: http://core.svn.wordpress.org/trunk@58626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This merges the latest improvements to the Twenty Twenty-Five theme from GitHub into `trunk` for 6.7 beta 3.
A full list of changes can be found on GitHub: [0d8b245021...5d17f41da8 WordPress/twentytwentyfive@0d8b245...5d17f41]
Props annezazu, areziaal, beafialho, cwhitmore, franz00, get_dave, joedolson, joen, juanfra, karmatosed, kartikmehta, mukesh27, onemaggie, pgeorgiev, poena, richtabor, sudipatel007, sumitbagthariya16, wildworks, youknowriad.
Fixes#62218.
Built from https://develop.svn.wordpress.org/trunk@59233
git-svn-id: http://core.svn.wordpress.org/trunk@58625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This removes a redundant check for a falsey value, which is equivalent to the `empty()` check directly before.
Includes minor adjustments in the unit test:
* Adding a `@covers` tag.
* Correcting the description for clarity.
* Using `assertSame()` for strict type checking.
Follow-up to [59216].
See #60299.
Built from https://develop.svn.wordpress.org/trunk@59232
git-svn-id: http://core.svn.wordpress.org/trunk@58624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Currently, `composer update` is run whenever `test:php` is called to ensure the latest versions of `yoast/phpunit-polyfills` and other dependencies are always installed when running the PHPUnit test suite.
For contributors using the local Docker environment to run tests during development, this is unnecessary and can often result in a 30+ second delay every time `test:php` is called.
This moves the command to `env:install`, reducing the number of times `composer update` is run from many to once. Since the environment needs to be started in order to run tests, `env:install` will still confirm that the latest versions of required dependencies are installed and available prior to running the test suite.
Props azaozz, swissspidy, johnbillion, peterwilsoncc, hellofromtonya.
Fixes#57189.
Built from https://develop.svn.wordpress.org/trunk@59231
git-svn-id: http://core.svn.wordpress.org/trunk@58623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces a test to ensure that new bundled themes are included in the `$_new_bundled_files` array. Modifies previous theme related tests added during the 6.7 release cycle to include the correct annotations.
Props peterwilsoncc, mukesh27, costdev.
See #61530, #62103.
Built from https://develop.svn.wordpress.org/trunk@59227
git-svn-id: http://core.svn.wordpress.org/trunk@58619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix a combination of floated and absolutely positioned content that caused previous and next links to be stacked under other content, making them unclickable on mobile devices. Adjust the position of the post date so that focus order matches visible order. Prevent overlap of 'Edit' button on post title.
Props kel-dc, parthvataliya, dhruvang21, sabernhardt, wpeople, itpathsolutions, balub, dilip2615, tirth03.
Fixes#62008.
Built from https://develop.svn.wordpress.org/trunk@59226
git-svn-id: http://core.svn.wordpress.org/trunk@58618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add `aria-labelledby` and `aria-describedby` attributes to revision slider selection handle. Add keyboard `:focus` state to revision slider handle. Move 'multiple revision' checkbox before the buttons panel, matching its visual order. Change diff `Title` and `Content` headings from `h3` to `h2` to correct headings hierarchy.
Props joedolson, rishishah, sarahricker, williamalexander, afercia.
Fixes#52303.
Built from https://develop.svn.wordpress.org/trunk@59225
git-svn-id: http://core.svn.wordpress.org/trunk@58617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change accordions in the customizer and the navigation menus to make proper usage of accordion markup patterns. This includes adding missing `:focus` states, using a `button` element to control tabbing and interaction, instead of the heading elements, and removing instructional text for screen reader users that was used to compensate for the incorrect markup pattern.
Props afercia, rishishah, kushang78, rcreators, krupajnanda, hmbashar, joedolson.
Fixes#42002.
Built from https://develop.svn.wordpress.org/trunk@59224
git-svn-id: http://core.svn.wordpress.org/trunk@58616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In Twenty Nineteen r58580 increased size of avatars. This caused issues with the position of author checkbox. This resolves by moving without impacting the avatar blocks.
Props sabernhardt, nithins53, sudipatel007.
Fixes#62096.
Built from https://develop.svn.wordpress.org/trunk@59222
git-svn-id: http://core.svn.wordpress.org/trunk@58614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The E2E test suite has some basic tests to confirm that the plugin can be activated without conflicts. This works great until the minimum version of WordPress required to run the plugin is raised. Old branches that attempt to run these tests that are newly incompatible with the latest version of the plugin will fail.
This change adds a `gutenberg-version` input to the E2E GitHub Action workflow to allow these tests to continue running with the last compatible version.
Props swissspidy.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@59220
git-svn-id: http://core.svn.wordpress.org/trunk@58613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes an issue after [59170] that was causing the Performance Test workflows to fail on older branches since the `CODEVITALS_PROJECT_TOKEN` input value was marked as required but was not being passed.
This is a follow-up to [59214] and [59215].
Fixes#62153.
Props desrosj, joemcgill, flixos90, swissspidy.
Built from https://develop.svn.wordpress.org/trunk@59217
git-svn-id: http://core.svn.wordpress.org/trunk@58610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When checking for updates to use_ssl, use strings for the comparison values, matching the stored values. Fixes an issue where calls to wp_update_user updated the database meta value for use_ssl even when the value was missing or unchanged.
Props prettyboymp, rajinsharwar, adamsilverstein, johnbillion, rayhatron, mukesh27, joemcgill.
Fixes#60299.
Built from https://develop.svn.wordpress.org/trunk@59216
git-svn-id: http://core.svn.wordpress.org/trunk@58609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes an issue after [59170] that was causing the Performance release workflows to fail on older branches since the `CODEVITALS_PROJECT_TOKEN` input value was marked as required but was not being passed.
Fixes#62153.
Props desrosj, joemcgill, flixos90.
Built from https://develop.svn.wordpress.org/trunk@59214
git-svn-id: http://core.svn.wordpress.org/trunk@58607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The cost of using `WP_Theme_JSON::get_block_nodes()` for this in its original shape was high enough to lead to a performance regression. Therefore this changeset introduces a new option on the method that allows to bypass all logic except for retrieving the node paths, which is much faster and everything that this functionality needs.
Follow up to [58936].
Props mukesh27, flixos90, ramonopoly, joemcgill, andrewserong, swissspidy.
Fixes#61858.
Built from https://develop.svn.wordpress.org/trunk@59213
git-svn-id: http://core.svn.wordpress.org/trunk@58606 1a063a9b-81f0-0310-95a4-ce76da25c4cd