45245 Commits

Author SHA1 Message Date
Tonya Mork
19e61fb14f Administration: Revert [51946].
Reverting changeset due to reported issue of menu being hidden after clicking on certain mobile devices.

Props dhusakovic, audrasjb, SergeyBiryukov, costdev, joedolson.
See #54837, #53587.

git-svn-id: https://develop.svn.wordpress.org/trunk@52591 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 19:53:32 +00:00
Jeff Ong
1a400e4ff2 Twenty Twenty-Two: Sync updates from GitHub from RC3.
This commit syncs minor 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], [52430], and [52555]. It includes fixes to the group, cover, and template part block padding and removes unnecessary group block wrappers from many patterns.

To view the full set of changes, visit 69d5c512c6...91f8748566.

Props kjellr, richtabor, audrasjb.
See #54318.


git-svn-id: https://develop.svn.wordpress.org/trunk@52589 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 15:42:50 +00:00
Jb Audras
4cd6ffcf3d i18n: Contextualize "light" color translation strings.
This change helps translators to distinguish between color and font-family contexts.

Props ironprogrammer, audrasjb, tobifjellner, Presskopp, SergeyBiryukov, hellofromTonya.
Fixes #54804.


git-svn-id: https://develop.svn.wordpress.org/trunk@52588 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 15:36:14 +00:00
Sergey Biryukov
e57bd841f0 Upgrade/Install: Check if the disk_free_space() function exists before calling it.
In PHP 8+, `@` no longer suppresses fatal errors:
> The `@` operator will no longer silence fatal errors (`E_ERROR`, `E_CORE_ERROR`, `E_COMPILE_ERROR`, `E_USER_ERROR`, `E_RECOVERABLE_ERROR`, `E_PARSE`).

Reference: [https://www.php.net/manual/en/migration80.incompatible.php PHP 8: Backward Incompatible Changes].

`disk_free_space()` may be disabled by hosts, which will throw a fatal error on a call to undefined function.

This change prevents the fatal error, and falls back to `false` when `disk_free_space()` is unavailable.

Follow-up to [25540], [25774], [25776], [25831], [25869].

Props costdev, jrf, swb1192, SergeyBiryukov.
Fixes #54826. See #54730.

git-svn-id: https://develop.svn.wordpress.org/trunk@52585 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-17 11:39:35 +00:00
Sergey Biryukov
a0b1f27de6 Coding Standards: Rename the $val variable to $site for clarity in WP_MS_Users_List_Table::column_blogs().
Follow-up to [12603], [13918], [16607], [32757], [52583].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52584 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-16 08:38:50 +00:00
Sergey Biryukov
815759d6f3 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-ms-users-list-table.php.
Follow-up to [16607], [32630], [32757], [47219].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52583 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-16 08:14:39 +00:00
Jb Audras
9603988369 Docs: Miscellaneous docblock corrections in REST API and Sitemaps API.
Props kebbet.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@52582 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-15 21:20:57 +00:00
Sergey Biryukov
6c22dffb87 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-users-list-table.php.
This mirrors a similar check a few lines below and includes minor code layout fixes for better readability.

Follow-up to [9955], [13931], [14176], [15315], [45407], [50129].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52581 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-15 20:47:06 +00:00
Jb Audras
ff33d84f86 Administration: Replace "Current theme" with "Active theme" in user facing strings.
This change replaces "Current theme" with "Active theme" in user-facing strings. It brings better consistency across the Administration.

Props Presskopp, audrasjb, costdev.
Fixes #54770.


git-svn-id: https://develop.svn.wordpress.org/trunk@52580 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-15 08:42:56 +00:00
Jb Audras
bdfa786d88 Docs: Typo correction in WP_REST_Response class docblocks.
Follow-up to [34928].

Props kebbet.
Fixes #54823.


git-svn-id: https://develop.svn.wordpress.org/trunk@52578 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-14 21:13:09 +00:00
Sergey Biryukov
e70b0f7c3d Tests: Avoid duplicate queries in some WP_Query tests.
When passing args to the `WP_Query::__construct()` method, it internally executes the `WP_Query::get_posts()` method and stores the result in the `WP_Query::posts` property.

When calling `WP_Query::get_posts()` again, the same SQL query gets executed, and the result is again stored in the `WP_Query::posts` property.

Thus, the correct usage is to read the posts already stored in the `WP_Query::posts` property.

Follow-up to [1062/tests], [1065/tests], [1066/tests], [1070/tests], [29805], [31286], [49900], [51144].

Props david.binda.
Fixes #54822.

git-svn-id: https://develop.svn.wordpress.org/trunk@52577 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-14 17:50:52 +00:00
Jb Audras
bde79ae542 Upgrade/Install: Typo correction in a Core_Upgrader class inline comment.
Follow-up to [45046].

Props kebbet.
Fixes #54821.


git-svn-id: https://develop.svn.wordpress.org/trunk@52576 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-14 15:12:32 +00:00
Jb Audras
10817e6a20 XML-RPC: Fix typos in some XMLRPC related docblocks.
Props kebbet, shreyasikhar26.
Fixes #54820.


git-svn-id: https://develop.svn.wordpress.org/trunk@52575 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-14 14:43:38 +00:00
Jb Audras
8631739e5d Media: Add a missing / in post thumbnail lazy loading regex.
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
2022-01-14 11:00:35 +00:00
Jb Audras
ea1fe31f02 Media: Typo correction in wp_image_maybe_exif_rotate docblock.
Follow-up to [46202].

Props mitogh.
Fixes #54816.


git-svn-id: https://develop.svn.wordpress.org/trunk@52573 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-13 19:12:42 +00:00
Sergey Biryukov
7f2ddd0ae6 Docs: Correct description for two HTTP API functions:
* `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
2022-01-13 01:03:01 +00:00
Jb Audras
b38c2fb5e9 Administration: Fix an erroneous translators comment after changeset [52569].
This change also fixes the indentation of the translators comment.

Fixes #54798.


git-svn-id: https://develop.svn.wordpress.org/trunk@52571 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-12 23:43:56 +00:00
Jb Audras
aaf689a48f Tests: Trac ticket number correction after changeset [52569].
Follow-up to [52569].

See #54798.


git-svn-id: https://develop.svn.wordpress.org/trunk@52570 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-12 23:29:03 +00:00
Jb Audras
3685f95eb6 Administration: Ensure an integer is used for menu priority in add_menu_page().
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
2022-01-12 23:23:41 +00:00
Sergey Biryukov
0b010f16c9 Coding Standards: Remove an extra variable in get_author_posts_url().
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
2022-01-12 11:15:15 +00:00
Kelly Choyce-Dwan
7bec2e6c5a Help/About: Update the About section for 5.9.
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
2022-01-11 18:34:34 +00:00
Kelly Choyce-Dwan
1c54371c45 Administration: Update design of the Dashboard welcome panel.
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
2022-01-11 18:25:38 +00:00
David Baumwald
f44030b140 Script Loader: Fix a variable typo in wp_enqueue_block_style.
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
2022-01-11 17:14:54 +00:00
Tonya Mork
1e7d559444 Editor: Fix enqueueing additional styles in wp_enqueue_block_style() to print only when blocks render.
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
2022-01-11 15:57:09 +00:00
Jeff Ong
0c516fc131 Twenty Twenty-Two: Sync updates from GitHub for RC 2.
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
2022-01-11 15:56:25 +00:00
Tonya Mork
d085349cf5 Site Editor: Fix typo in home template translatable description.
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
2022-01-11 15:16:37 +00:00
Sergey Biryukov
6dc3ff47d2 Database: Add missing AS after INNER JOIN in some queries.
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
2022-01-11 04:10:03 +00:00
Robert Anderson
5820220945 Update packages to include these bug fixes from Gutenberg:
- [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
2022-01-11 03:11:06 +00:00
Jorge Costa
2aff2a60fc Fix: Update some default presets in use by default themes to the new format.
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
2022-01-10 18:27:45 +00:00
Jorge Costa
16e0165cf0 Fix: WordPress default presets aren't loaded for all themes.
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
2022-01-10 17:27:46 +00:00
David Baumwald
df3f14819c Build/Test Tools: Re-enable E2E tests for the 5.8 branch.
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
2022-01-10 16:43:54 +00:00
Jb Audras
07fcd416b8 Help/About: Correction in "Managing Themes" HelpHub Docs link.
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
2022-01-10 08:48:37 +00:00
Sergey Biryukov
42b4e39c6d Coding Standards: Correct alignment in get_block_editor_settings().
This fixes an `Array double arrow not aligned correctly` WPCS warning.

Follow-up to [52054].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52544 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-10 01:54:24 +00:00
Jb Audras
52cc52a8f4 Help/About: Change the HTML title of Themes Screen and add related HelpHub Docs link.
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
2022-01-09 23:12:06 +00:00
Sergey Biryukov
34edb06d59 Coding Standards: Use strict comparison in wp-admin/themes.php.
Follow-up to [15646], [30697].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52540 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-08 01:20:13 +00:00
David Baumwald
6ef47e555f Upgrade/Install: Fix parameter count in error call when an automatic core upgrade fails.
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
2022-01-07 17:53:27 +00:00
Sergey Biryukov
25073cf976 Coding Standards: Use strict comparison in wp-admin/revision.php.
Follow-up to [7913], [12751].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52538 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-07 16:45:24 +00:00
Jb Audras
d831c042d6 Taxonomy: Typo correction in context used for the navigation link block title.
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
2022-01-07 11:19:08 +00:00
Jb Audras
482936752a Tests: Update qUnit test fixtures after [52535].
See #54745.


git-svn-id: https://develop.svn.wordpress.org/trunk@52536 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 23:23:23 +00:00
Jb Audras
d1ef2e431f REST API: Typo correction in a link description object.
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
2022-01-06 22:57:06 +00:00
Sergey Biryukov
b9bb489d1d Coding Standards: Use strict comparison in wp-admin/plugin-install.php.
Follow-up to [11366].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52534 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 21:17:39 +00:00
Jonathan Desrosiers
6223e0cf1e Formatting: Correctly encode ASCII characters in post slugs.
Props zieladam, whyisjake, xknown, peterwilsoncc, desrosj, iandunn.

git-svn-id: https://develop.svn.wordpress.org/trunk@52457 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:08:18 +00:00
Jonathan Desrosiers
bc34e6fb13 Upgrade/Install: Avoid using unserialize() unnecessarily.
Props vortfu, xknown, dd32.

git-svn-id: https://develop.svn.wordpress.org/trunk@52456 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:04:51 +00:00
Jonathan Desrosiers
8dd5aec97f Query: Improve sanitization within WP_Meta_Query.
Props vortfu, xknown, dd32.

git-svn-id: https://develop.svn.wordpress.org/trunk@52455 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:03:14 +00:00
Jonathan Desrosiers
e0ff6d86f4 Query: Improve sanitization within WP_Tax_Query.
Props dd32, xknown, peterwilsoncc, ehtis.

git-svn-id: https://develop.svn.wordpress.org/trunk@52454 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-06 17:01:11 +00:00
Jb Audras
1ae653ef36 Help/About: Change the Learn WP link in the about page.
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
2022-01-06 09:16:48 +00:00
Jb Audras
0c9d7c645c Help/About: Correction on the documentation link about adding new themes.
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
2022-01-05 22:13:43 +00:00
Sergey Biryukov
0cd255c856 Upgrade/Install: Make first comment URLs translatable.
This allows translators to localize the `https://wordpress.org/` and `https://gravatar.com/` URLs in the first comment on a new installation.

Follow-up to [2409], [37888], [37921].

Props kebbet, desrosj.
Fixes #54535.

git-svn-id: https://develop.svn.wordpress.org/trunk@52451 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-05 21:05:12 +00:00
David Baumwald
580e57a6e0 Login and Registration: Remove aria-expanded from "Generate Password" button.
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
2022-01-05 17:35:44 +00:00
Tonya Mork
6ca73cb648 Build/Test Tools: Add the 5.9 branch to the workflow for testing branches.
git-svn-id: https://develop.svn.wordpress.org/trunk@52449 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-04 21:29:57 +00:00