Commit Graph

20041 Commits

Author SHA1 Message Date
Sergey Biryukov
fdc6380337 Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/class-wp-posts-list-table.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit:
* Renames the `$class` parameter to `$css_class` in `WP_Posts_List_Table::get_edit_link()`.
* Renames the `$parent` parameter to `$parent_page` in `WP_Posts_List_Table::_page_rows()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55327.

git-svn-id: https://develop.svn.wordpress.org/trunk@53116 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-09 20:36:53 +00:00
Joe Dolson
5a1262f02b Media: Align username and post title in Save postbox.
Remove the float alignment that places the "Uploaded by" username and the "Uploaded to" post title on the opposite side of the Save postbox for mobile. This matches the alignment on desktop, and makes it easier for low-vision users to track the information relationship between label and content.

Props sabernhardt.
Fixes #55508.

git-svn-id: https://develop.svn.wordpress.org/trunk@53115 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 21:08:55 +00:00
Joe Dolson
0f7c6cd618 Posts, Post Types: Make permalink fully visible on mobile.
Set `break-word` on sample permalink so the full permalink will be visible on mobile devices in posts, media, and comments. Prevent hidden text overflow or horizontal scrolling on mobile.

Props sumitsingh, sabernhardt.
Fixes #54811.

git-svn-id: https://develop.svn.wordpress.org/trunk@53114 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 20:36:03 +00:00
Joe Dolson
2b63ad63b0 Users: Use autocomplete values on user profiles.
Assign appropriate autocomplete values for new and edited user, user email, and password fields.

Props clonemykey, sabernhardt, WraithKenny, bookdude13, konradyoast.
Fixes #43886, #52714.

git-svn-id: https://develop.svn.wordpress.org/trunk@53111 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 17:38:55 +00:00
Jonny Harris
5486f3b06a REST API: Use rest_parse_embed_param function in WP_REST_Server class.
Ensure that the value get parameter `_embed ` that is passed to the `envelope_response` method, is run through the `rest_parse_embed_param` function. 

Props Spacedmonkey, johnbillion, TimothyBlynJacobs. 
Fixes #54015.



git-svn-id: https://develop.svn.wordpress.org/trunk@53110 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 17:27:42 +00:00
Joe Dolson
cbf7859f92 Quick/Bulk Edit: Fix padding in term quick edit.
Fix missing padding on quick edit for taxonomy terms following accessibility changes in [53096].

Props afercia.
Fixes #35483.

git-svn-id: https://develop.svn.wordpress.org/trunk@53109 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 17:03:10 +00:00
Peter Wilson
22fbb4a9ae Networks and Sites: Increase sort options in WP_Site_Query.
Add orderby support for the boolean options: deleted, spam, mature, archived and public.

Props lenasterg, SergeyBiryukov.
Fixes #55226.



git-svn-id: https://develop.svn.wordpress.org/trunk@53107 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 06:34:21 +00:00
Peter Wilson
bacb5d26bc Embeds: Add YouTube shorts to the allow list.
YouTube shorts URLs have a different structure to other YouTube videos. This adds support for the structure for YouTube embeds.

Props danielbachhuber, johnbillion, mukesh27.
Fixes #55528.



git-svn-id: https://develop.svn.wordpress.org/trunk@53106 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 06:29:26 +00:00
Peter Wilson
3f01a736b9 Users: Prevent author changes in bulk editor on large sites.
On large sites (with over 1000 users), include a hidden `post_author` field in the bulk editing interface to preven unexpected authorship changes.

Follow up to [53011], [53049].

Props georgestephanis, tobifjellner, peterwilsoncc, spacedmonkey, jb510.
Fixes #38741.



git-svn-id: https://develop.svn.wordpress.org/trunk@53105 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 06:24:32 +00:00
Peter Wilson
4f290ecd64 Administration: Allow floats for menu positions.
Permit plugin authors to pass the menu position as a float in `add_menu_page()` and `add_submenu_page()`. This allows for a common practice within major plugins to avoid menu collisions by passing a float.

Follow up to [52569].

Props justinbusa, dd32, welcher, SergeyBiryukov, kirtan95, audrasjb, Cybr, chaion07, costdev, peterwilsoncc.
See #40927.



git-svn-id: https://develop.svn.wordpress.org/trunk@53104 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 06:15:02 +00:00
Peter Wilson
c4545fde8d Script loader: Add wp-a11y as dependency of wp-ajax-response.
Ensure `wp.a11y.speak()` is available when called in `wp-ajax-response`.

Follow up to [52170].

Props afercia.
Fixes #55544.
See #42937.


git-svn-id: https://develop.svn.wordpress.org/trunk@53103 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 05:58:09 +00:00
Sergey Biryukov
2e5de394c7 I18N: Add missing translator comment for application password helper text for Super Admins.
Follow-up to [53101].

See #53234.

git-svn-id: https://develop.svn.wordpress.org/trunk@53102 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-08 00:01:18 +00:00
Jb Audras
794d76c074 Application Passwords: Use a more appropriate helper text message for super-admins.
Previously, the helper text of the application password section was misleading for a Super Admin because an application password for a Super Admin grants access to all sites on the network, not just ones that they are a member of. This changeset provides a slightly different message for Super admin role.

Props johnbillion, rsiddharth, audrasjb.
Fixes #53234


git-svn-id: https://develop.svn.wordpress.org/trunk@53101 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 23:14:52 +00:00
Jb Audras
a43a096883 Toolbar: Add a filter to help remove site icons from toolbar for large multisite, and lazy load them by default.
This changeset introduces the `wp_admin_bar_show_site_icons` filter to help developers to hide site icons from the toolbar, as it may have negative performance impact on large multisites. It also adds a default lazy load behavior for these icons.

Props wslyhbb, sabernhardt, lkraav, kebbet, peterwilsoncc.
Fixes #54447


git-svn-id: https://develop.svn.wordpress.org/trunk@53100 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 22:12:34 +00:00
Sergey Biryukov
4eea5639c0 Customize: Use correct dashicon for external links in the Additional CSS section.
This replaces the `migrate` dashicon with `external` in the section description styles.

Follow-up to [38829].

Props pross.
Fixes #55542.

git-svn-id: https://develop.svn.wordpress.org/trunk@53099 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 18:00:18 +00:00
Jonny Harris
761fb95954 Networks and Sites: Improve cache key generation in WP_Network_Query class.
Improve cache key generation in the `WP_Network_Query` class by removing `update_network_cache` element in the array used to generate the cache key.  This 
element does not affect that cache and by removing it, it improves the likelihood of reusing an existing cache. 

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



git-svn-id: https://develop.svn.wordpress.org/trunk@53098 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-07 17:57:59 +00:00
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
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
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
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
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