45489 Commits

Author SHA1 Message Date
Jonny Harris
4b177da5da Networks and Sites: Improve cache key generation in WP_Site_Query class.
Improve cache key generation in the `WP_Site_Query` class by removing `update_site_cache` and `update_site_meta_cache` elements in the array used to generate 
the cache key.  These elements do not affect that cache and by removing them, improve the likelihood of reusing an existing cache. 

Props Spacedmonkey, furi3r, johnbillion, johnjamesjacoby, flixos90.
Fixes #55462.



git-svn-id: https://develop.svn.wordpress.org/trunk@53097 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 17:44:34 +00:00
Joe Dolson
7f26a0b5ce Quick/Bulk Edit: Fix initial focus and keyboard operability.
Fix the quick and bulk edit forms to set an appropriate initial focus, use native HTML controls for all interactions, and set appropriate labels for controls. Improve the semantics of HTML wrappers so lists are enumerable by screen readers.

Props afercia, azaozz.
Fixes #35483.

git-svn-id: https://develop.svn.wordpress.org/trunk@53096 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 16:42:11 +00:00
Greg Ziółkowski
ae9cff730f Editor: Remove loading remote patterns from editor pages
Stops loading remote patterns on the post editor and site editor pages. The only place to load remote patterns is going to be the `/wp/v2/block-patterns/patterns` REST endpoint handler.

Props jsnajdr.
See #55505.




git-svn-id: https://develop.svn.wordpress.org/trunk@53095 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 13:51:07 +00:00
Greg Ziółkowski
0709354ca7 Editor: Update preload paths for post, site and widgets editors
Changes the REST endpoints that get preloaded when displaying a page for post, site and widgets editor, so that they are in sync with what the latest version of Gutenberg to be shipped with Core 6.0 really requests.

Props jsnajdr.
See #55505.




git-svn-id: https://develop.svn.wordpress.org/trunk@53094 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 13:38:08 +00:00
Greg Ziółkowski
e3cf5c4183 Site Editor: Resolve homepage template on server-side
Backports change from Gutenberg to support server-side home template resolution in the Site Editor. Original PR https://github.com/WordPress/gutenberg/pull/38817.

Props Mamaduka.
See #55505.




git-svn-id: https://develop.svn.wordpress.org/trunk@53093 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 13:33:03 +00:00
Sergey Biryukov
e34d775476 Administration: Restore the correct escaping function for base64-encoded SVG icons in the admin menu.
Add a comment to clarify the `esc_attr()` usage instead of `esc_url()`.

Follow-up to [53050].

Props KProvance, kebbet, w33zy, ocean90, mukesh27.
Fixes #55539.

git-svn-id: https://develop.svn.wordpress.org/trunk@53092 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 12:52:32 +00:00
Greg Ziółkowski
9a7a11a74f Editor: Allow registration of blocks that include assets from within a theme
Fixes the issue when you register blocks with `block.json` in your theme. There is no longer an assets's URL error because it resolves correctly in relation to the theme where it is located.

Props fabiankaegy, ocean90, whoisnegrello, audrasjb, peterwilsoncc, 
Fixes #54647, #55513.



git-svn-id: https://develop.svn.wordpress.org/trunk@53091 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 11:57:16 +00:00
Greg Ziółkowski
b3a85cbd54 Editor: Add localAutosaveInterval preference to editor settings
Backports changes from the Gutenberg plugin. Original PR in Gutenberg: https://github.com/WordPress/gutenberg/pull/39180.

Props zieleadam, talldanwp.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53090 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 11:14:46 +00:00
Peter Wilson
86c6fb2915 Editor: Limit display of tags on classic editor.
On the classic editor, limit the search of tags and non-hierarchical taxonomies to twenty results. This in turn prevents an unbounded database query via an AJAX request.

Props pikamander2, costdev, azouamauriac, audrasjb.
Fixes #55052.



git-svn-id: https://develop.svn.wordpress.org/trunk@53089 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 04:04:31 +00:00
Peter Wilson
7f94f99062 Taxonomy: Show error message for terms without a name.
Display an error message to users if they attempt to create a term without a name via the admin-ajax `add-tag` action. This improves the accessibility of the screen by avoiding the use of color alone to indicate an error.

Props conner_bw, birgire, afercia.
Fixes #47018.



git-svn-id: https://develop.svn.wordpress.org/trunk@53088 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 03:48:16 +00:00
Sergey Biryukov
342cd8ca52 Docs: Adjust DocBlock formatting for wp_robots_*() and related functions.
This ensures the code blocks are displayed correctly in the WordPress Code Reference.

Follow-up to [19304], [37541], [44021], [49992].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53087 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 15:31:23 +00:00
Sergey Biryukov
6620cef12d Docs: Adjust some deprecated function DocBlocks per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#1-2-deprecated-functions documentation standards].
This ensures the replacement functions are linked correctly in the WordPress Code Reference.

Follow-up to [38515], [43548], [49992], [51348], [51586], [52757], [53082].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53086 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 15:18:08 +00:00
Greg Ziółkowski
f187393d0a Editor: Update layout handling for block supports
Backports changes applied in the Gutenberg plugin planned for WordPress 6.0 release. See https://github.com/WordPress/gutenberg/issues/39889.

Props ramonopoly, youknowriad.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53085 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 11:39:55 +00:00
Greg Ziółkowski
815441077c Editor: Make block type aware of the ancestor field
The `ancestor` field was recently added to the `block.json` schema in Gutenberg. See: https://github.com/WordPress/gutenberg/pull/39894.

Props darerodz.
Fixes #55531.



git-svn-id: https://develop.svn.wordpress.org/trunk@53084 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 09:45:31 +00:00
Peter Wilson
b72c1d00ae Networks and Sites: Remove duplicate cache entry.
Remove the `networks_have_paths, site-options` cache entry as it duplicates caching within the `WP_Network_Query` class.

Props uday17035, spacedmonkey, johnbillion, johnjamesjacoby.
Fixes #42070.



git-svn-id: https://develop.svn.wordpress.org/trunk@53083 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 04:33:50 +00:00
Peter Wilson
18a6ec7048 Editor: Soft deprecate block supports functions.
Reinstate the functions hard deprecated in [53076]: `wp_skip_border_serialization()`, `wp_skip_dimensions_serialization()` and `wp_skip_spacing_serialization()`.

Props ramonopoly.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53082 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-06 04:23:00 +00:00
Jonathan Desrosiers
10b258f61c Build/Test Tools: Prevent error when workflows run for new branches and tags.
This fixes a JavaScript error in the Slack notifications workflow. This was causing the first workflow run for each workflow in a new branch or tag to be reported as a failure, even if the important parts of the workflow succeed.

When running a workflow for the first time, a default of `failure` is now used for the previous outcome. This will trigger a success notification to be sent to report successful branching/tagging.

Props davidbaumwald.
Fixes #54742.

git-svn-id: https://develop.svn.wordpress.org/trunk@53077 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 13:18:53 +00:00
Greg Ziółkowski
3a9abc810a Editor: Backport block support changes from the Gutenberg plugin
Migrate spacing, border, color, dimensions, elements and typography and associated tests for block supports in the block editor.

Related changes in Gutenberg:
- Include individual serialization changes from 6de16981c7
- Skip Style Engine integration from 44925a947f%60

Props ramonopoly, aaronrobertshaw.
See #55505.



git-svn-id: https://develop.svn.wordpress.org/trunk@53076 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 12:06:48 +00:00
Riad Benguella
639e3180d3 Block Editor: Synchronize global styles endpoint code with Gutenberg.
This adds a missing fallback to ensure styles property is always defined in the returned data.

Props gziolo.
See #55505.


git-svn-id: https://develop.svn.wordpress.org/trunk@53075 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 11:47:14 +00:00
Sergey Biryukov
b8382dfe92 Plugins: Introduce the plugin_install_description filter.
This allows for modification of the plugin card description on the Add Plugins screen.

Use cases include displaying a list of dependencies for the [https://make.wordpress.org/core/2022/02/24/feature-project-plugin-dependencies/ Plugin Dependencies feature project] ([https://github.com/WordPress/wp-plugin-dependencies GitHub]).

Props afragen, davidbaumwald, peterwilsoncc, SergeyBiryukov.
Fixes #55480.

git-svn-id: https://develop.svn.wordpress.org/trunk@53074 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 11:00:58 +00:00
Riad Benguella
ed1f411c56 Block Editor: Backport the Global Styles Variations endpoint.
This include the /global-styles/themes/{theme}/variations rest endpoint into core.
The endpoint will be used by the site editor to display alternative theme styles to the user.

Props gziolo, oandregal.
See #55505.


git-svn-id: https://develop.svn.wordpress.org/trunk@53072 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 09:50:13 +00:00
Greg Ziółkowski
9a9ec776a8 Env: Revert accidental changes to the config
It's the only way to make the env work locally with Apple M1 processor, but I included them by accident.

Props Mamaduka.
See [53070]. 



git-svn-id: https://develop.svn.wordpress.org/trunk@53071 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 09:31:06 +00:00
Greg Ziółkowski
f5cc51c8ca Editor: Fix post lock data inconsistencies
Backporting fixes introduced in WordPress/gutenberg#37914.

Props Mamaduka.
Fixes #55238.



git-svn-id: https://develop.svn.wordpress.org/trunk@53070 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 09:19:58 +00:00
Greg Ziółkowski
d0a0207851 Build: Fix npm install on Apple Silicon
Fixes the issue where `npm install` aborts on Apple Silicon due to Puppeteer not finding appropriate chromium binary. It works correctly with the latest versio of `grunt-contrib-qunit` package.

Props afragen, jorbin, SergeyBiryukov.
Fixes #52690.
Related #52356.





git-svn-id: https://develop.svn.wordpress.org/trunk@53069 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 08:44:16 +00:00
Peter Wilson
f790a8ed88 Login, Registration: Fix coding standards errors in [53067].
See #35500.



git-svn-id: https://develop.svn.wordpress.org/trunk@53068 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 04:16:37 +00:00
Peter Wilson
a742b270ff Login, Registration: Prevent password reset to whitespace alone.
Prevent users from using the password reset form to set their password to whitespace alone (tabs, spaces). This matches the processing used during the authentication flow, ensuring users do not inadvertently get locked out of their account.

Props antonrinas, swissspidy, voldemortensen, hellofromTonya, henry.wright, costdev.
Fixes #35500.



git-svn-id: https://develop.svn.wordpress.org/trunk@53067 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 03:25:38 +00:00
Peter Wilson
d613ac5555 Query: Add tests following [53065].
Props spacedmonkey, boonebgorges, pbearne.
See #36904.



git-svn-id: https://develop.svn.wordpress.org/trunk@53066 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 01:59:52 +00:00
Peter Wilson
5ac4ec3208 Query: Cache comments feeds in WP_Query.
Cache queries to the comments table in `WP_Query` for various comments feeds. Only comment IDs are stored for each feeds cache to avoid doubling up caching with each individual comment's cache.

Props spacedmonkey, boonebgorges, pbearne.
Fixes #36904.



git-svn-id: https://develop.svn.wordpress.org/trunk@53065 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-05 01:53:59 +00:00
Jb Audras
fc163963ab Docs: Use third-person singular verbs for function descriptions in WP_Automatic_Updater class, per the documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53064 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 20:51:22 +00:00
Jb Audras
ccdb078d08 Mail: Replace empty site title with domain name in email subjects.
This change replaces site title with domain name in email subjects when the `blogname` option is empty.

Props Presskopp, kebbet, audrasjb, azouamauriac.
Fixes #54760.


git-svn-id: https://develop.svn.wordpress.org/trunk@53063 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 20:19:12 +00:00
Sergey Biryukov
671d2caa29 Docs: Add missing description for $taxnow global in various functions.
Follow-up to [53060], [53061].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53062 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 18:41:13 +00:00
Sergey Biryukov
57a8245f8f Docs: Add missing description for $typenow global in various functions.
Follow-up to [53060].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53061 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 18:37:24 +00:00
Sergey Biryukov
8277055e37 Docs: Add missing description for $pagenow global in various functions.
See #54729, #55499.

git-svn-id: https://develop.svn.wordpress.org/trunk@53060 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 18:24:18 +00:00
Sergey Biryukov
74f4d6b441 Docs: Consistently document the $pagenow global in WP_Customize_Manage methods.
Follow-up to [41839].

Props jontyravi, bhrugesh12, kebbet.
Fixes #55499.

git-svn-id: https://develop.svn.wordpress.org/trunk@53059 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 12:02:00 +00:00
Peter Wilson
3cd1a741a0 Posts, Post Types; Taxonomy: Translate default labels once.
Improve the translation of post type and taxonomy labels by caching the translations during runtime. To account for internationalisation plugins, the runtime cache is cleared as the post types/taxonomies are reinitiated on `change_local` hook.

The same property and methods are added to both `WP_Post_Type` and `WP_Taxonomy`:

* `$default_labels`: for storing the translated strings at runtime
* `get_default_labels()`: for getting the default labels, these are translated on the first run and stored in the new property.
* `reset_default_labels()`: to clear the runtime cache and force a re-translation of the default labels

Props Chouby, nacin, SergeyBiryukov, Rarst, chriscct7, ocean90, audrasjb, costdev.
Fixes #26746.



git-svn-id: https://develop.svn.wordpress.org/trunk@53058 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 03:48:08 +00:00
Peter Wilson
f99389a125 Customizer: Improve performance checking for published pages.
Improve the performance of `WP_Customize_Manager::has_published_pages()` by limiting the database query to a single published page, down from querying all published pages.

Props nagpai, dlh, tyxla.
Fixes #55425.



git-svn-id: https://develop.svn.wordpress.org/trunk@53057 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-04 01:23:55 +00:00
Sergey Biryukov
ecfb9d6a3e Docs: Use correct format for multi-line comments in the_block_editor_meta_boxes().
Follow-up to [44131], [44260].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53056 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-03 11:43:07 +00:00
Jb Audras
eec6c374bd Docs: Use third-person singular verbs for function descriptions in WP_Customize_Nav_Menus class, per the documentation standards.
Follow-up to [53054].

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53055 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-02 16:24:24 +00:00
Jb Audras
852ea9e699 Docs: Use third-person singular verbs for function descriptions in WP_Customize_Manager class, per the documentation standards.
Props azouamauriac.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53054 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-02 16:19:58 +00:00
Sergey Biryukov
25bff41798 Docs: Further remove HTML markup from various function summaries.
Per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#summary-formerly-short-description WordPress PHP documentation standards], no HTML markup or Markdown of any kind should be used in the summary. This ensures that the summary is displayed correctly in the [https://developer.wordpress.org/reference/ WordPress Code Reference].

This commit also improves formatting of HTML special characters in descriptions in `wp-includes/formatting.php`.

Follow-up to [53048].

Props johnbillion, mukesh27.
Fixes #55506.

git-svn-id: https://develop.svn.wordpress.org/trunk@53053 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-02 13:53:06 +00:00
Joe Dolson
3dd751a914 General: Open change permalink structure links in same tab.
Remove `target="_blank"` from the link to change permalink structures and change link text to clarify link purpose. 

Props kebbet, sabernhardt.
Fixes #55252.


git-svn-id: https://develop.svn.wordpress.org/trunk@53052 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 20:08:30 +00:00
Joe Dolson
bc0b296237 Twenty Twenty: Fix aria-expanded handling in search toggle.
Transform search into a dialog role and fix the handling of aria-expanded to synchronize mobile and desktop buttons.

Props utz119, alexstine, mukesh27, hareesh-pillai, sabernhardt, audrasjb, afercia.
Fixes #53951.


git-svn-id: https://develop.svn.wordpress.org/trunk@53051 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 17:54:30 +00:00
Sergey Biryukov
c27cc8b694 Administration: Consistently escape icon URLs in the admin menu.
Follow-up to [9154], [26664].

Props chintan1896, jigar-bhanushali, mukesh27.
Fixes #55496.

git-svn-id: https://develop.svn.wordpress.org/trunk@53050 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 11:44:59 +00:00
Jonny Harris
5f6ff5333f Users: Fix notice error in WP_Posts_List_Table class.
Fix notice error introduced in [53011] as the variable `$authors_dropdown` is now conditionally loaded. 

Follow-up to [53011].

Props Spacedmonkey, dd32, johnbillion. 
See #38741. 



git-svn-id: https://develop.svn.wordpress.org/trunk@53049 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 11:41:23 +00:00
Sergey Biryukov
4118c2c7a4 Docs: Remove HTML markup from WP_REST_URL_Details_Controller class method summaries.
Per the [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/#summary-formerly-short-description WordPress PHP documentation standards], no HTML markup or Markdown of any kind should be used in the summary. This ensures that the summary is displayed correctly in the [https://developer.wordpress.org/reference/ WordPress Code Reference].

Props gvgvgvijayan, rsiddharth, azouamauriac, SergeyBiryukov.
Fixes #55506.

git-svn-id: https://develop.svn.wordpress.org/trunk@53048 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 11:33:15 +00:00
Jb Audras
b43302508b Adds "select all" shortcut for Mac on permalinks page when .htaccess is not writable.
This change improves the description of the "select all" shortcut for Mac users in Permalink Settings screen.

Props Valer1e, ajoah, audrasjb, SergeyBiryukov.
Fixes #54633.


git-svn-id: https://develop.svn.wordpress.org/trunk@53047 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 11:07:39 +00:00
Jb Audras
1f7977d4c2 Docs: Use third-person singular verbs for function descriptions in WP_Embed class, per the documentation standards.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53046 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 08:30:07 +00:00
Peter Wilson
b0aefcff4a General: Validate input of wp_list_pluck().
`wp_list_pluck()` is used by WordPress to pluck items from a list. Of course, this requires a list. This validates the input of `wp_list_pluck()` to ensure it is a list.

This matches the behaviour of `wp_list_sort()` and `wp_filter_object_list()`.

Props marv2, davidbaumwald, mkox, SergeyBiryukov, dd32.
Fixes #54751.



git-svn-id: https://develop.svn.wordpress.org/trunk@53045 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 05:54:37 +00:00
Peter Wilson
a20c20774f Formatting: Account for HTML entities in wp_extract_urls().
Prevent `wp_extract_urls()` trimming HTML entities within URLs. Correctly escaped URLs such as https://youtube.com/watch?v=dQw4w9WgXcQ&t=1 will now be extracted as https://youtube.com/watch?v=dQw4w9WgXcQ&t=1 rather than truncated.

Props trex005, voldemortensen, johnbillion, ironprogrammer, costdev, hellofromtonya.
Fixes #30580



git-svn-id: https://develop.svn.wordpress.org/trunk@53044 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 03:38:55 +00:00
Peter Wilson
afc55a72de Canonical: Include all public status in 404 redirects.
In `redirect_guess_404_permalink()` search for posts using all publicly queryable statuses rather than limiting options to the `publish` status.

Props goaroundagain, costdev, htdat, audrasjb, chaion07.
Fixes #47911.



git-svn-id: https://develop.svn.wordpress.org/trunk@53043 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-01 03:23:07 +00:00