In [53874] the optional `$locale` parameter was added to `load_textdomain()`. While most `load_textdomain()` calls in core were were updated, some were missed. Passing the original locale avoids the need to call `determine_locale()` by `load_textdomain()` which is used as a fallback.
Props ocean90, swissspidy, desrosj.
Fixes#57060.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54795 602fd350-edb4-49c9-b593-d223f7449a82
Prevent term `NOT EXISTS` queries causing `redirect_canonical()` to throw a fatal error in PHP 8 and above, or a warning in earlier versions.
This ensures the `tax_query`'s `terms` property both exists and is countable before attempting to count it.
Props codesdnc, SergeyBiryukov, kadamwhite, costdev, miguelaxcar.
Merges [54785] to the 6.1 branch.
Fixes#55955.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54793 602fd350-edb4-49c9-b593-d223f7449a82
Resolves a fatal error due to `get_template_hierarchy()` due to incompatible older Gutenberg versions.
[54269] introduced this new function for 6.1. This function was introduced in Gutenberg 13.9.0. However, it was not guarded to protect the plugin from when the function was loaded in Core. Gutenberg 14.1.0 added the `function_exists()` wrapper to protect the plugin from the fatal error.
Minimum compatible version:
This commit changes the Gutenberg minimum compatible version number to 14.1. For versions older than 14.1, the plugin will deactivate when upgrading Core to 6.1 or newer.
Function rename:
Past commits renamed the upgrade function by changing Core's version number. This commit renames the function to be generic, i.e. `_upgrade_core_deactivate_incompatible_plugins()` and adopts the `@since [reason]` strategy to track historical changes to the function.
Follow-up to [54269], [52199], [52166], [52165], [51180].
Props namithjawahar, hellofromTonya, azaozz, desrosj, ironprogrammer.
Merges [54789] to the 6.1 branch.
Fixes#56985.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54790 602fd350-edb4-49c9-b593-d223f7449a82
Ensure only full post objects are passed to `update_post_author_caches()` when called within `WP_Query::the_post()`. This prevents an error when starting the Loop for Queries initiated with a subset of fields or IDs only.
Props konyoldeath, dd32, lozula, TimothyBlynJacobs, spacedmonkey, mxbclang, peterwilsoncc.
Merges [54771] to the 6.1 branch.
Fixes#56948.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54784 602fd350-edb4-49c9-b593-d223f7449a82
Revert to legacy database query in `get_pages_by_title()`. Due to the lack of `orderby` clause in the previous database query, it is not possible to gain consistent results by converting the function to a `WP_Query` wrapper.
Reverts [54271, 54242, 54234].
Props Bjorn2404, 10upsimon, dilipbheda, mukesh27, spacedmonkey, TimothyBlynJacobs, rjasdfiii, stentibbing, pbiron, pento.
Merges [54782] to the 6.1 branch.
Fixes#57039, #56991.
See #57041.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54783 602fd350-edb4-49c9-b593-d223f7449a82
Bypass caching within `WP_Query` when the `SELECT` clause has been modified via a filter. This prevents both cache key collisions and the returning of incomplete or unexpected results when the `SELECT` clause has been modified by an extender.
Props pypwalters, claytoncollie, johnwatkins0, TimothyBlynJacobs, costdev, spacedmonkey, peterwilsoncc.
Merges [54768] to the 6.1 branch.
Fixes#57012.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54780 602fd350-edb4-49c9-b593-d223f7449a82
Change `orderby` clause used within `WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles` to `date` to match the `WP_Query` documentation for the parameter.
Props miguelaxcar, johnbillion, JeffPaul, spacedmonkey, mxbclang, mukesh27.
Merges [54770] to the 6.1 branch.
Fixes#56900.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54779 602fd350-edb4-49c9-b593-d223f7449a82
Re-order the link pseudo classes to follow the long term LoVe (F)HA rule when set via `theme.json`.
In order that the CSS cascade behaves in a predictable manner, it's recommended that the selectors follow the order `:visited`, `:focus`/`:hover`, `:active`. As order affects the specificity, this ensures the interaction states override the visited states. CSS specificity is really quite beautiful, although complex.
Props mikachan, sabernhardt, davidbaumwald, mukesh27, Mamaduka, desrosj, peterwilsoncc.
Fixes#56928.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54778 602fd350-edb4-49c9-b593-d223f7449a82
In #55594 user meta caching was enabled by default when making a `WP_User_Query`. Previously, this was only enabled if a developer specifically queried for 'all_with_meta'
fields. User meta caching is implemented using a pluggable function, `cache_users`. If a plugin runs a `WP_User_Query` before pluggable functions have been defined, this
will now cause a fatal error.
In this commit, a `function_exists` check is introduced to avoid calling `cache_users` if it's not defined. Additionally, a `_doing_it_wrong` notice is issued if the
`WP_User_Query::query` method is called before the 'plugins_loaded' hook.
Props carazo, subrataemfluence, oakesjosh, spacedmonkey, obenland, SergeyBiryukov, peterwilsoncc, TimothyBlynJacobs.
Merges [54766] to the 6.1 branch.
Fixes#56952.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54773 602fd350-edb4-49c9-b593-d223f7449a82
The `wp_max_upload_size()` function can be expensive to call, especially for large sites or multisites. For the frontend usage of `get_default_block_editor_settings()` knowing the allowed upload size is typically unnecessary.
This changeset adds a condition so that `wp_max_upload_size()` is only called if the current user can actually `upload_files`. It keeps the data present when it is actually needed while avoiding the execution overhead when it is not needed.
Props janthiel, Clorith, flixos90, spacedmonkey.
Merges [54769] to the 6.1 branch.
Fixes#56815.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54772 602fd350-edb4-49c9-b593-d223f7449a82
According to the docs in developer.wordpress.org/reference/classes/wp_term_query/query WP_Term_Query:->query( string|array $query ) returns WP_Term[]|int[]|string[]|string, and we were using an inexistent object property terms making it always empty and look like the taxonomy did not exist.
Props mamaduka, mikachan, ockham, franz00.
Merges [54751] to the 6.1 branch.
Fixes#56902.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54767 602fd350-edb4-49c9-b593-d223f7449a82
This fixes `Equals sign not aligned with surrounding statements` WPCS warnings, so that the output of `composer format` is clean.
Follow-up to [54445], [54476], [54494], [54522], [54652], [54687].
See #56791.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54752 602fd350-edb4-49c9-b593-d223f7449a82
The theme version was missed in the relevant stylesheets in [54492].
This updates the last locations to allow 1.7 to be officially released.
Props @hellofromTonya, SergeyBiryukov.
Merges [54745] to the 6.1 branch.
See #56450.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54746 602fd350-edb4-49c9-b593-d223f7449a82
When using `'%%%s%%'` pattern with `$wpdb->prepare()`, it works on 6.0.3 but does not on 6.1-RC. Why? The inserted value is wrapped in quotes on 6.1-RC5 whereas it is not on <= 6.0.3.
With 6.1 final release tomorrow, more time is needed to further investigate and test. Reverting this changeset to restore the previous behavior.
This commit also adds a dataset for testing the `'%%%s%%'` pattern.
Props SergeyBiryukov, hellofromTonya, bernhard-reiter, desrosj, davidbaumwald, jorbin.
Reviewed by hellofromTonya, SergeyBiryukov.
Merges [54733] to the 6.1 branch.
Fixes#56933.
See #52506.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54734 602fd350-edb4-49c9-b593-d223f7449a82
A recent change to how WOFF files are processed in PHP 8.2 RC3 has caused a new test failure.
The tests was previously skipped on PHP 8.2, however, apparently after a `fileinfo` extension update, it started failing on PHP 8.1 too.
This commit adjusts the skipping condition to include PHP 8.1.
Follow-up to [54508], [54509].
Reviewed by desrosj, SergeyBiryukov.
Merges [54724] to the 6.1 branch.
See #56817.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54732 602fd350-edb4-49c9-b593-d223f7449a82
Link the image and text to the new 6.1 release video on youtube. The video is currently private, but will be made public during the release party.
Props admwgn, critterverse, joen, annezazu, jpantani, laurlittle, cbringmann, kellychoffman, pablohoney, EidolonNight.
Reviewed by davidbaumwald.
Merges [54729] to the 6.1 branch.
See #56357.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54731 602fd350-edb4-49c9-b593-d223f7449a82
Based on feedback from network storage configurations there was a noticed slowdown due to the usage of the `path_join()` function. This needs more time to find a workaround.
Follow-up to [53934].
Props mreishus, SergeyBiryukov, desrosj, mikeschroder.
Reverts [53934] in the 6.1 Branch.
See #56924.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54713 602fd350-edb4-49c9-b593-d223f7449a82
This change removes caching of global styles for logged in users, allowing "wp_global_styles" custom post type to be imported completely, regardless of any previously cached data. This change now relies on the lower-level native WP_Query cache invalidation methods for the global styles post type.
Follow-up to [52275], [54186].
Props anariel-design, bernhard-reiter, andrewserong, spacedmonkey, andraganescu, peterwilsoncc, oandregal, hellofromTonya.
Reviewed by hellofromTonya.
Merges [54706] to the 6.1 branch.
Fixes#56901.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54707 602fd350-edb4-49c9-b593-d223f7449a82
This change ensures custom styles for all third-party blocks are rendered on the front end if assets are set to be loaded on a per-block basis. Additionally, this change includes new unit tests to help prevent a similar bug in the future.
Props scruffian, aristath, poena, wildworks, ajlende, andraganescu, ndiego, gigitux, cbravobernal, ramonopoly, andrewserong, oandregal, hellofromTonya, davidbaumwald.
Merges [54703] to the 6.1 branch.
Fixes#56915.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54705 602fd350-edb4-49c9-b593-d223f7449a82
Switch to the CDN URLs for the images on the About page. Update the images used on Freedoms & Privacy to match the 6.1 design style.
Props richtabor, audrasjb, kebbet.
Reviewed by desrosj.
Merges [54690] to the 6.1 branch.
See #56357.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54695 602fd350-edb4-49c9-b593-d223f7449a82
Introduce `WP_Query::generate_cache_key()` for generating the cache key used by the main database query.
This removes the need for a filter to test that cache keys do not include the WPDB placeholder causing unreachable cache keys. The tests now call `WP_Query::generate_cache_key()` directly.
The filter `wp_query_cache_key` is removed as a hard deprecation. The filter was not included in a stable release.
Follow up to [54685].
Props spacedmonkey, jorbin, azaozz, hellofromtonya, mukesh27, peterwilsoncc, desrosj, audrasjb, adamsilverstein, flixos90, davidbaumwald, joedolson, sergeybiryukov.
Reviewed by mikeschroder.
Merges [54685] to the 6.1 branch.
Fixes#56802.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54692 602fd350-edb4-49c9-b593-d223f7449a82
In [54358], styling for Button blocks that had been removed from classic themes was reintroduced. However, it was added with a global scope, whereas editor styles are usually added with a `.editor-styles-wrapper` selector, which makes them more specific.
This change modifies the way that classic theme styles are added so that they also get wrapped in an `.editor-styles-wrapper` selector to match specificity.
Furthermore, adjust specificity for some Button block related styling in the editor for the Twenty Twelve and Twenty Twenty themes.
Merges [https://github.com/WordPress/gutenberg/pull/44731 Gutenberg PR 44731] into trunk.
Follow-up to [54358].
Props scruffian, cbravobernal, sabernhardt, audrasjb.
Merges [54687] to the 6.1 branch.
See #56467.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54688 602fd350-edb4-49c9-b593-d223f7449a82
Fix the responsive breakpoint styles for short vertical viewports on the link popup modal. Follow-up to [54216].
Props sabernhardt, joedolson.
Fixes#53174.
Merges [54660] to the 6.1 branch.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54684 602fd350-edb4-49c9-b593-d223f7449a82
Based on feedback, this enhancement isn't quite ready. Reverting [54213] for now to continue the work in the next cycle.
Follow-up to [54213].
Props manfcarlo, peterwilsoncc, SergeyBiryukov.
Reviewed by SergeyBiryukov.
Reverts [54213] in the 6.1 branch.
See #54572.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54683 602fd350-edb4-49c9-b593-d223f7449a82
`WP_Textdomain_Registry` was introduced in [53874] to store text domains and their language directory paths, addressing issues with just-in-time loading of textdomains when using locale switching and when using`load_*_textdomain()` functions.
Said change has inadvertently caused a performance regression exactly when using`load_*_textdomain()`, which still often is the case, where the cached information was not further used or even overridden.
This change addresses that issue by storing the default languages paths in a separate way, while at the same time making `WP_Textdomain_Registry` easier to maintain and adding new tests to catch future regressions.
Props flixos90, spacedmonkey, ocean90, SergeyBiryukov, costdev.
Merges [54669] to the 6.1 branch.
See #39210.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54682 602fd350-edb4-49c9-b593-d223f7449a82
When a ruleset error is encountered during a PHPCodeSniffer scan, an XML report is not generated and `cs2pr` will exit with a `0`.
In this situation, a workflow run will be marked as passing (even though a failure has occurred) due to the presence of `continue-on-error`.
This adjusts the logic in the Coding Standards and PHP Compatibility workflows to remove the need for the `continue-on-error` option and ensures all failures are accurately reflected within the GitHub Actions UI.
Follow up to [54371].
Props jrf, TobiasBg.
Merges [54678] to the 6.1 branch.
See #55652.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54681 602fd350-edb4-49c9-b593-d223f7449a82
This removes the dynamic aspect of the `createWorkflowDispatch()` call that dispatches a Failed Workflow run when another workflow encounters an issue.
By hardcoding `trunk` as the `ref`, the version of the workflow used will always be the latest, most up to date. This ensures older branches receive the bug fixes and improvements made in `trunk` without having to backport them.
Merges [54674] to the 6.1 branch.
See #55652.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54680 602fd350-edb4-49c9-b593-d223f7449a82
The `save-state` and `set-output` commands have been deprecated in GitHub Actions. This removes all occurrences of the command within workflow steps.
This will not remove all deprecated notices from workflow summaries (some third-party actions still contain instances of these commands and need to be fixed upstream), but it will fix the notices caused by custom workflow code.
Merges [54649] to the 6.1 branch.
Props jrf.
See #56820.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54679 602fd350-edb4-49c9-b593-d223f7449a82
When used inline, the SVG needs the aria-hidden, focusable, and viewBox properties for accessibility. Additionally, this optimizes the SVG by using circle elements in place of path, and removing clipPath. There is no visible change, but the file is now one-third the size.
Props sabernhardt.
Reviewed by SergeyBiryukov, ryelle.
Merges [54662] to the 6.1 branch.
Fixes#56703. See #56357.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54677 602fd350-edb4-49c9-b593-d223f7449a82
This resolves a bug in Featured Image blocks where `object-fit` was being removed during the `render_callback`.
Props raduiason, pbiron, kebbet, SergeyBiryukov, bernhard-reiter, ironprogrammer, xknown, audrasjb, ckanderson22, ivanjeronimo, seriouslysenpai.
Reviewed by SergeyBiryukov.
Merges [54675] to the 6.1 branch.
Fixes#56855.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54676 602fd350-edb4-49c9-b593-d223f7449a82
In `register_block_type`, continue to allow passing arrays as the `editor_script`, `script`, `view_script`, `editor_style`, and `style` arguments. Note that those fields were soft-deprecated in favor of their `_handles` counterparts in [54155], which would allow specifying multiple items. At the same time, the deprecated fields were limited to `string` or `null`.
However, this broke existing code that passed an array as one of those arguments. For backwards compatibility, this change thus restores the previous behavior. It is implemented in `WP_Block_Type` as a pair of `__get()` and `__set()` methods that wrap around the corresponding `_handles` members, which are arrays of strings.
It also affects the REST API endpoint for block types. The latter’s schema has never allowed for anything other than `string` or `null` for any of those fields. For this reason, it now returns the first element of the array stored in the corresponding `_handles` member in `WP_Block_Type`.
Follow-up [54155].
Props nendeb55, costdev, gziolo, spacedmonkey, mukesh27, sergeybiryukov, audrasjb.
Merges [54670] to the 6.1 branch.
Fixes#56707.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54671 602fd350-edb4-49c9-b593-d223f7449a82
Tumblr's oEmbed API correctly rejects invalid URLs, we can rely on that for the handful of cases that aren't embeddable URLs.
Props cbravobernal, bernhard-reiter.
Merges [54652] to the 6.1 branch.
Fixes#56733.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54653 602fd350-edb4-49c9-b593-d223f7449a82
The new About header image appears to have been accidentally reverted to the older one in a previous commit.
Follow-up to [54635], [54638].
Props kebbet.
Reviewed by SergeyBiryukov, ryelle.
Merges [54645] to the 6.1 branch.
Fixes#56703.
git-svn-id: https://develop.svn.wordpress.org/branches/6.1@54648 602fd350-edb4-49c9-b593-d223f7449a82