This change avoids a warning thrown by a missing slash in a post thumbnail lazyload related regular expression.
Follow-up to [52065].
Props SierraTR, audrasjb, costdev.
Fixes#54815.
git-svn-id: https://develop.svn.wordpress.org/trunk@52574 602fd350-edb4-49c9-b593-d223f7449a82
* `wp_remote_retrieve_response_code()`
* `wp_remote_retrieve_response_message()`
If incorrect parameter value is given, these functions return an empty string, not an empty array.
Follow-up to [8516].
Props chesio, johnbillion.
Fixes#54796.
git-svn-id: https://develop.svn.wordpress.org/trunk@52572 602fd350-edb4-49c9-b593-d223f7449a82
This change adds a verification of the `$position` parameter in `add_menu_page()` to ensure an integer is used. If not, the function informs developers of the wrong parameter type via a `_doing_it_wrong` message. This brings consistency with a similar check used in `add_submenu_page()`.
This change also typecasts any floating number to string to ensure that in case a float value was passed, at least it doesn't override existing menus.
Follow-up to [46570].
Props kirtan95.
Fixes#54798. See #48249.
git-svn-id: https://develop.svn.wordpress.org/trunk@52569 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a `Variable "$auth_ID" is not in valid snake_case format` WPCS warning by using the existing `$author_id` variable, and brings consistency with a similar fragment in `get_author_feed_link()`.
Follow-up to [979], [5087], [6364], [6365].
See #54728.
git-svn-id: https://develop.svn.wordpress.org/trunk@52568 602fd350-edb4-49c9-b593-d223f7449a82
Use the correct Field Guide link. Update the SVGs used on Freedoms and Privacy. Add more spacing between sections on the About page, fixed spacing between rows on Freedoms page.
Props critterverse, audrasjb, versusbassz.
See #54270.
git-svn-id: https://develop.svn.wordpress.org/trunk@52563 602fd350-edb4-49c9-b593-d223f7449a82
Tone down the brightness of the dashboard panel by using a white background behind the main text, and use the highlight color from each color scheme for the main background. This also introduces a `$scheme-name` SCSS variable to allow overrides for specific color schemes.
Props critterverse, sabernhardt, joedolson, audrasjb.
See #54489.
git-svn-id: https://develop.svn.wordpress.org/trunk@52562 602fd350-edb4-49c9-b593-d223f7449a82
In `wp_enqueue_block_style` when `rtl` versions of CSS files are detected, `wp_style_add_data` is called to add the metadata to the registered sheet. However, the stylesheet `handle` argument is misspelled as `hanle`. This change corrects the argument name.
Props omaeyusuke.
Fixes#54786.
git-svn-id: https://develop.svn.wordpress.org/trunk@52558 602fd350-edb4-49c9-b593-d223f7449a82
In a block theme, additional block styles registered using the `wp_enqueue_block_style` function should only get printed when the block exists on a page. However, they currently always get rendered.
This commit is a backport from Gutenberg that fixes the issue by printing the styles when a block renders.
Follow-up to [52069].
Props poena, aristath, Mamaduka.
Fixes#54787.
git-svn-id: https://develop.svn.wordpress.org/trunk@52556 602fd350-edb4-49c9-b593-d223f7449a82
This commit syncs changes for the default theme from its active development repository to core.
This is a follow up to [52081], [52107], [52164], [52222], [52283], [52335], [52375], [52392], and [52430]. It includes fixes to the theme's spacing and adds a search template.
To view the full set of changes, visit 8564fd281f...f0346e1ad2.
Props richtabor, kjellr, danieldudzic, scruffian.
git-svn-id: https://develop.svn.wordpress.org/trunk@52555 602fd350-edb4-49c9-b593-d223f7449a82
The home template's description should be: "Displays as the site's home page, or as the Posts page when a static home page isn't set." This commit fixes the typo changing "it" to "isn't".
Follow-up to [52331].
Props kharisblank, talldanwp.
Fixes#54787.
git-svn-id: https://develop.svn.wordpress.org/trunk@52554 602fd350-edb4-49c9-b593-d223f7449a82
While `AS` is an optional keyword in SQL, it is commonly considered best practice to include it for better readability and compatibility. This also makes the queries more consistent with other queries using aliases in core.
Follow-up to [6359], [30238].
Props costdev, domainsupport.
Fixes#54769.
git-svn-id: https://develop.svn.wordpress.org/trunk@52553 602fd350-edb4-49c9-b593-d223f7449a82
- [Block Library - Query Pagination Next]: Hide block if custom query has no results
- [WP 5.9] Fix: HTML tags like inline images in nav links break submenu layout
- Check for nextpage to display page links for paginated posts
- Navigation: Set the default for --navigation-layout-align to "flex-start" when using vertical orientation
- [Block Library - Query Loop]: Use gap for the grid view
- Update page list flex variables to match navigation.
- Site logo: Fix range control on landscape logo
- Restore canvas padding for classic themes
- RichText: Fix dead key input on Windows
- Fix: Impossible to clear colors if color palettes are removed.
- Gallery block: pass any custom attributes through the gallery v2 migration script
- Reduce specificity of legacy font sizes defined by core
- Update: Improve escaping on the search block
See #54487.
Props isabel_brison.
git-svn-id: https://develop.svn.wordpress.org/trunk@52551 602fd350-edb4-49c9-b593-d223f7449a82
Themes that use the same preset slugs as WordPress uses need to be updated.
From the devnote https://make.wordpress.org/core/2022/01/08/updates-for-settings-styles-and-theme-json/
The CSS for some of the presets defined by WordPress (font sizes, colors, and gradients) was loaded twice for most themes in WordPress 5.8: in the block-library stylesheet plus in the global stylesheet. Additionally, there were slight differences in the CSS in both places.
In WordPress 5.9 those were consolidated into a single place, the global stylesheet whose name is global-styles-inline-css that is now loaded for all themes in the front-end.
For themes to override the default values they can use the theme.json and provide the same slug. Themes that do not use a theme.json can still override the default values by enqueuing some CSS that sets the corresponding CSS Custom Property. This commit does the second for the twenty twenty theme.
Props oandregal.
Fixes#54782.
git-svn-id: https://develop.svn.wordpress.org/trunk@52549 602fd350-edb4-49c9-b593-d223f7449a82
The default preset styles of WordPress (font sizes, colors, gradients) are now provided via the global stylesheet to avoid duplication of styles. This stylesheet can be found in the front-end with the name global-styles-inline-css.
The default presets are important to support old content that may use them and also patterns, that can use cross-theme styles.
Props oandregal.
Fixes#54781.
git-svn-id: https://develop.svn.wordpress.org/trunk@52547 602fd350-edb4-49c9-b593-d223f7449a82
After the 5.9 branch was created, [52449] updated the workflow for testing old branches to include 5.9. However, the E2E tests `-branch` condition was updated to 5.9 instead of adding an additional branch condition for 5.9. This commit re-enables the E2E tests for 5.8.
Props desrosj, hellofromTonya.
Fixes#54749.
git-svn-id: https://develop.svn.wordpress.org/trunk@52546 602fd350-edb4-49c9-b593-d223f7449a82
This change updates the HelpHub Documentation link to "Managing Themes" to make it more consistent with other Help tabs.
Props SergeyBiryukov, jdy68.
Fixes#54707.
git-svn-id: https://develop.svn.wordpress.org/trunk@52545 602fd350-edb4-49c9-b593-d223f7449a82
This change replaces the title of the Appearance Themes Screen to make it consistent with the main heading of the screen and with other Admin screens. It also adds a link to the related HelpHub Documentation in the Help tab of the screen.
Props jdy68.
Fixes#54707.
git-svn-id: https://develop.svn.wordpress.org/trunk@52543 602fd350-edb4-49c9-b593-d223f7449a82
During automatic core upgrades, if installation results in a `WP_Error`, the `error` method is called on the skin with the details. However, in this case, two parameters are passed to `$skin->error`, but only one is accepted. This change passes only the running `WP_Error` instance as the sole parameter to `$skin->error`.
Also, this change adds an additional error to `$upgrade_result` before finally being passed to `$skin->error`, indicating that the installation failed. This adds additional context to the failure.
Props desrosj, sainthkh, devutpol, SergeyBiryukov.
Fixes#53284.
git-svn-id: https://develop.svn.wordpress.org/trunk@52539 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes a wrong translation context on the navigation link block title.
Follow-up to [50527].
Props Chouby.
Fixes#54566.
git-svn-id: https://develop.svn.wordpress.org/trunk@52537 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes a wrong punctuation in a link description object of the menu items controller endpoint.
Props la-geek, audrasjb, tobifjellner, hellofromtonya.
Fixes#54745.
git-svn-id: https://develop.svn.wordpress.org/trunk@52535 602fd350-edb4-49c9-b593-d223f7449a82
The workshops page doesn't specifically show 5.9 content at this stage (and likely won't until much later), so it needs to be changed to learn.wordpress.org homepage.
Props hlashbrooke, audrasjb, davidbaumwald.
Fixes#54755.
git-svn-id: https://develop.svn.wordpress.org/trunk@52453 602fd350-edb4-49c9-b593-d223f7449a82
In the Themes Screen Help Tab, the "Documentation on Adding New Themes" link previously targeted the "Using Themes" HelpHub post whereas it had to target the "Install Themes" section of "Appearance Themes Screen" HelpHub post, which is more relevant.
Props jdy68.
Fixes#54709.
git-svn-id: https://develop.svn.wordpress.org/trunk@52452 602fd350-edb4-49c9-b593-d223f7449a82
During password resets, the 'Generate Password" button has a `aria-expanded="true"` attribute, but the button itself does not expand or collapse anything. This change adds a `skip-aria-expanded` class to the button which is referenced in JavaScript to skip updating the `aria-expanded` attribute on the button itself when clicked.
This change also resets the `aria-expanded` attribute to `false` for the parent form after it's submitted.
Props alexstine, johnjamesjacoby, sabernhardt.
Fixes#54538.
git-svn-id: https://develop.svn.wordpress.org/trunk@52450 602fd350-edb4-49c9-b593-d223f7449a82
With its last major update in 3.5, the welcome panel was feeling stale. This bright new design showcases links to recent features, including patterns, the site editor, and styles, depending on whether you have a block theme active.
Props jameskoster, desrosj, noisysocks, critterverse, karmatosed, hellofromtonya, smit08, melchoyce, poena, audrasjb, webcommsat, marybaum.
See #54489.
git-svn-id: https://develop.svn.wordpress.org/trunk@52442 602fd350-edb4-49c9-b593-d223f7449a82
This change updates the `@return` docs for `wp_remote_retrieve_header` to specify that an array can also be returned if the requested header key has multiple values.
Props robtarr, johnjamesjacoby, felipeelia, hellofromTonya, costdev.
Fixes#51736.
git-svn-id: https://develop.svn.wordpress.org/trunk@52441 602fd350-edb4-49c9-b593-d223f7449a82
For block themes, [52369] added HTML5 support for `'comment-list'`, `'comment-form'`, `'style'`, and `'script'`. However, when sites upgrade to 5.9 with non-block content such as a gallery and caption, the markup was not HTML5.
This commit adds full HTML5 theme feature support for block themes. Non-block content such as a `[gallery]` and `[caption]` shortcodes will natively be in HMTL5 markup without block themes needing to specifically add `add_theme_support( 'html5, .. )` to the theme.
Follow-up to [24417], [27302], [34261], [52369], [52383], [52386].
Props @joyously, costdev, hellofromTonya, audrasjb, Mamaduka, ocean90.
Fixes#54731. See #54597.
git-svn-id: https://develop.svn.wordpress.org/trunk@52439 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes oEmbed host script enqueueing on front-end when using block themes.
It deprecates `wp_oembed_add_host_js` in favor of `wp_maybe_enqueue_oembed_host_js`. The action is still triggered in `default-filters.php` to ensure backward compatibility for websites that are removing the action. There is now a `has_action()` check in `wp_maybe_enqueue_oembed_host_js()` to see if `wp_oembed_add_host_js()` has not been unhooked from running at the `wp_head` action.
Follow-up to [52132], [52151], [52153], [52325].
Props swissspidy, westonruter, flixos90, kafleg.
Fixes#44632.
git-svn-id: https://develop.svn.wordpress.org/trunk@52437 602fd350-edb4-49c9-b593-d223f7449a82