Commit Graph

19000 Commits

Author SHA1 Message Date
Sergey Biryukov
1b22e56ad0 Coding Standards: Use strict comparison in wp-admin/user-edit.php.
Follow-up to [2872], [13941], [12722], [14043], [14802], [23364], [42688].

Props azouamauriac.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52687


git-svn-id: http://core.svn.wordpress.org/trunk@52276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-07 14:47:02 +00:00
audrasjb
ca5f3d0af6 Twenty Twenty-Two: Restore custom padding for group blocks with a background color.
This change partially reverts [52679] which accidentally removed custom padding for group blocks with a background color.

Follow-up to [52679].

Props kjellr.
Fixes #55103.
See #54944.

Built from https://develop.svn.wordpress.org/trunk@52686


git-svn-id: http://core.svn.wordpress.org/trunk@52275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-07 14:38:59 +00:00
Sergey Biryukov
a584be05eb Coding Standards: Rename $r variable to $args for clarity in walk_page_tree().
Follow-up to [9830], [32617], [45667], [52684].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52685


git-svn-id: http://core.svn.wordpress.org/trunk@52274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-07 14:21:01 +00:00
Sergey Biryukov
a39f5f9d4f Coding Standards: Rename $r variable to $args for clarity in walk_nav_menu_tree().
Follow-up to [14248], [32612], [45667].

Props uzumymw.
See #54728.
Built from https://develop.svn.wordpress.org/trunk@52684


git-svn-id: http://core.svn.wordpress.org/trunk@52273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-07 14:01:05 +00:00
Sergey Biryukov
3015d1ca44 Tests: Rename the test file and class for wp_get_global_stylesheet() tests.
This matches the name of the function being tested.

Follow-up to [52675-52677].

See #54782.
Built from https://develop.svn.wordpress.org/trunk@52682


git-svn-id: http://core.svn.wordpress.org/trunk@52271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-05 13:21:01 +00:00
audrasjb
54514a5451 Twenty Twenty-Two: Fix headings consistency in Pricing table pattern.
This change fixes a consistency issue where "Pigeon" was a h3, while "Sparrow" and "Falcon" were h2. Let's treat these birds equally 🐦

Props kjellr, jffng.
Fixes #54929.

Built from https://develop.svn.wordpress.org/trunk@52681


git-svn-id: http://core.svn.wordpress.org/trunk@52270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-05 08:00:05 +00:00
audrasjb
68f58d46a5 Docs: Typo corrections in various API docblocks.
Props hasanuzzamanshamim.
Fixes #55073.
See #54729.

Built from https://develop.svn.wordpress.org/trunk@52680


git-svn-id: http://core.svn.wordpress.org/trunk@52269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 16:28:00 +00:00
audrasjb
70fe8c8cea Twenty Twenty-Two: Remove negative side margins on group blocks with a background.
This change fixes an issue where applying a background color to a group block aligned it to the left in the editor.

Props eddystile, audrasjb, webmandesign, sabernhardt, petaryoast.
Fixes #54944.

Built from https://develop.svn.wordpress.org/trunk@52679


git-svn-id: http://core.svn.wordpress.org/trunk@52268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 15:16:01 +00:00
Sergey Biryukov
1b81823244 Tests: Use more appropriate assertions in wp_get_global_stylesheet() tests.
This replaces instances of `assertTrue( str_contains( ... ) )` with `assertStringContainsString()` to use native PHPUnit functionality.

Follow-up to [52675], [52676].

See #54782.
Built from https://develop.svn.wordpress.org/trunk@52677


git-svn-id: http://core.svn.wordpress.org/trunk@52266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 14:35:00 +00:00
Sergey Biryukov
4cbad9a9aa Coding Standards: Use strict type check for in_array() in wp_get_global_stylesheet().
Use multi-line comment syntax for some comments, per the documentation standards.

Follow-up to [52675].

See #54782.
Built from https://develop.svn.wordpress.org/trunk@52676


git-svn-id: http://core.svn.wordpress.org/trunk@52265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 14:18:59 +00:00
jorgefilipecosta
e8e20a2823 Fix: Classic themes using default presets are not working.
This commit makes the presets provided by the theme via add_theme_support always create CSS Custom Properties, whether or not the theme has a theme.json file. This way, if the overwrites a core preset, the core CSS variables are also overwritten and use the theme value.

Props oandregal, hellofromTonya, desrosj, costdev, pbearne, johnstonphilip, webmandesign.
Fixes #54782.
Built from https://develop.svn.wordpress.org/trunk@52675


git-svn-id: http://core.svn.wordpress.org/trunk@52264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 13:52:00 +00:00
audrasjb
e175e8aa0a Toolbar: Don't hide admin bar text labels from screen readers on small screens.
This change replaces `display: none` with `screen-reader-text` styles so the text labels are available for screen readers on small screens.

Props legendusmaximus, sabernhardt, konradyoast.
Fixes #54895.

Built from https://develop.svn.wordpress.org/trunk@52674


git-svn-id: http://core.svn.wordpress.org/trunk@52263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 12:56:00 +00:00
Clorith
2d20fd7cc1 External libraries: Update version string for hoverIntent.
Updating the version string will help invalidate caches, ensuring the new version of the library is loaded where applicable.

Follow-up to [52429].

Props david.binda.
Fixes #54904.
Built from https://develop.svn.wordpress.org/trunk@52673


git-svn-id: http://core.svn.wordpress.org/trunk@52262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 10:52:08 +00:00
joedolson
aa3db62410 Comments: Only render term update notices on term screens.
Prevent blank notices from appearing when adding custom fields or terms in the post editor.

Props gadhiyaravi, Boniu91, ravipatel, sabernhardt.
Fixes #54955. See #42937.

Built from https://develop.svn.wordpress.org/trunk@52672


git-svn-id: http://core.svn.wordpress.org/trunk@52261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 01:22:02 +00:00
joedolson
f5d588bf26 Comments: Verify 'mirroring' property exists in media views.
Checks that the media collection has a mirroring property before accessing the property in media views.

Props MMDeveloper, mukesh27.
Fixes #53856.

Built from https://develop.svn.wordpress.org/trunk@52671


git-svn-id: http://core.svn.wordpress.org/trunk@52260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-04 01:00:04 +00:00
Sergey Biryukov
84f61343d4 Docs: Fix typo in the is_post_status_viewable() function description.
Follow-up to [50130].

Props rafiahmedd.
Fixes #55068.
Built from https://develop.svn.wordpress.org/trunk@52670


git-svn-id: http://core.svn.wordpress.org/trunk@52259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-03 21:25:02 +00:00
spacedmonkey
db603605ac Taxonomy: Remove cache expiry limitation in WP_Term_Query.
Remove the one day expiry limitation from query caches found in the `WP_Term_Qurery` class. Removing this limitation means that the caches will remain in object caching, as long as possible. Ensure that all term / taxonomy cache clear functions invalidate query caches, by deleting the last_changed value in the terms cache group. 

Props spacedmonkey, adamsilverstein, boonebgorges, tillkruess, dlh, flixos90.
Fixes #54511.

Built from https://develop.svn.wordpress.org/trunk@52669


git-svn-id: http://core.svn.wordpress.org/trunk@52258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-03 17:43:06 +00:00
audrasjb
ca9b189085 Editor: Remove standard post type UI for templates and template parts.
In [52158] the standard post type UI was added back for templates and template parts, because these features had been temporarily removed from the site editor in the rush to get 5.9 ready for December. Since 5.9 these features were properly added back to the site editor, the `show_ui` values for these post types should be returned back to `false`.

Follow-up to [52158].

Props manfcarlo, audrasjb.
Fixes #54908.

Built from https://develop.svn.wordpress.org/trunk@52668


git-svn-id: http://core.svn.wordpress.org/trunk@52257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-03 09:03:04 +00:00
audrasjb
63888dec3e Twenty Twenty-Two: Make 404 pattern search label and button translatable.
This changes makes the Twenty Twenty-Two "hidden-404" pattern fully prepared for translation.

Props kjellr, walbo.
Fixes #54928.

Built from https://develop.svn.wordpress.org/trunk@52664


git-svn-id: http://core.svn.wordpress.org/trunk@52253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-02 23:43:02 +00:00
Peter Wilson
69e9e78cf4 Upgrade: Add follow up ticket ID to upgrade_590() comment.
Follow up to [52656].

Props audrasjb.
See #54906.

Built from https://develop.svn.wordpress.org/trunk@52662


git-svn-id: http://core.svn.wordpress.org/trunk@52251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-02 23:22:06 +00:00
Sergey Biryukov
051bd96994 Twenty Twenty: Add Noto Serif as a fallback font before Garamond.
This aims to provide better experience on Chromebooks. Noto Serif is also the fallback font for Android devices.

Follow-up to [46271].

Props sabernhardt, nmschaller.
Fixes #50723.
Built from https://develop.svn.wordpress.org/trunk@52661


git-svn-id: http://core.svn.wordpress.org/trunk@52250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-02 15:13:04 +00:00
davidbaumwald
a5c45366cb Options, Meta APIs: Correct some inline docs for update_post_meta and delete_post_meta.
In `update_post_meta` and `delete_post_meta`, code was added to fetch the parent post if these functions were called for a revision post ID.  In [9252], the code was apparently copied from `add_post_meta`, and the inline comment describing the new block of code was not updated to mention either "updated" or "deleted" respectively.  This change corrects the comment in both functions to reflect the current action instead of "added".

Props thelovekesh, rehanali.
Fixes #54835.
Built from https://develop.svn.wordpress.org/trunk@52660


git-svn-id: http://core.svn.wordpress.org/trunk@52249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 17:12:03 +00:00
Sergey Biryukov
fefd1930c5 General: Remove inaccurate reference to the link_updated field from the wp_insert_link() DocBlock.
The `link_updated` field is unused as of WordPress 3.0 and was never updated via `wp_insert_link()`, only via the `wp-admin/update-links.php` file removed in [13744].

Follow-up to [13744], [49487].

Props dshanske, dharm1025, SergeyBiryukov.
Fixes #54880.
Built from https://develop.svn.wordpress.org/trunk@52659


git-svn-id: http://core.svn.wordpress.org/trunk@52248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 12:30:02 +00:00
audrasjb
4894efc122 Twenty Twenty-One: Replace GitHub with .org link in Theme URI.
Theme URI is the URL of a public web page where users can find more information about the theme. For bundled themes, it should be a link to the theme’s page on the Theme Repository.

Props kafleg.
Fixes #55018.

Built from https://develop.svn.wordpress.org/trunk@52658


git-svn-id: http://core.svn.wordpress.org/trunk@52247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 10:31:04 +00:00
Clorith
d09e18c5cf External libraries: Update jQuery Color to 2.2.0
The NPM package for jQuery Color was updated in [50543], but a bundled version still existed within core.
This removes that bundled version, in favor of expanding the Grunt build steps to include the package from NPM instead.

Fixes #55016. See #51405.
Built from https://develop.svn.wordpress.org/trunk@52657


git-svn-id: http://core.svn.wordpress.org/trunk@52246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 01:22:04 +00:00
Peter Wilson
1ee362004f Upgrade: Prevent warnings upgrading cron array.
An unvisited site may have an undefined cron array, resulting in `_get_cron_array()` returning the value `false`. Previously this would trigger warning in `upgrade_590()` as the function assumed `_get_cron_array()` would alway return an array.

No database version change is required as the upgrade routine was successful on sites with a cron array during 5.9.0. On sites without a cron array, the error has already been thrown if they are running db version 51917. This fix is only required for new sites or those upgrading that have skipped 5.9.0.

Follow up to [51917].

Props chrisvanpatten, kapilpaul, SergeyBiryukov.
Fixes #54906.
See #53940.

Built from https://develop.svn.wordpress.org/trunk@52656


git-svn-id: http://core.svn.wordpress.org/trunk@52245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-02-01 00:14:06 +00:00
Sergey Biryukov
8de9cdf559 Docs: Add a comment to clarify the username_exists() check in wpmu_validate_blog_signup().
Creating a new site that matches an existing user's login name is not allowed, unless it's the user's own username.

Follow-up to [https://mu.trac.wordpress.org/changeset/550 mu:550], [https://mu.trac.wordpress.org/changeset/1364 mu:1364].

Props henry.wright, joyously, swissspidy, SergeyBiryukov.
Fixes #54326.
Built from https://develop.svn.wordpress.org/trunk@52655


git-svn-id: http://core.svn.wordpress.org/trunk@52244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-31 13:07:03 +00:00
John Blackbourn
eb338bd22d Build/Test Tools: Switch to some more appropriate assertions.
See #54725

Built from https://develop.svn.wordpress.org/trunk@52654


git-svn-id: http://core.svn.wordpress.org/trunk@52243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-30 19:42:00 +00:00
John Blackbourn
aed11c4067 Role/Capability: Correct the documented accepted types for the capability argument of WP_User_Query.
See #16841, #54729

Built from https://develop.svn.wordpress.org/trunk@52653


git-svn-id: http://core.svn.wordpress.org/trunk@52242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-30 19:34:00 +00:00
John Blackbourn
ecc08a41f6 Docs: Increase the specificity of types in various inline documentation.
See #54729

Built from https://develop.svn.wordpress.org/trunk@52652


git-svn-id: http://core.svn.wordpress.org/trunk@52241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-30 19:25:03 +00:00
Sergey Biryukov
effadc5da9 Twenty Twenty-Two: Optimize the assets/images/ducks.jpg image.
The new file should have a much better balance of quality and file size.

Follow-up to [52081], [52107].

Props kafleg, kjellr, jffng, kapilpaul.
Fixes #54911.
Built from https://develop.svn.wordpress.org/trunk@52651


git-svn-id: http://core.svn.wordpress.org/trunk@52240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-30 11:56:03 +00:00
Sergey Biryukov
b3aae615bb Users: Return a WP_Error from wp_insert_user() if the user_url field is too long.
The `user_url` database field only allows up to 100 characters, and if the value is longer than that, the function should return a proper error message instead of silently failing.

This complements similar checks for `user_login` and `user_nicename` fields.

Follow-up to [45], [1575], [32299], [34218], [34626].

Props mkox, sabernhardt, tszming, SergeyBiryukov.
Fixes #44107.
Built from https://develop.svn.wordpress.org/trunk@52650


git-svn-id: http://core.svn.wordpress.org/trunk@52239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-29 14:25:03 +00:00
audrasjb
c0cbf007f0 Administration: Add a top margin to Mail Server Port field on small screens.
This change fixes an overlapping issue on small screens in the Writing Settings screen.

Props pravinparmar2404, afercia, utz119, thimalw, sabernhardt, audrasjb.
Fixes #50177.

Built from https://develop.svn.wordpress.org/trunk@52649


git-svn-id: http://core.svn.wordpress.org/trunk@52238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-28 21:50:04 +00:00
Clorith
7ea33988e9 External libraries: Update jQuery UI to 1.13.1
Some regressions happened alongside the release of jQuery UI 1.13.0, this brings the fixes from 1.13.1 downstream to WordPress, notably relating to Widget, Autocomplete, Sortable, and Tooltip modules.

See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1

Props blogaid, linux4me2, mgol.
Fixes #54902.
Built from https://develop.svn.wordpress.org/trunk@52648


git-svn-id: http://core.svn.wordpress.org/trunk@52237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-28 16:44:05 +00:00
Sergey Biryukov
445d687680 Themes: Correct the width of theme preview on Add Themes screen.
This ensures that the preview ratio remains accurate for the user's screen size when the sidebar is open.

Follow-up to [19995], [20110], [20133], [20138], [28033].

Props shreyasikhar26, costdev, sumitsingh, SergeyBiryukov.
Fixes #54764.
Built from https://develop.svn.wordpress.org/trunk@52647


git-svn-id: http://core.svn.wordpress.org/trunk@52236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-28 12:10:04 +00:00
audrasjb
1d561e1fa6 Media: Remove target blank attribute from media uploader edit links.
This change removes a dispensable target blank attribute from Edit links displayed in the asynchronous file uploader.

Follow-up to [22755].

Props kebbet, SergeyBiryukov.
Fixes #54945.
See #23432.

Built from https://develop.svn.wordpress.org/trunk@52646


git-svn-id: http://core.svn.wordpress.org/trunk@52235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-27 22:17:00 +00:00
audrasjb
b3d3adaa2b Docs: Fix incorrect type in translations_api and translations_api_result docblocks.
Before this changeset, `translation_api` and `translation_api_result` filters were incorrectly marked as taking object as their first argument. The correct type is an array as `json_decode()` is asked to return an associative array.

Props volodymyrkolesnykov.
Fixes #54959.

Built from https://develop.svn.wordpress.org/trunk@52645


git-svn-id: http://core.svn.wordpress.org/trunk@52234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-27 21:15:03 +00:00
Sergey Biryukov
66dc00211b Upgrade/Install: Make sure the "Show hidden updates" button is visible and works as expected.
The [https://api.jquery.com/toggle-event/ .toggle( handler, handler )] method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9. 

This commit updates the click handler function to work with jQuery 1.9+.

Follow-up to [9441], [9543], [42785], [48323].

Props malinevskiy, SergeyBiryukov.
Fixes #54886.
Built from https://develop.svn.wordpress.org/trunk@52644


git-svn-id: http://core.svn.wordpress.org/trunk@52233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-26 13:11:29 +00:00
Sergey Biryukov
2eaeae58ff Docs: Update spelling for inline comments in a few files.
Per the [https://make.wordpress.org/core/handbook/best-practices/spelling/ spelling] and [https://make.wordpress.org/docs/style-guide/language-grammar/word-choice/ word choice] documentation guidelines, American (US) spelling should be preferred.

Props mohadeseghasemi, subrataemfluence, rehanali, SergeyBiryukov.
Fixes #46837.
Built from https://develop.svn.wordpress.org/trunk@52640


git-svn-id: http://core.svn.wordpress.org/trunk@52229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-25 13:55:05 +00:00
Sergey Biryukov
6329aacac8 Docs: Correct @global tag in wp_kses_xml_named_entities().
This updates the variable name in the DocBlock to the correct one.

Follow-up to [48072], [52229].

Props david.binda.
Fixes #54899.
Built from https://develop.svn.wordpress.org/trunk@52639


git-svn-id: http://core.svn.wordpress.org/trunk@52228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-25 11:16:05 +00:00
davidbaumwald
fe7d62fe13 Upgrade/Install: Update $_old_files for 5.9.
Props SergeyBiryukov, davidbaumwald.
Fixes #54894.
Built from https://develop.svn.wordpress.org/trunk@52637


git-svn-id: http://core.svn.wordpress.org/trunk@52225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 18:24:02 +00:00
desrosj
2900d9eccf Editor: Bump editor packages to include the latest fixes.
This merges the latest package updates for the block editor to include the fix for https://github.com/WordPress/gutenberg/pull/38175.

Props hellofromTonya, mamaduka, joen, talldanwp, cbravobernal, poena.
Fixes #54487.
Built from https://develop.svn.wordpress.org/trunk@52633


git-svn-id: http://core.svn.wordpress.org/trunk@52221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 15:57:28 +00:00
audrasjb
0e9a48e0cb Docs: Docblock corrections for get_block_file_template().
Follow-up to [52324].

Props johnbillion, SergeyBiryukov, costdev.
Fixes #54879.

Built from https://develop.svn.wordpress.org/trunk@52631


git-svn-id: http://core.svn.wordpress.org/trunk@52219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 15:28:02 +00:00
Dominik Schilling
70a7faa9dc Plugins/Themes: Allow to install/activate plugins/themes which require the WordPress version currently in development.
Twenty Twenty-Two requires WordPress 5.9 but currently can't be (re)activated in the 5.9 branch because `version_compare( '5.9-RC3-52627', '5.9', '>=' )` as used by `is_wp_version_compatible()` returns `false`. To appreciate the testing of upcoming versions any `-alpha`, `-RC`, `-beta` suffixes are now stripped off from the WordPress version before checking for compatibility.

Fixes #54882.
Built from https://develop.svn.wordpress.org/trunk@52628


git-svn-id: http://core.svn.wordpress.org/trunk@52216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 10:41:01 +00:00
Peter Wilson
0c51a7f11b Help/About: Update Freedoms page for 5.9.
Fixes #54270.


Built from https://develop.svn.wordpress.org/trunk@52626


git-svn-id: http://core.svn.wordpress.org/trunk@52214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 09:41:03 +00:00
noisysocks
939758a2b5 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Block Editor: Mark last change as persistent on save
- Site Editor: Restore ?styles=open functionality
- Site Editor: Fix resizable box scrollbars in blocks
- Add classic menus to menu switcher

See #54487.
Props talldanwp.

Built from https://develop.svn.wordpress.org/trunk@52624


git-svn-id: http://core.svn.wordpress.org/trunk@52212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 07:46:21 +00:00
noisysocks
01cb359adc Customizer: Remove Widgets panel when a theme does not support widgets
By setting 'theme_supports' on the panel, we ensure that the Widgets panel is
removed if a theme does not have support for 'widgets'.

This makes the behaviour of the Widgets and Menus panels consistent.

Follows [52621].
See #54888.
Props hellofromTonya, costdev, peterwilsoncc.

Built from https://develop.svn.wordpress.org/trunk@52622


git-svn-id: http://core.svn.wordpress.org/trunk@52210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 05:37:01 +00:00
noisysocks
4aaa1803ec Customizer: Remove Menus panel when a theme does not support menus
By overriding check_capabilities(), we can ensure that the Menus panel
is removed if a theme does not have support for 'menus' nor 'widgets'.

This ensures that the Menus panel does not appear when using a block
theme, which is confusing to users.

See #54888.
Props hellofromTonya, costdev, peterwilsoncc.

Built from https://develop.svn.wordpress.org/trunk@52621


git-svn-id: http://core.svn.wordpress.org/trunk@52209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-24 05:34:04 +00:00
Sergey Biryukov
997f8b9921 Coding Standards: Use a more appropriate variable name in link_advanced_meta_box().
Follow-up to [45667].

Props mkox, SergeyBiryukov.
Fixes #54856.
Built from https://develop.svn.wordpress.org/trunk@52620


git-svn-id: http://core.svn.wordpress.org/trunk@52208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-23 09:03:05 +00:00
desrosj
d332f43f60 Bundled Themes: Bump the versions for bundled themes for release.
This bumps the versions of the default bundled themes in preparation for release with WordPress 5.9.

The new versions are:
- Twenty Ten: 3.6
- Twenty Eleven: 4.0
- Twenty Twelve: 3.6
- Twenty Thirteen: 3.5
- Twenty Fourteen: 3.3
- Twenty Fifteen: 3.1
- Twenty Sixteen: 2.6
- Twenty Seventeen: 2.9
- Twenty Nineteen: 2.2
- Twenty Twenty: 1.9
- Twenty Twenty-One: 1.5

Props audrasjb.
Fixes #54783.
Built from https://develop.svn.wordpress.org/trunk@52618


git-svn-id: http://core.svn.wordpress.org/trunk@52206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-22 14:07:05 +00:00
desrosj
d6c4545f83 Bundled Themes: Reverts [52549].
[52549] updated some default presets in use by default themes to the new format. However, this change would cause elements to lose their styling when active on an older version of WordPress.

See #54782.
Built from https://develop.svn.wordpress.org/trunk@52615


git-svn-id: http://core.svn.wordpress.org/trunk@52203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-21 19:52:02 +00:00
desrosj
fb4199b676 Twenty Twenty-Two: Re-add the link to the theme’s HelpHub changelog.
See #54318.
Built from https://develop.svn.wordpress.org/trunk@52613


git-svn-id: http://core.svn.wordpress.org/trunk@52201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-21 19:42:01 +00:00
jffng
1229d642a2 Twenty Twenty-Two: update the required version.
This commit updates the required WordPress version of the 2022 default theme to 5.9 in advance of its release on January 25.

Props hellofromtonya, kjellr, desrosj.
See #54318.

Built from https://develop.svn.wordpress.org/trunk@52612


git-svn-id: http://core.svn.wordpress.org/trunk@52200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-21 19:05:07 +00:00
Sergey Biryukov
7f5d7f1b56 Date/Time: Add a unit test for the return type of current_datetime().
Follow-up to [45883].

Props pbearne.
Fixes #53484.
Built from https://develop.svn.wordpress.org/trunk@52611


git-svn-id: http://core.svn.wordpress.org/trunk@52199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-21 06:00:00 +00:00
audrasjb
99bac7e17c Docs: Replace "Current theme" with "Active theme" in various DocBlocks.
This change replaces "Current theme" with "Active theme" in various DocBlocks for better consistency with user-facing strings.

Follow-up to [52580].

Props Presskopp, audrasjb, costdev.
Fixes #54831.
See #54770.

Built from https://develop.svn.wordpress.org/trunk@52610


git-svn-id: http://core.svn.wordpress.org/trunk@52198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-20 23:53:05 +00:00
Sergey Biryukov
e07b5af042 General: Clarify the deprecation messages in the _deprecated_*() functions family.
This makes the strings easier to translate and provides more details about what exactly is deprecated: a PHP function, a file name, or a WordPress hook.

The changes apply to:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `_doing_it_wrong()`

Follow-up to [6514], [7884], [12536], [12584], [16939], [16942], [16945], [24439], [24723], [32989], [37861], [39315].

Props mukesh27, audrasjb, SergeyBiryukov.
Fixes #54658.
Built from https://develop.svn.wordpress.org/trunk@52609


git-svn-id: http://core.svn.wordpress.org/trunk@52197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-20 13:13:01 +00:00
audrasjb
d4306e8d8a Administration: Properly handle HTML entities in the News & Events dashboard widget.
This change adds support for various HTML entities in the News & Events dashboard widget.

Props nickciske, kpegoraro, iandunn, shedonist, sayedulsayem, sabernhardt, audrasjb, SergeyBiryukov, ocean90.
Fixes #41208.

Built from https://develop.svn.wordpress.org/trunk@52608


git-svn-id: http://core.svn.wordpress.org/trunk@52196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-20 09:19:07 +00:00
Sergey Biryukov
f8c10a28f5 Users: Revert the variable change in [52606] that caused the tests to fail.
Follow-up to [52604-52606].

Props audrasjb.
See #54690.
Built from https://develop.svn.wordpress.org/trunk@52607


git-svn-id: http://core.svn.wordpress.org/trunk@52195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-19 13:39:01 +00:00
Sergey Biryukov
3bc7449859 Docs: Further update the send_retrieve_password_email filter documentation for consistency.
Follow-up to [52604], [52605].

See #54690.
Built from https://develop.svn.wordpress.org/trunk@52606


git-svn-id: http://core.svn.wordpress.org/trunk@52194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-19 13:18:00 +00:00
audrasjb
0dcc9fd03a Docs: Docblocks consistency fixes after [52604].
Follow-up to [52604].

Fixes #54690.

Built from https://develop.svn.wordpress.org/trunk@52605


git-svn-id: http://core.svn.wordpress.org/trunk@52193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-19 12:42:01 +00:00
audrasjb
e87e3dcf58 Users: Add new hooks to filter retrieve password emails.
This change introduces two new hooks to help developers to filter retrieve password emails:

- `send_retrieve_password_email` can be used to filter whether to send the retrieve password email;
- `retrieve_password_notification_email` can be used to filter the contents of the reset password notification email sent to the user.

This changesets also adds unit tests for these new filters.

Props connapptivity, costdev, audrasjb, johnbillion.
Fixes #54690.

Built from https://develop.svn.wordpress.org/trunk@52604


git-svn-id: http://core.svn.wordpress.org/trunk@52192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-19 12:17:01 +00:00
Sergey Biryukov
48aa21e9d9 I18N: Improve the context for color-related strings in WP_Theme::translate_header().
* Use the `color scheme` context for the "Light" string, for more accuracy.
* Add the same context to the "Dark" string too, for consistency.

Follow-up to [37946], [52588].

Fixes #54804.
Built from https://develop.svn.wordpress.org/trunk@52603


git-svn-id: http://core.svn.wordpress.org/trunk@52191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-19 10:35:03 +00:00
Peter Wilson
f7151a6f3a Script loader: Prevent DB errors during Multisite install.
Prevent the script loader from attempting to create nonces during the installation process for Multisite configurations.

Prior to this fix, multiple "Table does not exist" errors were thrown during installation if `MULTISITE` was defined in the `wp-config.php` file but the salt constants were not defined. Without the salts defined in PHP, WP was attempting to use the database fallbacks prior to table creation.

Props schlessera, johnbillion, hellofromTonya, audrasjb, costdev.
Fixes #54800.


Built from https://develop.svn.wordpress.org/trunk@52602


git-svn-id: http://core.svn.wordpress.org/trunk@52190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-18 23:47:01 +00:00
hellofromTonya
1543616cff Editor: @wordpress package updates.
Update packages to include these bug fixes from Gutenberg:

* Navigation Block: update micromodal to `0.4.10` to fix menu close button on mobile

Props ryelle, poena, get_dave, talldanwp, aristath, kjellr, audrasjb, desrosj.
See #54487.
Built from https://develop.svn.wordpress.org/trunk@52598


git-svn-id: http://core.svn.wordpress.org/trunk@52186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-18 21:34:18 +00:00
Sergey Biryukov
ef5a994a3c Docs: Fix typos in some DocBlocks.
Props kebbet.
See #54729.
Built from https://develop.svn.wordpress.org/trunk@52597


git-svn-id: http://core.svn.wordpress.org/trunk@52185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-18 20:29:06 +00:00
noisysocks
cd191ca6fe Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Stop keypresses being caught by other elements when they happen in a CustomSelectControl
- Remove color, spacing, and layout options for Template Part block
- Try: parse shortcode blocks outside the content
- Fix aria-modal attribution with multiple navs on page
- Gallery block: Remove warning notice about mobile version required
- Fix Home template description typo 
- Fix enqueueing additional styles for blocks only when rendered
- fix typo (hanle -> handle)
- SelectControl: mark the children prop as optional
- Remove warning for enqueued styles in Editor
- Add context to font style and font weight related translation strings
- Temporarily remove text decoration from Nav block
- Fix empty secondary sidebar overlapping widget editor content on mobile viewports
- Fix hiding the bottom of tablet/mobile preview in Site Editor

See #54487.
Props isabel_brison.

Built from https://develop.svn.wordpress.org/trunk@52595


git-svn-id: http://core.svn.wordpress.org/trunk@52183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-18 03:39:26 +00:00
hellofromTonya
e158979d3d Editor: Explicitly load remote block patterns in the block and site editor screens.
Remote block patterns from wp.org were to be loaded through a callback hooked into the `current_screen` filter. Within 2 callbacks, i.e. `_load_remote_featured_patterns()` and `_load_remote_block_patterns()`, a guard clause bailed out early if the `$current_screen->is_block_editor` is `false`.

However, the `current_screen` filter is unreliable to detect the block editor. Why? In the block and Site Editor screens, `$current_scren->is_block_editor` is not set until after the filter is executed. Whoopsie.

This commit no longer uses the `current_screen` filter. Instead, it explicitly loads the remote block patterns by invoking both private functions (now not callbacks) directly in the screen files for the block and site editor screens.

With this change, passing `WP_Screen` object into these functions is no longer needed. As the `_load_remote_block_patterns()` function was introduced in 5.8.0, its function parameter is now deprecated and the guard clause retained for backwards compatibility.

Follow-up to [51021], [52377].

Props poena, noisysocks, peterwilsoncc, hellofromTonya, audrasjb.
Fixes #54806.
Built from https://develop.svn.wordpress.org/trunk@52593


git-svn-id: http://core.svn.wordpress.org/trunk@52181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-17 22:42:03 +00:00
hellofromTonya
c20c8a99bd 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.
Built from https://develop.svn.wordpress.org/trunk@52591


git-svn-id: http://core.svn.wordpress.org/trunk@52179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-17 19:55:04 +00:00
jffng
56b4c0e838 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.

Built from https://develop.svn.wordpress.org/trunk@52589


git-svn-id: http://core.svn.wordpress.org/trunk@52177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-17 15:43:59 +00:00
audrasjb
442b46dc2f 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.

Built from https://develop.svn.wordpress.org/trunk@52588


git-svn-id: http://core.svn.wordpress.org/trunk@52176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-17 15:38:01 +00:00
Sergey Biryukov
ab263f93e5 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.
Built from https://develop.svn.wordpress.org/trunk@52585


git-svn-id: http://core.svn.wordpress.org/trunk@52175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-17 11:41:03 +00:00
Sergey Biryukov
c6829b3afc 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.
Built from https://develop.svn.wordpress.org/trunk@52584


git-svn-id: http://core.svn.wordpress.org/trunk@52174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-16 08:40:00 +00:00
Sergey Biryukov
81a1fc33cb 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.
Built from https://develop.svn.wordpress.org/trunk@52583


git-svn-id: http://core.svn.wordpress.org/trunk@52173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-16 08:16:04 +00:00
audrasjb
8669c16e04 Docs: Miscellaneous docblock corrections in REST API and Sitemaps API.
Props kebbet.
See #54729.

Built from https://develop.svn.wordpress.org/trunk@52582


git-svn-id: http://core.svn.wordpress.org/trunk@52172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 21:22:02 +00:00
Sergey Biryukov
0bc24dd81f 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.
Built from https://develop.svn.wordpress.org/trunk@52581


git-svn-id: http://core.svn.wordpress.org/trunk@52171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 20:49:06 +00:00
audrasjb
e05557e222 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.

Built from https://develop.svn.wordpress.org/trunk@52580


git-svn-id: http://core.svn.wordpress.org/trunk@52170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 08:44:03 +00:00
audrasjb
ab28757878 Docs: Typo correction in WP_REST_Response class docblocks.
Follow-up to [34928].

Props kebbet.
Fixes #54823.

Built from https://develop.svn.wordpress.org/trunk@52578


git-svn-id: http://core.svn.wordpress.org/trunk@52168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-14 21:15:04 +00:00
Sergey Biryukov
59287c1157 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.
Built from https://develop.svn.wordpress.org/trunk@52577


git-svn-id: http://core.svn.wordpress.org/trunk@52167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-14 17:52:01 +00:00
audrasjb
d73a6bcc64 Upgrade/Install: Typo correction in a Core_Upgrader class inline comment.
Follow-up to [45046].

Props kebbet.
Fixes #54821.

Built from https://develop.svn.wordpress.org/trunk@52576


git-svn-id: http://core.svn.wordpress.org/trunk@52166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-14 15:14:00 +00:00
audrasjb
ed1421fa32 XML-RPC: Fix typos in some XMLRPC related docblocks.
Props kebbet, shreyasikhar26.
Fixes #54820.

Built from https://develop.svn.wordpress.org/trunk@52575


git-svn-id: http://core.svn.wordpress.org/trunk@52165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-14 14:45:05 +00:00
audrasjb
0439ef8279 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.

Built from https://develop.svn.wordpress.org/trunk@52574


git-svn-id: http://core.svn.wordpress.org/trunk@52164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-14 11:02:06 +00:00
audrasjb
b4de570d35 Media: Typo correction in wp_image_maybe_exif_rotate docblock.
Follow-up to [46202].

Props mitogh.
Fixes #54816.

Built from https://develop.svn.wordpress.org/trunk@52573


git-svn-id: http://core.svn.wordpress.org/trunk@52163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-13 19:14:05 +00:00
Sergey Biryukov
e840d56df5 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.
Built from https://develop.svn.wordpress.org/trunk@52572


git-svn-id: http://core.svn.wordpress.org/trunk@52162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-13 01:04:01 +00:00
audrasjb
b14d7a8149 Administration: Fix an erroneous translators comment after changeset [52569].
This change also fixes the indentation of the translators comment.

Fixes #54798.

Built from https://develop.svn.wordpress.org/trunk@52571


git-svn-id: http://core.svn.wordpress.org/trunk@52161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-12 23:45:01 +00:00
audrasjb
b00a83b996 Tests: Trac ticket number correction after changeset [52569].
Follow-up to [52569].

See #54798.

Built from https://develop.svn.wordpress.org/trunk@52570


git-svn-id: http://core.svn.wordpress.org/trunk@52160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-12 23:30:59 +00:00
audrasjb
725e1d02af 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.

Built from https://develop.svn.wordpress.org/trunk@52569


git-svn-id: http://core.svn.wordpress.org/trunk@52159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-12 23:25:08 +00:00
Sergey Biryukov
23be3c2b55 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.
Built from https://develop.svn.wordpress.org/trunk@52568


git-svn-id: http://core.svn.wordpress.org/trunk@52158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-12 11:17:08 +00:00
ryelle
c3c39a22b9 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.


Built from https://develop.svn.wordpress.org/trunk@52563


git-svn-id: http://core.svn.wordpress.org/trunk@52153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 18:36:00 +00:00
ryelle
908a08696b 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.


Built from https://develop.svn.wordpress.org/trunk@52562


git-svn-id: http://core.svn.wordpress.org/trunk@52152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 18:27:03 +00:00
davidbaumwald
f950eec323 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.
Built from https://develop.svn.wordpress.org/trunk@52558


git-svn-id: http://core.svn.wordpress.org/trunk@52148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 17:16:00 +00:00
hellofromTonya
2a686addf0 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.
Built from https://develop.svn.wordpress.org/trunk@52556


git-svn-id: http://core.svn.wordpress.org/trunk@52146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 16:00:01 +00:00
jffng
fcdf1ce242 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.

Built from https://develop.svn.wordpress.org/trunk@52555


git-svn-id: http://core.svn.wordpress.org/trunk@52145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 15:58:02 +00:00
hellofromTonya
3abe551097 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.
Built from https://develop.svn.wordpress.org/trunk@52554


git-svn-id: http://core.svn.wordpress.org/trunk@52144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 15:18:03 +00:00
Sergey Biryukov
56d10309d0 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.
Built from https://develop.svn.wordpress.org/trunk@52553


git-svn-id: http://core.svn.wordpress.org/trunk@52143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 04:12:05 +00:00
noisysocks
114bff87cf 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.


Built from https://develop.svn.wordpress.org/trunk@52551


git-svn-id: http://core.svn.wordpress.org/trunk@52141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-11 03:13:33 +00:00
jorgefilipecosta
83dc7c318b 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.
Built from https://develop.svn.wordpress.org/trunk@52549


git-svn-id: http://core.svn.wordpress.org/trunk@52139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-10 18:29:02 +00:00
jorgefilipecosta
6d30d2a5d6 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.
Built from https://develop.svn.wordpress.org/trunk@52547


git-svn-id: http://core.svn.wordpress.org/trunk@52137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-10 17:29:03 +00:00
davidbaumwald
2d8ba6acd9 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.
Built from https://develop.svn.wordpress.org/trunk@52546


git-svn-id: http://core.svn.wordpress.org/trunk@52136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-10 16:45:04 +00:00
audrasjb
8cd983dee4 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.

Built from https://develop.svn.wordpress.org/trunk@52545


git-svn-id: http://core.svn.wordpress.org/trunk@52135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-10 08:50:01 +00:00
Sergey Biryukov
b2ac6dcca8 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.
Built from https://develop.svn.wordpress.org/trunk@52544


git-svn-id: http://core.svn.wordpress.org/trunk@52134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-10 01:56:02 +00:00
audrasjb
461cd1373e 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.

Built from https://develop.svn.wordpress.org/trunk@52543


git-svn-id: http://core.svn.wordpress.org/trunk@52133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-09 23:14:04 +00:00
Sergey Biryukov
6dde735e3e Coding Standards: Use strict comparison in wp-admin/themes.php.
Follow-up to [15646], [30697].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52540


git-svn-id: http://core.svn.wordpress.org/trunk@52130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-08 01:22:02 +00:00
davidbaumwald
aeb5d2ef17 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.
Built from https://develop.svn.wordpress.org/trunk@52539


git-svn-id: http://core.svn.wordpress.org/trunk@52129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-07 17:55:01 +00:00
Sergey Biryukov
10e842a662 Coding Standards: Use strict comparison in wp-admin/revision.php.
Follow-up to [7913], [12751].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52538


git-svn-id: http://core.svn.wordpress.org/trunk@52128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-07 16:47:00 +00:00
audrasjb
286e4fa9b0 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.

Built from https://develop.svn.wordpress.org/trunk@52537


git-svn-id: http://core.svn.wordpress.org/trunk@52127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-07 11:21:04 +00:00
audrasjb
68136b50c4 Tests: Update qUnit test fixtures after [52535].
See #54745.

Built from https://develop.svn.wordpress.org/trunk@52536


git-svn-id: http://core.svn.wordpress.org/trunk@52126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 23:28:22 +00:00
audrasjb
f88037f0f4 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.

Built from https://develop.svn.wordpress.org/trunk@52535


git-svn-id: http://core.svn.wordpress.org/trunk@52125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 23:27:14 +00:00
Sergey Biryukov
e38bb277ea Coding Standards: Use strict comparison in wp-admin/plugin-install.php.
Follow-up to [11366].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52534


git-svn-id: http://core.svn.wordpress.org/trunk@52124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 23:26:06 +00:00
desrosj
77a972838c Formatting: Correctly encode ASCII characters in post slugs.
Props zieladam, whyisjake, xknown, peterwilsoncc, desrosj, iandunn.
Built from https://develop.svn.wordpress.org/trunk@52457


git-svn-id: http://core.svn.wordpress.org/trunk@52049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 17:10:00 +00:00
desrosj
638ef7815e Upgrade/Install: Avoid using unserialize() unnecessarily.
Props vortfu, xknown, dd32.
Built from https://develop.svn.wordpress.org/trunk@52456


git-svn-id: http://core.svn.wordpress.org/trunk@52048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 17:07:03 +00:00
desrosj
c9c4dabcc1 Query: Improve sanitization within WP_Meta_Query.
Props vortfu, xknown, dd32.
Built from https://develop.svn.wordpress.org/trunk@52455


git-svn-id: http://core.svn.wordpress.org/trunk@52047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 17:05:02 +00:00
desrosj
271b1f60cd Query: Improve sanitization within WP_Tax_Query.
Props dd32, xknown, peterwilsoncc, ehtis.
Built from https://develop.svn.wordpress.org/trunk@52454


git-svn-id: http://core.svn.wordpress.org/trunk@52046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 17:03:05 +00:00
audrasjb
a02b7770f4 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.

Built from https://develop.svn.wordpress.org/trunk@52453


git-svn-id: http://core.svn.wordpress.org/trunk@52045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-06 09:18:06 +00:00
audrasjb
2699b3032a 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.

Built from https://develop.svn.wordpress.org/trunk@52452


git-svn-id: http://core.svn.wordpress.org/trunk@52044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-05 22:14:59 +00:00
Sergey Biryukov
c9cf90786c 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.
Built from https://develop.svn.wordpress.org/trunk@52451


git-svn-id: http://core.svn.wordpress.org/trunk@52043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-05 21:07:00 +00:00
davidbaumwald
55aaefe766 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.
Built from https://develop.svn.wordpress.org/trunk@52450


git-svn-id: http://core.svn.wordpress.org/trunk@52042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-05 17:37:03 +00:00
hellofromTonya
9f9440a039 Build/Test Tools: Add the 5.9 branch to the workflow for testing branches.
Built from https://develop.svn.wordpress.org/trunk@52449


git-svn-id: http://core.svn.wordpress.org/trunk@52041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 21:31:01 +00:00
Sergey Biryukov
5fc6f2a488 Trunk is now 6.0-alpha.
Built from https://develop.svn.wordpress.org/trunk@52448


git-svn-id: http://core.svn.wordpress.org/trunk@52040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 20:54:00 +00:00
Sergey Biryukov
e61c53f2e1 Post WordPress 5.9 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@52446


git-svn-id: http://core.svn.wordpress.org/trunk@52038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 20:41:02 +00:00
Sergey Biryukov
d7f62c5732 WordPress 5.9 RC1.
Built from https://develop.svn.wordpress.org/trunk@52445


git-svn-id: http://core.svn.wordpress.org/trunk@52037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 20:15:08 +00:00
hellofromTonya
790d5ac07a Help/About: Use "refactoring" noun form in WordPress 5.9 About Page.
Follow-up to [52438].

Props tobifjellner, costdev, marybaum.
See #54270.
Built from https://develop.svn.wordpress.org/trunk@52444


git-svn-id: http://core.svn.wordpress.org/trunk@52036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 19:50:01 +00:00
ryelle
cfd9559523 Administration: Add missing texture image for Welcome panel & About page.
See #54489, #54270.


Built from https://develop.svn.wordpress.org/trunk@52443


git-svn-id: http://core.svn.wordpress.org/trunk@52035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 19:18:01 +00:00
ryelle
6868a257c1 Administration: Refresh the Dashboard Welcome panel.
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.


Built from https://develop.svn.wordpress.org/trunk@52442


git-svn-id: http://core.svn.wordpress.org/trunk@52034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 19:13:02 +00:00
davidbaumwald
5d9af9adac HTTP API: Improve docs for wp_remote_retrieve_header function return value.
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.
Built from https://develop.svn.wordpress.org/trunk@52441


git-svn-id: http://core.svn.wordpress.org/trunk@52033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 18:54:00 +00:00
hellofromTonya
79a705c8d8 Coding Standard: Remove empty space at end of inline comment in _add_default_theme_supports().
Follow-up to [52439].

See #54731.
Built from https://develop.svn.wordpress.org/trunk@52440


git-svn-id: http://core.svn.wordpress.org/trunk@52032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 18:49:00 +00:00
hellofromTonya
e414b65dfe Themes: Make block themes support HTML5 by default.
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.
Built from https://develop.svn.wordpress.org/trunk@52439


git-svn-id: http://core.svn.wordpress.org/trunk@52031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 18:40:00 +00:00
ryelle
ee6093c4eb Help/About: WordPress 5.9 About Page.
Introducing the new About page for 5.9.

Props dansoschin, critterverse, webcommsat, marybaum, nalininonstopnewsuk, sabernhardt, costdev, chanthaboune, cbringmann, mkaz, davidbaumwald, ryelle, melchoyce, annezazu, paaljoachim, audrasjb, hellofromtonya, walbo, tobifjellner, mitogh


Built from https://develop.svn.wordpress.org/trunk@52438


git-svn-id: http://core.svn.wordpress.org/trunk@52030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 18:35:03 +00:00
audrasjb
90100ff883 Embeds: Fix oEmbed host script enqueueing on block-based themes.
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.

Built from https://develop.svn.wordpress.org/trunk@52437


git-svn-id: http://core.svn.wordpress.org/trunk@52029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 15:23:59 +00:00
audrasjb
b042b70e68 REST API: Add unit tests for the 404 template slug handler.
Props ockham, SergeyBiryukov, hellofromTonya, rachelbaker.
Fixes #54680.

Built from https://develop.svn.wordpress.org/trunk@52436


git-svn-id: http://core.svn.wordpress.org/trunk@52028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 14:25:02 +00:00
audrasjb
937398741b Login and registration: Rename login_language_switcher_args to login_language_dropdown_args.
This change adds better consistency with the other `*_dropdown_args` filters, like `taxonomy_parent_dropdown_args` or `widget_archives_dropdown_args`. It is also more consistent with the new `login_display_language_dropdown` filter.

Props SergeyBiryukov, faisal03.
Fixes #54696.

Built from https://develop.svn.wordpress.org/trunk@52435


git-svn-id: http://core.svn.wordpress.org/trunk@52027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 08:30:04 +00:00
noisysocks
28a12c8bce Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Site Logo: Add option to set site icon from Site Logo block
- Navigation: Enable even more compact setup state.
- Remove template parts from post content inserter an __unstable filter
- Template Editor Mode: Hide editor mode switcher
- Avoid using CSS variables for block gap styles
- Try to fix auto resizing in template part focus mode
- Lower the specificity of font size CSS Custom Properties in the editor
- Site icon: Fix site icon styling to display non-square site icons within a square button
- [Site Editor]: Register block editor shortcuts
- Update regex to handle 404 template slug
- Site Editor: Remove dead code
- [Block Editor]: Restrict delete multi selected blocks shortcut
- Fix: Gradients are not being applied by class
- Update: Make the global styles subtitles font smaller
- Post Content/Title: Reflect changes when previewing post
- ServerSideRender: Fix loading state
- [Block Library]: Fix editable post blocks in Query Loop with zero queryId
- Post Excerpt: Fix previews
- WP59: Contextualize "Export" string to differentiate it from other occurrences in WP Core
- Tools Panel: Fix race conditions caused by conditionally displayed ToolsPanelItems
- ToolsPanel: Allow items to register when panelId is null
- Font Size Picker: Allow non-integers as simple CSS values and in hints
- [Components - FontSizePicker]: Use incremental sequence of numbers as labels for the available font-sizes at the segmented control (conditionally)

See #54487.

Built from https://develop.svn.wordpress.org/trunk@52434


git-svn-id: http://core.svn.wordpress.org/trunk@52026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 05:39:28 +00:00
audrasjb
15b614acc3 Revisions: Improve _set_preview for case when autosave is missing.
This change fixes an issue where autosaves are deleted when a new autosave is sent with the same data. In the block editor, this causes the preview data to be missing on post previews. The end result of this is that if one set a preview image using a block theme on a published post and preview it, the featured image is not displayed correctly. Skipping deleting the previous autosave fixes the issue.

Props adamsilverstein, walbo, audrasjb, Mamaduka, hellofromTonya.
Fixes #54708.

Built from https://develop.svn.wordpress.org/trunk@52433


git-svn-id: http://core.svn.wordpress.org/trunk@52025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-04 00:20:01 +00:00
audrasjb
4f16b910f3 Login and registration: Rename two filters related to language dropdown for better consistency.
This change renames two filters introduced in WP 5.9 development cycle. It replaces `display_login_language_dropdown` with `login_display_language_dropdown` and `wp_login_language_switcher_args` with `login_language_switcher_args`, for better consistency with the other existing `login_*` filters.

Props kebbet, mukesh27, audrasjb, Clorith, hellofromTonya.
Fixes #54696.

Built from https://develop.svn.wordpress.org/trunk@52432


git-svn-id: http://core.svn.wordpress.org/trunk@52024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-03 22:14:00 +00:00
Sergey Biryukov
65ebdf45d8 Coding Standards: Use strict comparison in wp-admin/options.php.
Follow-up to [21852], [47874], [51075].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52431


git-svn-id: http://core.svn.wordpress.org/trunk@52023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-03 21:28:01 +00:00
audrasjb
ed53ea3ace Twenty Twenty-Two: Sync updates from GitHub for RC 1.
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], and [52392].

To view the full set of changes, visit 2ce387178f...8564fd281f.

This changeset also deletes three unused files. These were removed from the dev repo, but never removed from core.

Props richtabor, kjellr.
See #54318.

Built from https://develop.svn.wordpress.org/trunk@52430


git-svn-id: http://core.svn.wordpress.org/trunk@52022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-03 20:26:04 +00:00
hellofromTonya
cfcff52de3 External Libraries: Update jQuery hoverIntent to version 1.10.2.
This updates the `jquery-hoverintent` dependency from 1.10.1 to 1.10.2, which fixes the deprecation of `jQuery.isFunction`.

For a full list of changes, see https://github.com/briancherne/jquery-hoverIntent/compare/v1.10.1...v1.10.2.

Follow-up to [50521].

Props titsmaker.
Fixes #54722. See #51812.
Built from https://develop.svn.wordpress.org/trunk@52429


git-svn-id: http://core.svn.wordpress.org/trunk@52021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-03 15:03:18 +00:00
Sergey Biryukov
54b155f4a5 Coding Standards: Use strict comparison in wp-admin/options-reading.php.
Follow-up to [16816].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52428


git-svn-id: http://core.svn.wordpress.org/trunk@52020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-02 16:47:05 +00:00
Sergey Biryukov
5abfff6c70 Happy New Year! 🎄
Update copyright year to 2022 in `license.txt` and bundled themes.
Built from https://develop.svn.wordpress.org/trunk@52427


git-svn-id: http://core.svn.wordpress.org/trunk@52019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-01 00:15:02 +00:00
audrasjb
c8050da1d3 Users: Use the "Posts" post type general name to contextualize the string used in Users posts count column label.
Since some locales may differentiate "Posts" generic post type name (works for both posts, pages, and custom post types) and "Posts" when speaking about blogposts, this change aims to contextualize the use of the "Posts" string in the "Users" admin screen. This change reuses the string used for the "Posts" post type registration, to avoid introducing any new string to translate.

Props audrasjb, jdy68, SergeyBiryukov.
Fixes #54712.

Built from https://develop.svn.wordpress.org/trunk@52426


git-svn-id: http://core.svn.wordpress.org/trunk@52018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-31 15:30:01 +00:00
Sergey Biryukov
3ec2d2fcfa Build/Test Tools: Update PHPCompatibilityWP to version 2.1.3.
The latest release takes the new polyfills added in WordPress 5.9 into account.

This commit also removes redundant inline ignore comments for WP-polyfilled functionality. The PHPCompatibilityWP ruleset explicitly excludes those polyfills, so they don't need to be annotated as ignored.

Release notes:
https://github.com/PHPCompatibility/PHPCompatibilityWP/releases/tag/2.1.3

For a full list of changes in this update, see the PHPCompatibilityWP GitHub:
https://github.com/PHPCompatibility/PHPCompatibilityWP/compare/2.1.2...2.1.3

Follow-up to [46290], [51543].

Props jrf.
Fixes #54711.
Built from https://develop.svn.wordpress.org/trunk@52425


git-svn-id: http://core.svn.wordpress.org/trunk@52017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-31 13:55:03 +00:00
Sergey Biryukov
2e8ac63be2 Tests: Add a unit test for the recommended MariaDB version in readme.html.
Per the [https://mariadb.org/about/#maintenance-policy MariaDB maintenance policy], MariaDB releases are supported for 5 years from the first stable (GA) release.

The test ensures that the recommended MariaDB version in `readme.html` is not older than 5 years.

Follow-up to [31291], [35759], [52319], [52358], [52418], [meta11407], [52420], [52421].

Fixes #41490.
Built from https://develop.svn.wordpress.org/trunk@52424


git-svn-id: http://core.svn.wordpress.org/trunk@52016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-30 16:29:02 +00:00
John Blackbourn
1a137ef17a Docs: Further corrections and improvements to the inline documentation for wpdb.
See #53399, #54610

Built from https://develop.svn.wordpress.org/trunk@52423


git-svn-id: http://core.svn.wordpress.org/trunk@52015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-29 23:14:01 +00:00
John Blackbourn
678f2ceb0d Docs: Miscellaneous inline documentation improvements.
See #53399

Built from https://develop.svn.wordpress.org/trunk@52422


git-svn-id: http://core.svn.wordpress.org/trunk@52014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-29 17:28:00 +00:00
Sergey Biryukov
9fb855eb48 Tests: Correct the check for the recommended MySQL version in readme.html.
This updates the regular expression in the test to retrieve the date of the first, instead of the last, GA release for the recommended MySQL branch, in order to properly track the EOL date.

Additionally, as the currently recommended MySQL 5.7 branch moved from active support to extended support on 2020-10-21, and WordPress core is not fully compatible with MySQL 8.0 at this time, this commit increases the “supported” period from 5 to 8 years to include extended support.

Follow-up to [31291], [35759], [meta11407], [52420].

See #41490.
Built from https://develop.svn.wordpress.org/trunk@52421


git-svn-id: http://core.svn.wordpress.org/trunk@52013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-29 16:36:05 +00:00
Sergey Biryukov
aef38ab0e6 General: Bump the recommended MySQL and MariaDB versions in readme.html.
* MySQL 5.6 has reached EOL (“End of Life”) in February 2021. The recommended minimum is bumped to 5.7 for now.
* MariaDB 10.1 has reached EOL in October 2020. The recommended minimum is bumped to 10.2 for now.

Follow-up to [31291], [35759], [52319], [52358], [meta11407].

Props JavierCasares, SergeyBiryukov.
See #41490, #meta5999.
Built from https://develop.svn.wordpress.org/trunk@52420


git-svn-id: http://core.svn.wordpress.org/trunk@52012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-28 17:38:04 +00:00
Sergey Biryukov
05a3e19924 Plugins: Escape the WordPress.org plugin page URL in the Plugin Installation modal.
Follow-up to [8540], [38953].

Props chintan1896, Presskopp, dimadin, henry.wright, aezazshekh, SergeyBiryukov.
Fixes #54362.
Built from https://develop.svn.wordpress.org/trunk@52419


git-svn-id: http://core.svn.wordpress.org/trunk@52011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-27 16:06:02 +00:00
Sergey Biryukov
2caff694aa Tests: Separate the tests for recommended PHP and MySQL versions in readme.html
This aims to simplify the individual tests and reduce duplication using a helper function.

Follow-up to [52260], [52319], [52358].

See #41490.
Built from https://develop.svn.wordpress.org/trunk@52418


git-svn-id: http://core.svn.wordpress.org/trunk@52010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-26 23:42:05 +00:00
audrasjb
3366e3859f Login and Registration: Use secondary button style for the Language switcher.
This change avoids having two primary buttons in the login screen.

Props rainbowgeek, audrasjb.
Fixes #54692.

Built from https://develop.svn.wordpress.org/trunk@52417


git-svn-id: http://core.svn.wordpress.org/trunk@52009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-25 11:36:59 +00:00
audrasjb
d738794637 Docs: Typo correction in validate_file() comments.
See #53399.

Built from https://develop.svn.wordpress.org/trunk@52416


git-svn-id: http://core.svn.wordpress.org/trunk@52008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-25 11:17:04 +00:00
Sergey Biryukov
ef7cf47ec4 Administration: Make sure the $customize_url variable is always defined in the admin menu.
This avoids an `Undefined variable` PHP warning when displaying other admin menu items.

Follow-up to [52069], [52134], [52158], [52178], [52414].

Props afragen.
Fixes #54682.
Built from https://develop.svn.wordpress.org/trunk@52415


git-svn-id: http://core.svn.wordpress.org/trunk@52007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-25 03:32:03 +00:00
Sergey Biryukov
7996e87f38 Toolbar: Show the Customize link on front end when using a block theme if any plugins use the Customizer.
In WordPress 5.9, when a block theme is being used, the `Appearance → Customize` admin menu item is not present unless a plugin uses the Customizer.

The Customize admin bar node should be shown on the front end if any plugins are using the Customizer, even if the current theme is a block theme.

This commit mirrors a similar check in the admin menu to determine if the Customize link should be displayed.

Follow-up to [52069], [52134], [52158], [52178].

Props pbiron, audrasjb, sabernhardt, costdev.
Fixes #54683.
Built from https://develop.svn.wordpress.org/trunk@52414


git-svn-id: http://core.svn.wordpress.org/trunk@52006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-25 03:17:04 +00:00
Sergey Biryukov
aea5f0cbde External Libraries: Update the SimplePie library to version 1.5.8.
This minor update corrects the `SIMPLEPIE_VERSION` constant and updates the changelog after the previous release.

Release notes: https://github.com/simplepie/simplepie/releases/tag/1.5.8

For a full list of changes in this update, see the SimplePie GitHub:
https://github.com/simplepie/simplepie/compare/1.5.7...1.5.8

Follow-up to [47733], [49176], [52393].

Props faisal03, jrf, audrasjb, SergeyBiryukov.
Fixes #54659.
Built from https://develop.svn.wordpress.org/trunk@52413


git-svn-id: http://core.svn.wordpress.org/trunk@52005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-24 18:06:06 +00:00
Sergey Biryukov
67b9822eda Build/Test Tools: Allow the PHPCS plugin in Composer configuration.
The `dealerdirect/phpcodesniffer-composer-installer` Composer plugin is used to register external PHPCS standards with PHPCS.

As of Composer 2.2, Composer plugins need to be explicitly allowed to run. This commit adds the necessary configuration for that to prevent Composer asking every single time `composer install` or `composer update` is run.

Reference: [https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution Composer 2.2: More secure plugin execution].

Props jrf, johnbillion.
Fixes #54686.
Built from https://develop.svn.wordpress.org/trunk@52412


git-svn-id: http://core.svn.wordpress.org/trunk@52004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-23 20:12:03 +00:00
Sergey Biryukov
ee282eba1b Build/Test Tools: Restore the https URL for browserify-aes.
Follow-up to [52000], [52156], [52402].

See #54487.
Built from https://develop.svn.wordpress.org/trunk@52411


git-svn-id: http://core.svn.wordpress.org/trunk@52003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-23 17:03:04 +00:00
audrasjb
b788e6255a Docs: Typo correction in wp_get_layout_style() introduced in 5.9.
Follow-up to [52069].

See #53399.

Built from https://develop.svn.wordpress.org/trunk@52410


git-svn-id: http://core.svn.wordpress.org/trunk@52002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-22 23:20:04 +00:00
Sergey Biryukov
4a22a4cec3 Editor: Add missing default template areas to the post/page editor settings.
This ensures that default template area settings are displayed when editing a template in the post/page editor, which previously got lost during backporting for 5.9.

Follow-up to [52232].

Props Mamaduka, costdev, gziolo.
Fixes #54679.
Built from https://develop.svn.wordpress.org/trunk@52409


git-svn-id: http://core.svn.wordpress.org/trunk@52001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-22 13:00:03 +00:00
Sergey Biryukov
9cb7908de2 Post WordPress 5.9 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@52408


git-svn-id: http://core.svn.wordpress.org/trunk@52000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 21:14:59 +00:00
Sergey Biryukov
e88674b232 WordPress 5.9 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@52407


git-svn-id: http://core.svn.wordpress.org/trunk@51999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 20:32:59 +00:00
hellofromTonya
673ab8a677 Administration: Add "File" to Theme/Plugin Editor menu names and relocate "Plugin File Editor" to Tools for block themes.
[52232] relocated the Theme Editor menu item from Appearance to Tools for block themes. This commit relocates the Plugin  Editor menu item from Plugins to Tools for block themes for a consistent workflow.

Both the Theme Editor and Plugin Editor menu items are renamed to "Theme File Editor" and "Plugin File Editor" respectively. Why? To better identify their purpose, i.e. to directly edit the code in the theme or plugin files. The rename is not limited to only block themes. 

Follow-up to [52232].

Props poena, annezazu, audrasjb, clorith, courane01, costdev, dryanpress, desrosj, hellofromTonya, ipstenu, jameskoster, joen, johnbillion, joyously, manfcarlo, marybaum, pbiron, SergeyBiryukov, walbo, youknowriad.
Fixes #54382.
Built from https://develop.svn.wordpress.org/trunk@52406


git-svn-id: http://core.svn.wordpress.org/trunk@51998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 20:06:02 +00:00
audrasjb
5e08149bf4 Coding Standards: Remove unwanted whitespaces after [52404].
Follow-up to [52404].

See #54675.

Built from https://develop.svn.wordpress.org/trunk@52405


git-svn-id: http://core.svn.wordpress.org/trunk@51997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 19:00:00 +00:00
audrasjb
d0b3567730 Login and registration: Add a filter to allow to disable the Login screen language dropdown.
This change introduces the `display_login_language_dropdown` filter which allows to disable the Login screen language dropdown. 

Follow-up to [52058].

Props rickcurran, audrasjb, ocean90, hellofromtonya, costdev, johnbillion.
Fixes #54675.

Built from https://develop.svn.wordpress.org/trunk@52404


git-svn-id: http://core.svn.wordpress.org/trunk@51996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 18:52:03 +00:00
Sergey Biryukov
e6b9b96130 Docs: Improve the @since 5.9.0 note for WP_Theme_JSON::PRESETS_METADATA.
Follow-up to [52320], [52401].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52403


git-svn-id: http://core.svn.wordpress.org/trunk@51995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 10:20:04 +00:00
isabel_brison
4939393799 Update @wordpress packages for Beta 4
Update packages with these bug fixes from Gutenberg:

Navigation: Remove hardcoded typography units
Handle parsed request
Navigation: Refactor modal padding to be simpler and more flexible
Show notice on save in site editor
Add aria-pressed true/false to Toggle navigation button based on state
Components FontSizePicker: Use incremental sequence of numbers
Custom keys from theme.json: fix kebabCase conversion
Template Part: Fix 'isMissing' condition check
Multi-Entity Saving: Decode HTML entities in item titles
Font sizes: update default values
Query Loop: Add useBlockPreview, fix Query Loop wide alignment
Only add dialog role to navigation when modal is open
Fix navigation appender
Show a UI warning when user does not have permission to update/edit a Navigation block
Block editor: Fix Enter handling for nested blocks
Update: Use subtitle styles for the palette names
Allow publishing a post while not saving changes to non-post entities
Update: Block top level useSetting paths
Fix Site Logo block alignment issues
Editor: when Toggle navigation receives state false, focus
ToolsPanel: Allow items to register when panelId is null
Block Support Panels - Make block support tools panels compatible
Gallery: Fix block registration hook priority
Navigation: Fix page list issues in overlay
Ensure the overlay menu works when inserting navigation block pattern
Restrict Navigation permissions and show UI warning if cannot create
Add block gap support for group blocks
Try cascading nav styles through classnames
Fix: Impossible to edit theme and default colors
Fix: Color editor discards colors with default name
Site Editor: Fix template author avatar check
Template Editing Mode: Fix options dropdown
Avoid undo issues when reset parent blocks for controlled blocks
Add comment-form and comment-list to html5 theme support and fix comment layout

Props hellofromtonya.
See #54487.

Built from https://develop.svn.wordpress.org/trunk@52402


git-svn-id: http://core.svn.wordpress.org/trunk@51994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 07:02:34 +00:00
hellofromTonya
af941fc10c Editor: Add support for nameless font sizes in WP_Theme_JSON.
With nameless font sizes support, themes use the defaults by not declaring the `"name"` setting for their `fontSizes` in `theme.json`.

Backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37410.

Follow-up to [50973], [52049], [52275], [52320].

Props ntsekouras, costdev, hellofromTonya.
Fixes #54640. See #54487.
Built from https://develop.svn.wordpress.org/trunk@52401


git-svn-id: http://core.svn.wordpress.org/trunk@51993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 06:02:06 +00:00
hellofromTonya
770e631dfc Editor: Add 'edit_theme_options' capabilities to wp_navigation post type.
Adds `'edit_theme_options'` capabilities top restrict Navigation permission.

Partial backport from Gutenberg https://github.com/WordPress/gutenberg/pull/37454.

Follow-up to [52069], [52145].

Props spacedmonkey, get_dave, hellofromTonya.
See #54487.
Built from https://develop.svn.wordpress.org/trunk@52400


git-svn-id: http://core.svn.wordpress.org/trunk@51992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 04:26:00 +00:00
hellofromTonya
84229df562 REST API: Support . in theme directory names in WP_REST_Global_Styles_Controller, WP_REST_Templates_Controller, and WP_REST_Themes_Controller.
Regex changes from [52376] are reverted to restore the original regex patterns. Why? [52376] used an include characters pattern, which was too limiting. It did not account for localized characters, such as `é`, or other valid directory name characters.

The original theme directory regex pattern, i.e. `[^.\/]+(?:\/[^.\/]+)?` excluded the period `.` character. Removing the `.` character resolves the reported issue by allowing matching for `themes/theme-dirname-1.0/` or `themes/<subdirname>/theme-dirname-1.0/`.

As the pattern used an exclude approach, all characters are valid for matching except for `/`. However, not all characters are cross-platform valid for directory names. For example, the characters `/:<>*?"|` are not valid on Windows OS. The pattern now excludes those characters.

The theme's directory (or subdirectory) name pattern matching is now used in `WP_REST_Global_Styles_Controller`, `WP_REST_Templates_Controller`, and `WP_REST_Themes_Controller`.

Follow-up to [51003], [52051], [52275], [52376].

Props costdev, hellofromTonya, spacedmonkey, TimothyBlynJacobs, bijayyadav, kafleg.
Fixes #54596.
Built from https://develop.svn.wordpress.org/trunk@52399


git-svn-id: http://core.svn.wordpress.org/trunk@51991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 04:14:00 +00:00
hellofromTonya
28b0710360 Application Passwords: Show HTTPS required message without filtering when not enabled or not in local environment.
When `add_filter( 'wp_is_application_passwords_available', '__return_false' )` exists, HTTPS requirement message is shown even if HTTPS is enabled on the site. This happens because `wp_is_application_passwords_available_for_user()` first invokes `wp_is_application_passwords_available()` which is filterable. The situation could happen if the `'wp_is_application_passwords_available_for_user'` filter returns `false`.

To fix this, the check for HTTPS (or if in a 'local' environment) is moved to a new function called `wp_is_application_passwords_supported()`. Then the return from this function is used as an OR condition for the Application Passwords section and for displaying the HTTPS required message.

Tests are included for both `wp_is_application_passwords_supported()` and `wp_is_application_passwords_available()`.

Follow-up to [51980], [51988].

Props davidbinda, SergeyBiryukov, ocean90, felipeelia, costdev, hellofromTonya.
Fixes #53658.
Built from https://develop.svn.wordpress.org/trunk@52398


git-svn-id: http://core.svn.wordpress.org/trunk@51990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 02:45:03 +00:00
hellofromTonya
f067011b59 Editor: Explicitly declare $post_types and $area properties in WP_Block_Template class.
The `$post_types` and `$area` properties are assigned in the `_build_block_template_result_from_file()` and `_build_block_template_result_from_post()` functions. However, neither property was explicitly declared in the `WP_Block_Template` class.

This commit explicitly declares both properties in the class. Why? (1) To make the code more readable and maintainable; (2) to avoid a `Deprecated: Creation of dynamic property WP_Block_Template::$post_types is deprecated` deprecation when PHP 8.2 is released.

Ref:
* PHP 8.2 Deprecate dynamic properties https://wiki.php.net/rfc/deprecate_dynamic_properties

Follow-up to [52062].

Props jrf.
Fixes #54670.
Built from https://develop.svn.wordpress.org/trunk@52397


git-svn-id: http://core.svn.wordpress.org/trunk@51989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 00:28:00 +00:00
hellofromTonya
bf60226e36 General: Fix 'rel' argument in Tests_Functions_wpListBookmarks test datasets.
`wp_list_bookmarks()` arguments include `'link_rel'`, but not `'rel'`. This commit fixes this argument in the test datasets. It also adds an expected `'rel=""'` result check, i.e. instead of only checking for `'noopener'`.

Follow-up to [52395].

Props davidbinda.
Fixes #53839.
Built from https://develop.svn.wordpress.org/trunk@52396


git-svn-id: http://core.svn.wordpress.org/trunk@51988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-21 00:12:03 +00:00
hellofromTonya
a3dedd1d4d Script Loader: Skip getting 'can_compress_scripts' option in script_concat_settings() during install.
When installing a multisite, there is a potential access to a non-existent database table that needs to be skipped to avoid warnings/errors. This fix checks is WordPress is not installing before getting the `'can_compress_scripts'` option.

Props schlessera.
Fixes #54634.
Built from https://develop.svn.wordpress.org/trunk@52395


git-svn-id: http://core.svn.wordpress.org/trunk@51987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 23:53:01 +00:00
audrasjb
ea138fdcb9 Docs: Typo correction in wp_dropdown_languages() DocBlock.
Follow-up to [52058].

See #53399.

Built from https://develop.svn.wordpress.org/trunk@52394


git-svn-id: http://core.svn.wordpress.org/trunk@51986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 22:26:02 +00:00
Sergey Biryukov
c3112cab39 External Libraries: Update the SimplePie library to version 1.5.7.
This version shows significant improvements in the compatibility of SimplePie with PHP 8.0, 8.1, and even contains an initial PHP 8.2 fix. The release also contains a number of other bug fixes.

Release notes: https://github.com/simplepie/simplepie/releases/tag/1.5.7

For a full list of changes in this update, see the SimplePie GitHub:
https://github.com/simplepie/simplepie/compare/1.5.6...1.5.7

Follow-up to [47733], [49176].

Props jrf, SergeyBiryukov.
Fixes #54659.
Built from https://develop.svn.wordpress.org/trunk@52393


git-svn-id: http://core.svn.wordpress.org/trunk@51985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 19:33:00 +00:00
jffng
9759353922 Twenty Twenty-Two: Sync updates from GitHub for Beta 4.
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], and [52375]. It updates the theme's font size presets and fixes an issue with query padding.

To view the full set of changes, visit 623a4d7982...d6cb56cce4.

Props schlessera, williampatton, hellofromtonya, kjellr.
See #54318.

Built from https://develop.svn.wordpress.org/trunk@52392


git-svn-id: http://core.svn.wordpress.org/trunk@51984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-20 16:50:05 +00:00
Sergey Biryukov
cc5119e5e1 Tests: Use shared fixtures in block theme tests.
This removes duplicate test data and aims to avoid future confusion about which themes to use in which tests.

Follow-up to [52049], [52246], [52247], [52279].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52391


git-svn-id: http://core.svn.wordpress.org/trunk@51983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-19 16:25:02 +00:00
John Blackbourn
3324ed52ad Build/Test Tools: Remove the assertion in filter_rest_url_for_leading_slash().
This assertion can mask the fact that some other tests don't perform an assertion.

Fixes #54661

Built from https://develop.svn.wordpress.org/trunk@52390


git-svn-id: http://core.svn.wordpress.org/trunk@51982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-19 14:29:00 +00:00
John Blackbourn
1af8544d80 Build/Test Tools: Reduce the use of unnecessary randomness in tests.
This increases the overall reliability of the tests.

Props johnillo

Fixes #37371

Built from https://develop.svn.wordpress.org/trunk@52389


git-svn-id: http://core.svn.wordpress.org/trunk@51981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-19 13:44:00 +00:00
Sergey Biryukov
3d4ac53c89 Tests: Fix typo in a data provider name.
Follow-up to [52261], [52387].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52388


git-svn-id: http://core.svn.wordpress.org/trunk@51980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-18 21:46:00 +00:00
Sergey Biryukov
28b48cecd6 Tests: Fix typo in a test method name.
Follow-up to [52261].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@52387


git-svn-id: http://core.svn.wordpress.org/trunk@51979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-18 21:17:59 +00:00
Sergey Biryukov
d37081cac2 Tests: Move the tests for theme features that block themes should support by default to a more appropriate place.
As these tests are intended for the `_add_default_theme_supports()` function rather than `WP_Theme` class methods, the `tests/theme.php` file is a more logical place for them than `tests/theme/wpTheme.php`.

Follow-up to [52369], [52383].

See #54597.
Built from https://develop.svn.wordpress.org/trunk@52386


git-svn-id: http://core.svn.wordpress.org/trunk@51978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-18 21:10:03 +00:00
audrasjb
8698dc9721 Site Health: Typo correction in Site Health help tab.
Follow-up to [52053].

Props pedromendonca.
Fixes #54656.

Built from https://develop.svn.wordpress.org/trunk@52385


git-svn-id: http://core.svn.wordpress.org/trunk@51977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-18 21:02:04 +00:00
antpb
a6a27970a9 Media: Fix selections in Media Library Featured Image modal on open.
In [50829] infinite scrolling was removed from the Media Library and modal which introduced unintended behavior for featured images where only the selected image shows when opening the library. This change reverts only the logic that caused this and applies a proper fix when opening the library.

Props benitolopez, hellofromTonya, joedolson, peterwilsoncc, circlecube, danielbachhuber, PieWP, sabernhardt, szaqal21, dariak, sergeybiryukov.
Fixes #53765.

Built from https://develop.svn.wordpress.org/trunk@52384


git-svn-id: http://core.svn.wordpress.org/trunk@51976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-17 20:17:05 +00:00
Sergey Biryukov
0795991b6f Tests: Add unit tests for theme features that block themes should support by default.
By default, block themes should have a few theme supports enabled:
* `post-thumbnails`
* `responsive-embeds`
* `editor-styles`
* `html5` for `comment-form`, `comment-list`, `style`, `script`
* `automatic-feed-links`

They should also load core block assets only when the blocks are rendered. This commit adds the associated tests.

Follow-up to [52369].

Props costdev.
See #54597.
Built from https://develop.svn.wordpress.org/trunk@52383


git-svn-id: http://core.svn.wordpress.org/trunk@51975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-16 14:47:04 +00:00
Sergey Biryukov
1eb2a65984 Tests: Mock the HTTP request response in download_url() tests.
This aims to speed up the tests and minimize unrelated failures by avoiding an unnecessary external HTTP request, while still performing the intended functionality checks.

Update similar helpers in some other tests to use more consistent terminology.

Follow-up to [37907], [46175], [51626].

See #54420, #53363.
Built from https://develop.svn.wordpress.org/trunk@52382


git-svn-id: http://core.svn.wordpress.org/trunk@51974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-15 20:01:00 +00:00
Sergey Biryukov
df494e0987 Tests: Add an assertion to test the WP_REST_Server::add_site_logo_to_index() method.
Additionally:
* Move the test for `WP_REST_Server::add_active_theme_link_to_index()` to a more logical place.
* Replace `assertEquals()` with `assertSame()` in site icon test to also check the type of the value.
* Use a more consistent pattern for the tests.

Follow-up to [51241], [52080].

Props ignatggeorgiev, desrosj, SergeyBiryukov.
Fixes #53516. See #53363.
Built from https://develop.svn.wordpress.org/trunk@52381


git-svn-id: http://core.svn.wordpress.org/trunk@51973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-15 18:08:05 +00:00
isabel_brison
7b3c904f37 Fix deprecated usage of passing null to explode()
As of PHP 8.1, explode() does not permit null as its second argument. This results in warnings being spat out on every page because of a usage of this in wp-includes/block-supports/layout.php.

See #53635.
Props noisysocks.

Built from https://develop.svn.wordpress.org/trunk@52380


git-svn-id: http://core.svn.wordpress.org/trunk@51972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-15 04:08:04 +00:00
Sergey Biryukov
e02e7be1b6 Post WordPress 5.9 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@52379


git-svn-id: http://core.svn.wordpress.org/trunk@51971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 21:25:01 +00:00
Sergey Biryukov
58bb50562c WordPress 5.9 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@52378


git-svn-id: http://core.svn.wordpress.org/trunk@51970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 20:25:59 +00:00
hellofromTonya
4132ac0f48 Editor: Add "Featured" patterns from pattern directory to Patterns in block inserter.
This commit backports the remote "Featured" category request and loads it into the Featured Patterns in the block inserter.

Props ryelle.
Fixes #54623.
Built from https://develop.svn.wordpress.org/trunk@52377


git-svn-id: http://core.svn.wordpress.org/trunk@51969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 19:39:06 +00:00
hellofromTonya
84d67f77f6 REST API: Add block theme support for valid non-alphanumeric characters in theme's directory name.
Themes whose `wp-content/themes/<dirname>` include valid non-alphanumeric (cross-platform) characters work for non-block themes, but did not previously resolve for block themes. For example, a block theme in `wp-content/themes/twentytwentytwo-0.4.0/` directory resulted a 404 "No route was found matching the URL and request method" response when attempting to customize it in the Site Editor.

This commit adds support for the following characters in a theme's root directory: `_`, `.`, `@`, `[`, `]`, `(`, and `)`. Subdirectory themes and `-` are already supported.

Follow-up to [51003], [52051], [52275].

Props mkaz, costdev, hellofromTonya, jffng, justinahinon, peterwilsoncc, spacedmonkey, TimothyBlynJacobs.
Fixes #54596.
Built from https://develop.svn.wordpress.org/trunk@52376


git-svn-id: http://core.svn.wordpress.org/trunk@51968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 18:24:01 +00:00
jffng
b3c06d8bb1 Twenty Twenty-Two: Sync updates from GitHub for Beta 3.
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], and [52335]. The two main changes introduce global padding to site content while still allowing content to be full-width, and re-organize block patterns into Core's existing categories. 

To view the full set of changes, visit da994d1fe5...88a8f2e3b4.

Props onemaggie, joen, youknowriad, scruffian, sabernhardt, kjellr.
See #54318.

Built from https://develop.svn.wordpress.org/trunk@52375


git-svn-id: http://core.svn.wordpress.org/trunk@51967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 17:11:01 +00:00
spacedmonkey
f1f71a0798 REST API: Ensure that the get_theme_item method should respect fields param.
Fix the `get_theme_item` method in the `WP_REST_Global_Styles_Controller` class to respect the fields param context filtering and to return links. 

Props spacedmonkey, hellofromtonya, peterwilsoncc, costdev.
Fixes #54595.


Built from https://develop.svn.wordpress.org/trunk@52374


git-svn-id: http://core.svn.wordpress.org/trunk@51966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:31:00 +00:00
John Blackbourn
0124d01d1d Database: Correct and improve documentation for properties and parameters in wpdb.
See #53399

Built from https://develop.svn.wordpress.org/trunk@52373


git-svn-id: http://core.svn.wordpress.org/trunk@51965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:24:02 +00:00
hellofromTonya
65a4199149 Themes: Rename public static functions in WP_Theme_JSON_Resolver to remove custom_post_type references.
WordPress Core is not really custom and does not reference "custom post type" in its function naming. This commit renames 2 public static methods:

* `WP_Theme_JSON_Resolver::get_user_custom_post_type_id()` renamed to `WP_Theme_JSON_Resolver::get_user_global_styles_post_id()`.
* `WP_Theme_JSON_Resolver::get_user_data_from_custom_post_type()` renamed to `WP_Theme_JSON_Resolver:: get_user_data_from_wp_global_styles()`.

Follow-up to [52049], [52051], [52069], [52232], [52275], [52364].

Props antonvlasenko, bernhard-reiter, costdev, desrosj, hellofromTonya, noisysocks, oandregal, SergeyBiryukov.
Fixes #54517.
Built from https://develop.svn.wordpress.org/trunk@52372


git-svn-id: http://core.svn.wordpress.org/trunk@51964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 16:14:01 +00:00
hellofromTonya
edf755823b Customize: Overlay incompatible banner for block themes.
Starting in 5.9, block themes are not compatible with (do not support) Customizer; rather, they use the Site Editor. Viewing installed themes in Customizer, this commit adds an overlay message to alert users and give them a way to activate the block theme. Clicking on the "Activate" button activates the block theme and redirects back to the Appearance > Themes interface, where the user can then enter the Site Editor for customization.

Non-block themes are not affected by this change and continue to work in Customizer.

Follow-up to [41648], [41893], [52279].

Props antonvlasenko, costdev, hellofromTonya, jffng, joyously, noisysocks, poena, shaunandrews.
Fixes #54549.
Built from https://develop.svn.wordpress.org/trunk@52371


git-svn-id: http://core.svn.wordpress.org/trunk@51963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 15:33:01 +00:00
hellofromTonya
dfef2c917f Formatting: Use is_scalar() in sanitize_key().
This is a follow-up to [52292] which introduced `is_string()` to check the given key is a string to be sanitized, else the key is set to an empty string. 

`sanitize_key()` is clearly identified (in the documentation) to only work with ''string'' keys. However, it had a bug in it that allowed non-strings to pass through it:
* A non-scalar "key" would throw a PHP Warning (which was resolved in [52292]. 
* A non-string scalar "key" was handled by the PHP native `strtolower()` which converted it into a string.

While `is_string()` is valid, non-string scalar types passed as the key to be sanitized were being set to an empty string. Given that `strtolower()` handles these without error or deprecation as of PHP 8.1, `is_scalar()` protects the website from issues while retaining the past behavior of converting integer keys (for example) into a string.

Changes include:
* Using `is_scalar()` instead of `is_string()`
* Refactor for readability and less code
* More tests

Please note, this does not change the behavior of the function, nor redefine it to now accept non-string scalars.

References:
* https://developer.wordpress.org/reference/functions/sanitize_key/
* https://www.php.net/manual/en/function.strtolower.php

Follow-up [52292].

Props wppunk, hellofromTonya, costdev, jrf.
Fixes #54160.
Built from https://develop.svn.wordpress.org/trunk@52370


git-svn-id: http://core.svn.wordpress.org/trunk@51962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 15:01:03 +00:00
audrasjb
9b694a6f49 Editor: Activate missing default theme features for block themes.
By default, block themes should have a few theme supports enabled by default. These are: `post-thumbnails`, `responsive-embeds`, `editor-styles`, `html5`, `automatic-feed-links`. This changeset backports the changes introduced in https://github.com/WordPress/gutenberg/pull/35593.

Props noisysocks, ocean90, youknowriad, audrasjb, hellofromTonya.
Fixes #54597.

Built from https://develop.svn.wordpress.org/trunk@52369


git-svn-id: http://core.svn.wordpress.org/trunk@51961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 09:49:00 +00:00
audrasjb
1309e62457 Posts, Post Types: Add missing translation context on FSE related post types labels.
This makes it easier for translators to identify the context of each label. This change also brings consistency with other built-in post types.

Follow-up to [52145], [52069], [52062], [52041], [51003].

Props audrasjb, hellofromTonya.
Fixes #54611.

Built from https://develop.svn.wordpress.org/trunk@52368


git-svn-id: http://core.svn.wordpress.org/trunk@51960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 09:09:01 +00:00
audrasjb
bcb9285589 Docs: Use generic references to "Database" in wp-config-sample.php.
This replaces the references to "MySQL" info in the WordPress configuration sample file. Using the generic term "Database" now refers to either MySQL or MariaDB.

Props Ov3rfly, audrasjb, hellofromTonya.
Fixes #54610.

Built from https://develop.svn.wordpress.org/trunk@52367


git-svn-id: http://core.svn.wordpress.org/trunk@51959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 08:44:02 +00:00
audrasjb
e5a1ed2fb2 Docs: Typo correction in TinyMCE related JS file.
Follow-up to [45066].

See #53399.

Built from https://develop.svn.wordpress.org/trunk@52366


git-svn-id: http://core.svn.wordpress.org/trunk@51958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 08:30:04 +00:00
noisysocks
3cd0e25c03 Filter custom block templates with PHP
This method calls get_block_templates once and uses block template properties
directly for filtering. This way, we can avoid hitting the database for each
public post type.

The previous method is useful when we already know the current post type we
request templates for, like when using REST API.

Follows [52334].
See #54335.
Props mamaduka, youknowriad.

Built from https://develop.svn.wordpress.org/trunk@52365


git-svn-id: http://core.svn.wordpress.org/trunk@51957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 02:46:00 +00:00
noisysocks
935058d178 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Image block: Set image display to grid when no alignment sent to properly align caption on resize
- Update and align template descriptions
- Site Editor - prevent loading state from showing the admin menu.
- Add client side routing for Site Editor
- Navigation: Add clearance for appender in submenus.
- Fix CSS Custom Properties for presets in the site editor
- Add/navigation blocks post processing after migration from menu items
- Allow selector ordering to ensure theme.json root selector margin takes precedence 
- Do not remove theme presets if defaults are hidden
- Format library: fix unsetting highlight color
- FSE: Fix template resolution to give precedence to child theme PHP templates over parent theme block templates with equal specificity
- ColorPalette: Improving accessibility and visibility
- Update: Make the color popover on the gradient picker appear as expected
- Site Editor: Display a notice if export fails
- Fix docs and function naming for gallery block registration in PHP
- Switch to addEventListener for load event in the navigation block view script
- Fix mistake in _remove_theme_attribute_in_block_template_content
- Better synchronisation between Gutenberg and Core code
- Move the block page templates hook into compat/5.9 folder
- Moves to the template loader hooks and functions into lib/compat folder
- Refactor the gutenberg_is_fse_theme function to use wp_is_block_theme
- Site Editor: Update support doc URL in Welcome Guide
- Global Styles: Add Welcome Guide toggle
- Hide remove control point when removing would break gradient control
- Don't request the deprecated navigation areas endpoint outside of the Gutenberg plugin
- Image: Fix resizer controls being hidden in Safari when switching between alignments
- Remove Navigation Menus from WP Admin sidebar
- Site Editor: Hide the block appender in the Template Part editor
- Site Editor: Use server definition for the Template Areas
- Synchronize wp_is_block_theme and block-templates block support with Core
- E2E: Retry login again after a bad nonce request to prevent intermittent test failures 
- Fix theme requirement validation with WP 5.8
- Fix WP 5.9 check for conditionally running code
- Fix post comment form input width
- Border Style Control: Update styling for consistency with border width control
- Fix form-submit styles by adding button classes to the submit-button in post-comments block
- Site Editor: Fix edit template part link in header dropdown
- Move duotone palette to the bottom of global styles gradients
- Fix how appearanceTools works
- Move WP 5.9 wp-admin menus compatibility code to lib/compat folder
- Revert "Site Editor: Set the <title> on the list page to be same as the CPT name"
- Site Editor: Document Actions: add SR text to heading 1
- Do not register global styles CPT in WordPress 5.9
- Global Styles: Move the 'Edit colors' button to a standard menu item
- Fix styles for previews and patterns
- Site Editor: Fix failing E2E test
- Templates: Search for old template names in the parent theme too
- Remove 4 instances of 'gutenberg' text domain from WordPress core
- Fix content loss when ungrouping template parts or reusable blocks
- Simplify the RESET_BLOCK action to fix template part focus mode content loss
- [Global Styles]: Make Blocks section more distinguishable
- Only use block markup for comment form button when using a block theme
- Navigation: Fix vertical alignment of page list in modal.
- Fix: ToggleGroupControl active state
- Remove gutenberg_ prefix from @wordpress/block-library

Props ocean90, oandregal, hellofromtonya, youknowriad.
See #54487.

Built from https://develop.svn.wordpress.org/trunk@52364


git-svn-id: http://core.svn.wordpress.org/trunk@51956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-14 01:57:26 +00:00
spacedmonkey
120b1ab117 REST API: Ensure that the parent link, uses the rest_get_route_for_post function.
In [51962] the `rest_get_route_for_post` function was implemented in all places where link to a post's REST API endpoint is needed. However in this commit, the up link, which links to the parent post of the current object, did not use this function.   

Props Spacedmonkey, SergeyBiryukov.
Fixes #53656.



Built from https://develop.svn.wordpress.org/trunk@52363


git-svn-id: http://core.svn.wordpress.org/trunk@51955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-13 15:20:03 +00:00
Sergey Biryukov
d09d194f12 Docs: Capitalize "ID", when referring to a widget ID or sidebar ID, in a more consistent way.
Follow-up to [48104], [52357], [52361].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52362


git-svn-id: http://core.svn.wordpress.org/trunk@51954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-13 10:21:07 +00:00
audrasjb
cfd6406f8f Docs: Capitalize "ID", when referring to a sidebar ID in a more consistent way.
Follow-up to [52016].

See #53399.


Built from https://develop.svn.wordpress.org/trunk@52361


git-svn-id: http://core.svn.wordpress.org/trunk@51953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 19:01:02 +00:00
audrasjb
f4683efbc9 Docs: Document the global used in upgrade_590() function.
Follow-up to [51917].

See #53399.

Built from https://develop.svn.wordpress.org/trunk@52360


git-svn-id: http://core.svn.wordpress.org/trunk@51952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 17:57:00 +00:00
Sergey Biryukov
02e384322f Build/Test Tools: Disable WP Cron when installing PHPUnit tests.
During the WordPress installation process when running the test suite, an HTTP request was always fired by a cron task and failed, because tests are run in CLI mode only.

To avoid that, the `DISABLE_WP_CRON` constant was previously added to the `bootstrap.php` file. However, the constant is not passed to the `install.php` script. This commit makes a similar change to `install.php`.

Follow-up to [760/tests], [872/tests].

Props Chouby.
Fixes #54612.
Built from https://develop.svn.wordpress.org/trunk@52359


git-svn-id: http://core.svn.wordpress.org/trunk@51951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 15:48:00 +00:00
Sergey Biryukov
88bf87de8c General: Mark the recommended MariaDB version number in readme.html with a <strong> tag.
This brings consistency with the MySQL version number.

Follow-up to [52319].

See #41490.
Built from https://develop.svn.wordpress.org/trunk@52358


git-svn-id: http://core.svn.wordpress.org/trunk@51950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 14:58:00 +00:00
Sergey Biryukov
6cb050d878 Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.
Follow-up to [48104].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52357


git-svn-id: http://core.svn.wordpress.org/trunk@51949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 14:54:00 +00:00
Sergey Biryukov
75fc6b755b Docs: Update a comment in wp-admin/load-styles.php per the documentation standards.
Follow-up to [52352].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52356


git-svn-id: http://core.svn.wordpress.org/trunk@51948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-12 14:52:02 +00:00
Sergey Biryukov
8bdaf90a14 Docs: Update some @var tags per the documentation standards.
Follow-up to [27398], [29487], [41626], [51003].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52355


git-svn-id: http://core.svn.wordpress.org/trunk@51947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-11 19:50:59 +00:00
audrasjb
adee0cbf6b Docs: Docblock adjustments in some 5.9 block related functions.
Adds missing `@since` mention to `wp_enqueue_block_style()` and `_wp_multiple_block_styles()`, and a few other minor changes. 

Follow-up to [52069].

See #53359.

Built from https://develop.svn.wordpress.org/trunk@52354


git-svn-id: http://core.svn.wordpress.org/trunk@51946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-11 11:16:03 +00:00
hellofromTonya
f847144952 Themes: Show only "Customize" or "Activate" button in block theme's Theme Details modal.
At the bottom of a block theme's "Theme Details" modal, only one button will be displayed:
* "Customize" button when the block theme is activated;
* Else, the "Activate" button.

The "Live Preview", "Editor beta", and "Navigation Menus" buttons are removed.

Follow-up to [15646], [52341], [52346].

Props poena, ryelle, kafleg, antonvlasenko, costdev, SergeyBiryukov, hellofromTonya.
Fixes #54578.
Built from https://develop.svn.wordpress.org/trunk@52353


git-svn-id: http://core.svn.wordpress.org/trunk@51945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-10 20:33:00 +00:00
Sergey Biryukov
3beb1d25ab Docs: Correct the format of some comments per the documentation standards.
Follow-up to [10357], [10939], [43309], [51003], [51266], [51653], [51738], [52110].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52352


git-svn-id: http://core.svn.wordpress.org/trunk@51944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-10 20:30:05 +00:00
Peter Wilson
88b1019dc3 Upgrade/install: Revert upgrader rollback features.
Revert the rollback features introduced for theme and plugin upgrades during the WordPress 5.9 cycle. A bug (suspected to be in third party virtualisation software) causes the upgrades to fail consistently on some set ups. The revert is to allow contributors further time to investigate mitigation options.

Reverts [52337], [52289], [52284], [51951], [52192], [51902], [51899], [51898], [51815].

Props pbiron, dlh, peterwilsoncc, galbaras, SergeyBiryukov, afragen, costdev, bronsonquick, aristath, noisysocks, desrosj, TobiasBg, hellofromTonya, francina, Boniu91.
See #54543, #54166, #51857.



Built from https://develop.svn.wordpress.org/trunk@52351


git-svn-id: http://core.svn.wordpress.org/trunk@51943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-10 00:06:04 +00:00
Sergey Biryukov
852fad7531 Coding Standards: Remove a trailing comma from a compact() call in _wp_customize_include().
This fixes a `Trailing comma's are not allowed in function calls in PHP 7.2 or earlier` error in the PHP compatibility check.

Follow-up to [52348].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52350


git-svn-id: http://core.svn.wordpress.org/trunk@51942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-09 15:32:01 +00:00
Sergey Biryukov
7ffc7c29cc Editor: Add an editor settings flag to enable the new gallery for mobile apps for 5.9.
Currently the WordPress mobile apps rely on the `__unstableGalleryWithImageBlocks` flag being set in order to enable the new gallery block format.

This commit includes the value in the `get_default_block_editor_settings()` function in order to ensure that versions of the mobile app >= 18.2 will be able to add and edit gallery blocks in the new format.

Props glendaviesnz, ocean90, hellofromTonya, noisysocks.
Fixes #54583.
Built from https://develop.svn.wordpress.org/trunk@52349


git-svn-id: http://core.svn.wordpress.org/trunk@51941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-09 15:25:01 +00:00
Sergey Biryukov
d8934f9acb Coding Standards: Simplify or wrap some long conditions in wp-includes/theme.php for better readability.
Includes adjusting some DocBlocks per the documentation standards.

Follow-up to [35595], [41937], [52256].

See #53359, #53399.
Built from https://develop.svn.wordpress.org/trunk@52348


git-svn-id: http://core.svn.wordpress.org/trunk@51940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-09 15:13:04 +00:00
youknowriad
0441885c15 Themes: Auto-enable block-templates support for all block themes.
Block themes without theme.json file used to have block-templates support disabled.
This commit brings this in sync with the behavior in the gutenberg plugin.

See #54335.

Built from https://develop.svn.wordpress.org/trunk@52347


git-svn-id: http://core.svn.wordpress.org/trunk@51939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-09 09:56:04 +00:00
Sergey Biryukov
62574145ce Coding Standards: Use camel case with a lowercase first letter for the blockTheme array key.
This matches the WordPress JS naming conventions and the naming of other keys in the `$prepared_themes` array.

Follow-up to [52341].

See #54578, #53359.
Built from https://develop.svn.wordpress.org/trunk@52346


git-svn-id: http://core.svn.wordpress.org/trunk@51938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-08 10:16:05 +00:00
audrasjb
12369a6425 Coding Standards: Correct alignment in blocks.php and class-wp-rest-templates-controller.
See #53359.

Built from https://develop.svn.wordpress.org/trunk@52345


git-svn-id: http://core.svn.wordpress.org/trunk@51937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 22:49:59 +00:00
Sergey Biryukov
abed17b03d Post WordPress 5.9 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@52344


git-svn-id: http://core.svn.wordpress.org/trunk@51936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 21:58:01 +00:00
Sergey Biryukov
600aa23dd6 WordPress 5.9 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@52343


git-svn-id: http://core.svn.wordpress.org/trunk@51935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 21:20:59 +00:00
spacedmonkey
ec370a0af4 REST API: Improve permission handling in global style endpoint.
The new wp_global_styles post type is registered to use edit_theme_options in the capability settings. The WP_REST_Global_Styles_Controller class's permission checks methods use the capability in a hard coded form rather than looking up the capability via the post type object. Changing the permission callbacks to lookup capabilities via the post type object, allows theme and plugin developers to modify the capability used for editing global styles via a filter and these values to be respected via the Global Styles REST API.

Props Spacedmonkey, peterwilsoncc, hellofromTonya , antonvlasenko, TimothyBlynJacobs, costdev, zieladam.
Fixes #54516.


Built from https://develop.svn.wordpress.org/trunk@52342


git-svn-id: http://core.svn.wordpress.org/trunk@51934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 20:58:00 +00:00
hellofromTonya
9aba2584bb Themes: Hide "Live Preview" button for FSE block themes.
Currently, the Site Editor does not have a live preview feature for non-activated block themes.

This commit is a stop-gate to remove the "Live Preview" button for those themes. It avoids confusing users and avoiding a notification message that doesn't make sense.

Props antonvlasenko, costdev, hellofromTonya, kafleg, paaljoachim.
Fixes #54578.
Built from https://develop.svn.wordpress.org/trunk@52341


git-svn-id: http://core.svn.wordpress.org/trunk@51933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 20:07:00 +00:00
spacedmonkey
40b22d1209 REST API: Ensure that the export template endpoint returns a valid WP_Error object.
Ensure that the export template endpoint returns a WP_Error object, including code and message, so that the site editor can display an error message. 
Add some basic unit tests to ensure that permission checks are working as expected. 

Follow-up to [52286].

Props Spacedmonkey, dlh, hellofromTonya , Mamaduka, TimothyBlynJacobs.
Fixes #54448.


Built from https://develop.svn.wordpress.org/trunk@52340


git-svn-id: http://core.svn.wordpress.org/trunk@51932 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 18:38:02 +00:00
audrasjb
153e27f625 Coding Standards: Replace else if with elseif after [52338].
Follow-up to [52338].

Built from https://develop.svn.wordpress.org/trunk@52339


git-svn-id: http://core.svn.wordpress.org/trunk@51931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 17:49:01 +00:00
audrasjb
cdafa716f7 Script Loader: Allow for wp_register_script() to be called after wp_enqueue_script().
When a plugin registers styles/scripts on `wp_enqueue_scripts` (as plugin authors are encouraged to do), and conditionally enqueues their script/style on `the_content` filter, things "just work". In block themes, `the_content` is run prior to the header being processed, which results in the above scenario failing.

This change makes a `wp_enqueue_script( 'example' ); wp_register_script( 'example' );` work, where as currently the enqueue silently fails (no "doing it wrong" message) and the following register has no impact. Scripts can therefore be enqueued and dequeued (by "handle") before they are registered.

Fixes #54529.

Built from https://develop.svn.wordpress.org/trunk@52338


git-svn-id: http://core.svn.wordpress.org/trunk@51930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 17:46:01 +00:00
hellofromTonya
4f0c8ef665 Upgrade/Install: Fix moving plugins folder in WP_Upgrader:: move_to_temp_backup_dir().
[51815] introduced the creation of a temporary backup of plugins before updating.

The `move()` (and later, `move_dir()`) call) uses a `$src` parameter.
For Hello Dolly, this is `<path>/wp-contents/plugins/.` (note the period at the end).

For users on Linux and Mac, this doesn't appear to cause any problems.
However, on Windows, the move causes the plugins folder to be moved which then causes a failure when attempting to call `mkdir()`.

This commit skips any plugin whose slug is `'.'` as this slug results in the `$src` value ending in a period. 

Follow-up to [51815].

Props costdev, boniu91, hellofromTonya.
Fixes #54543.
Built from https://develop.svn.wordpress.org/trunk@52337


git-svn-id: http://core.svn.wordpress.org/trunk@51929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:51:03 +00:00
youknowriad
ec25c4ee57 Site Editor: Render the template descriptions properly.
The initializaion of the editor was a bit different between Gutenberg and Core.
This brings them in sync which solves the missing descriptions from the template header
in the site editor.

See #54337.

Built from https://develop.svn.wordpress.org/trunk@52336


git-svn-id: http://core.svn.wordpress.org/trunk@51928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:40:01 +00:00
jffng
ef4271cfee Twenty Twenty-Two: Sync updates from GitHub.
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], and [52283]. It reduces the size of a video asset, renames the templates and template parts directories, and adds CSS for button hover states. To view the full set of changes, visit 1a121e0224...da994d1fe5.

Props kjellr, mburridge, sabernhardt, hellofromtonya, scruffian.
See #54318.

Built from https://develop.svn.wordpress.org/trunk@52335


git-svn-id: http://core.svn.wordpress.org/trunk@51927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:38:02 +00:00
youknowriad
76419adcaa Block Editor: Only list custom block templates in the template selector.
Previously all block templates including the hierarchy templates were being shown in the CPT template selector.

Props mamaduka.
See #54335.

Built from https://develop.svn.wordpress.org/trunk@52334


git-svn-id: http://core.svn.wordpress.org/trunk@51926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:33:05 +00:00
hellofromTonya
177a4d830b REST API: Pass post type name to rest_get_route_for_post_type_items().
The new `rest_get_route_for_post_type_items()` function accepts a string, not an object. This commit passes the post type name instead of the object to resolve a notice in the site editor page.

Follow-up to [52281].

Props walbo.
Fixes #54536.
Built from https://develop.svn.wordpress.org/trunk@52333


git-svn-id: http://core.svn.wordpress.org/trunk@51925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:15:02 +00:00
John Blackbourn
39bff93b6b Docs: Various inline documentation corrections and improvements.
See #53399

Built from https://develop.svn.wordpress.org/trunk@52332


git-svn-id: http://core.svn.wordpress.org/trunk@51924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 12:20:02 +00:00
youknowriad
bc3356601e Site Editor: Update the block template descriptions.
Align the template descriptions with the latest changes from the Gutenberg plugin.

Props jameskoster, SergeyBiryukov.
See #54335.

Built from https://develop.svn.wordpress.org/trunk@52331


git-svn-id: http://core.svn.wordpress.org/trunk@51923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 12:12:04 +00:00
hellofromTonya
f70fb51f99 Themes: Better names for WP_Theme::is_block_theme() and wp_is_block_theme() and make wp_is_block_theme() a wrapper.
This commit renames the following method and function to better represent block theme terminology:

* `WP_Theme::is_block_based()` to `WP_Theme::is_block_theme()`
* `wp_is_block_template_theme()` to `wp_is_block_theme()`

It also changes `wp_is_block_theme()` to be a helper wrapper (sugar syntax) for `wp_get_theme()->is_block_theme();`. Why? To ensure both the method and function behave the same, to help Gutenberg maintain WordPress cross-version compatibility, and to make it less cumbersome to port changes from Gutenberg to Core.

Follow-up to [52069], [52247], [52279].

Props antonvlasenko, costdev, hellofromTonya, noisysocks.
Fixes #54550.
Built from https://develop.svn.wordpress.org/trunk@52330


git-svn-id: http://core.svn.wordpress.org/trunk@51922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 00:02:02 +00:00
hellofromTonya
2e2829904b Editor: Allow theme.json to take precedence in setting the root level element's reset margin value.
Any margin added to the root element via `theme.json` is overwritten by a CSS reset margin value provided by the Gutenberg Plugin.

This commit makes `theme.json` setting take precedence by generating the global styles body reset prior to processing the theme.json.

Follow-up to [52049].

Props get_dave, hellofromTonya.
Fixes #54550.
Built from https://develop.svn.wordpress.org/trunk@52329


git-svn-id: http://core.svn.wordpress.org/trunk@51921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-06 22:42:00 +00:00
Sergey Biryukov
47c4ff7102 HTTP API: Revert changeset [52244].
Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

Follow-up to [52327].

See #54562, #54504.
Built from https://develop.svn.wordpress.org/trunk@52328


git-svn-id: http://core.svn.wordpress.org/trunk@51920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-06 21:30:03 +00:00
hellofromTonya
8045f6a42b HTTP API: Revert changeset [52315].
Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

See #54562, #54504.
Built from https://develop.svn.wordpress.org/trunk@52327


git-svn-id: http://core.svn.wordpress.org/trunk@51919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-06 18:31:05 +00:00
Sergey Biryukov
18d741be37 KSES: Use the polyfilled PHP 8 string functions in _wp_kses_allow_pdf_objects():
* `str_contains()`
* `str_ends_with()`
* `str_starts_with()`

Additionally, include a test for a PDF file in an `<object>` tag with an unsupported protocol.

Follow-up to [51963], [52039], [52040], [52304], [52309].

Props TobiasBg, ramonopoly.
See #54261.
Built from https://develop.svn.wordpress.org/trunk@52326


git-svn-id: http://core.svn.wordpress.org/trunk@51918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-06 11:08:01 +00:00
Sergey Biryukov
a9edd7ba88 Build/Test Tools: Remove the replace:emoji-banner-text Grunt task.
The task was previously used to ensure that `/*! This file is auto-generated */` comment is not included on front end as part of the inline emoji detection script.

As the `wp-emoji-loader.js` script is now included via `file_get_contents()` and `wp_print_inline_script_tag()` instead of `grunt-include` to simplify the logic, the task does not find anything to replace and is no longer necessary.

Additionally, include a line break before the `wp-emoji-loader.js` script content for better line wrapping.

Follow-up to [48096], [50651], [52132].

See #44632, #44306, #53363.
Built from https://develop.svn.wordpress.org/trunk@52325


git-svn-id: http://core.svn.wordpress.org/trunk@51917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-06 10:14:06 +00:00
noisysocks
3060ce0b59 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Gallery block: turn on auto-migration of v1 Gallery blocks to v2 format when edited
- Add accessible labelling to submenu buttons.
- Improve performance of wp_navigation lookup. 
- Various inline docblock corrections
- Use core version of template and template part post types and REST endpoints for WP 5.9, with back compat for 5.8
- Gradients: Enable adding custom gradient when gradients are disabled
- Custom color palette: add default color name
- Color Picker: Re-instate debounce and controlled value to fix issue with gradient picker
- Add aria-current="page" to active navigation item
- Site Editor: Templat list fallback to slug
- Fix: Custom color picker popover position
- Fix: php 5.6 error in theme JSON class.
- Update the WP_Theme_JSON_Gutenberg class to be like the core one
- Update the WP_Theme_JSON_Resolver_Gutenberg class to be like the core one
- Move Global Styles code to lib/compat/wordpress-5.9 folder
- E2E Tests: Fix failing image e2e test by waiting for required element
- Navigation: Try removing absorb toolbar prop.
- Navigation: Fix navigation justifications.
- Fix wordbreak for URLs
- Polish unset color indicator.
- Template revert flow: Make label description source agnostic
- [Block Library - Navigation]: Fix vertical layout
- Add: Corners to custom color picker popover
- Add: Missing margin to the color picker clear button
- Gradient: Fix clearing a custom gradient from throwing a React warning
- [Block Library]: Rename Query Pagination blocks
- PHP Unit Tests: Use global transients 
- Remove CSS that causes conflict with theme.json
- Add actions which fire during the loading process of block template parts
- Fix usage of useSetting('color.palette')
- Update micromodal, include click-through fix
- Site Editor: Remove unused PHP code
- Don't try and render unstable location if Nav block has ID
- Fix gutenberg prefixed function references in core
- Card: support the extraSmall option for the size prop
- Gallery block: enable the new gallery block by default if running in core 
- Block fixtures: Change port to 8889 to placate KSES
- Full Site Editing: Remove block template resolution unit tests
- Site Editor: Sync export API

See #54487.

Built from https://develop.svn.wordpress.org/trunk@52324


git-svn-id: http://core.svn.wordpress.org/trunk@51916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-06 06:20:27 +00:00
Sergey Biryukov
f5d79e0b23 Docs: Add missing summary for WP_Theme_JSON_Resolver::get_merged_data().
Follow-up to [50959].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52323


git-svn-id: http://core.svn.wordpress.org/trunk@51915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-05 18:02:08 +00:00
Sergey Biryukov
6e09421269 Coding Standards: Break the $path reference after a foreach loop in block_editor_rest_api_preload().
When using a `foreach` loop with a value assigned by reference, the variable continues to point to the last array element even after the loop, so it is recommended to destroy it by `unset()` to avoid unexpected behavior later on.

See [https://www.php.net/manual/en/control-structures.foreach.php PHP Manual: foreach].

Follow-up to [52312], [52313].

Props TobiasBg.
See #54558.
Built from https://develop.svn.wordpress.org/trunk@52322


git-svn-id: http://core.svn.wordpress.org/trunk@51914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-04 17:20:00 +00:00
Sergey Biryukov
6b84ae03ad Docs: Further update some @since notes in WP_Theme_JSON methods for clarity.
Follow-up to [52049], [52306], [52320].

See #53399, #54336.
Built from https://develop.svn.wordpress.org/trunk@52321


git-svn-id: http://core.svn.wordpress.org/trunk@51913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-04 15:57:01 +00:00
Sergey Biryukov
7f9d7a5905 Docs: Some documentation improvements for WP_Theme_JSON and WP_Theme_JSON_Resolver classes:
* Make the `@since 5.9.0` notes more specific. When mentioning that parameters or values have been added or changed, it is generally also helpful to include their exact names and the nature of changes for future reference.
* Update some DocBlocks per the documentation standards.

Follow-up to [52049], [52306].

See #53399, #54336.
Built from https://develop.svn.wordpress.org/trunk@52320


git-svn-id: http://core.svn.wordpress.org/trunk@51912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-04 12:58:01 +00:00
audrasjb
3d5b5f21e1 General: Add MariaDB in the readme.html requirements.
This change updates the WordPress `readme.html` file to reflect WordPress.org requirements: as of WordPress 5.9, MariaDB 10.1 and higher versions are supported by WP. See https://wordpress.org/about/requirements/. 

Fixes #41490.

Built from https://develop.svn.wordpress.org/trunk@52319


git-svn-id: http://core.svn.wordpress.org/trunk@51911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-03 23:09:59 +00:00
audrasjb
9a9afacf38 Docs: Replace @since 5.9 with @since 5.9.0 in block-template-utils.php.
Follow-up to [52317], [52275], [52062].

See #53399.

Built from https://develop.svn.wordpress.org/trunk@52318


git-svn-id: http://core.svn.wordpress.org/trunk@51910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-03 22:26:59 +00:00
audrasjb
a945234aba Docs: Miscellaneous Docblock corrections for block-template-utils.php file.
Follow-up to [52275], [52062].

See #53399.

Built from https://develop.svn.wordpress.org/trunk@52317


git-svn-id: http://core.svn.wordpress.org/trunk@51909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-03 22:09:59 +00:00
hellofromTonya
64fe3efe28 Editor: Resolve template request ?_wp-find-template=true for new posts and pages.
The template resolution system makes a request like `/?page_id=1234&_wp-find-template=true`, depending on `WP_Query` to resolve a page or post using the page_id or p (post_id) in the query string. With new posts/pages, a placeholder post with the status auto-draft is created. But by default `WP_Query` will not resolve these posts, unless the query is specifically set to look for them.

This commit handles the query string to properly resolve a page or post. It adds 2 private callbacks for the processing.

Props poena, noisysocks, bernhard-reiter, costdev, hellofromTonya.
Fixes #54553.
Built from https://develop.svn.wordpress.org/trunk@52316


git-svn-id: http://core.svn.wordpress.org/trunk@51908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-03 19:39:00 +00:00
hellofromTonya
b32e8f7284 HTTP API: Fix classname WpOrg\Requests\Proxy\Http in WP_Http::request().
Renaming the classname was missed in [52244] when updating changes in `WP_Http::request()` for the Requests 2.0.0 external library upgrade. `HTTP` class no longer exists and caused a fatal error `Fatal error: Uncaught Error: Class 'WpOrg\Requests\Proxy\HTTP' not found`.

This commit renames the class to `Http` and resolves the fatal error.

Follow-up to [52244].

Props alexeydemidov, costdev, mukesh27.
Fixes #54562.
Built from https://develop.svn.wordpress.org/trunk@52315


git-svn-id: http://core.svn.wordpress.org/trunk@51907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-03 18:03:59 +00:00