49518 Commits

Author SHA1 Message Date
Tonya Mork
20b0c74187 Plugin Dependencies: Ensure dependency detection for newly installed plugins.
Resolves a bug by first initializing in the AJAX callback `WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax()`.

More details:

[57658] removed auto-deactivation and bootstrapping logic from the Plugin Dependencies feature. In doing so, initialization calls were added to various locations in Core to ensure dependencies were detected and ready to be checked. However, an initialization call was missed in the AJAX callback before checking plugin dependencies.

This means that a plugin's dependencies may not be detected, and lead to a false positive, which in turn allows the user to click Activate only to see a failure message.

Follow-up to [57658].

Props kevinwhoffman, costdev, afragen.
Fixes #61294.

git-svn-id: https://develop.svn.wordpress.org/trunk@58252 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 15:13:58 +00:00
Jonathan Desrosiers
b62bd796eb Build/Test Tools: Add supported MySQL versions for 6.6 to the support file.
See #60705.

git-svn-id: https://develop.svn.wordpress.org/trunk@58251 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 14:53:20 +00:00
Tonya Mork
6ac85af131 Upgrade/Install: Restore Activate button's href native behavior.
Restores the Activate button's `href` native behavior by changing the AJAX activation handler introduced in 6.5.0. It restores the pre-6.5 behavior of clicking the "Activate" button, i.e. navigates the user to the button's `href` (i.e. to the `plugins.php` UI).

Why?

Feedback was given after shipping [57545] in 6.5.0 (but was unknown during the development and testing cycles) revealed significant impacts for plugins who's users valued the onboarding / configuration experiences.

6.5.3's [58081] and [58083] added a new user action / step to the workflow. Though helpful, it did not fully resolve the impacts.

For the minor, this commit seeks to restore only the "Activate" button's `href` pre-6.5 native behavior to resolve the regression.

The next phase of the Add Plugins workflow can then continue in a major release to gain the benefits of a full major to move it from ideation through the development phases. (See #61040). The questions of redirect, how / should configuration be in the workflow, etc. can best be explored and experimented with in a major.

Follow-up to [57545], [58081], [58083].

Props costdev, jorbin, hellofromTonya, afragen, kevinwhoffman, azaozz, adrianduffell, beaulebens, hmbashar, illuminea, ironprogrammer, jjj, lopo, louiswol94, mikachan, nerrad, mukesh27, peterwilsoncc, pooja1210, smub, swissspidy.

Fixes #61319.
See #22316, #60992.

git-svn-id: https://develop.svn.wordpress.org/trunk@58250 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 14:43:30 +00:00
Joe Dolson
1182f8aced Media: Remove duplicate CSS from media-views.css.
Remove duplicate CSS from the `media-views.css` file. Follow up to [50829].

Props afercia, joedolson, shailu25.
Fixes #60499.

git-svn-id: https://develop.svn.wordpress.org/trunk@58249 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 13:57:33 +00:00
Joe Dolson
21eb377270 Media: Protect mime type icon function from simple errors.
Handle `$preferred_ext` arguments that are passed with minor errors in formatting, such as incorrect casing or missing `.`. Add unit tests to verify that an omitted period on an otherwise correct extension is accepted. Follow up to [57687].

Props sabernhardt, joedolson, khokansardar.
Fixes #60610.

git-svn-id: https://develop.svn.wordpress.org/trunk@58248 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 13:01:44 +00:00
Pascal Birchler
7a64d4044d Editor: Improve types in docblock after [58246].
Makes it clearer that an array of strings is expected.

See #61274.

git-svn-id: https://develop.svn.wordpress.org/trunk@58247 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 08:52:33 +00:00
Isabel Brison
0144dd32df Editor: allow registering block styles for multiple block types.
Updates the `WP_Block_Styles_Registry` class to allow registering an array of blocks.

Props aaronrobertshaw, talldanwp, isabel_brison.
Fixes #61274.


git-svn-id: https://develop.svn.wordpress.org/trunk@58246 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 07:33:23 +00:00
Isabel Brison
911142a70f Editor: Update util for scoping CSS selectors.
Adds early return for existing scope_selector method in preparation for extending block style variations.

Props aaronrobertshaw, audrasjb, isabel_brison.
Fixes #61120.


git-svn-id: https://develop.svn.wordpress.org/trunk@58245 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 05:21:00 +00:00
Isabel Brison
2981078975 Editor: Add scoping of feature level global styles selectors.
Ensures that feature-level selectors for block style variations are correctly scoped when generating a theme.json stylesheet.

Props aaronrobertshaw, audrasjb, vcanales, isabel_brison.
Fixes #61119.


git-svn-id: https://develop.svn.wordpress.org/trunk@58244 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 04:38:26 +00:00
Isabel Brison
0b9c4ed70b Editor: Negative margins for alignfull children of blocks with custom padding.
Fixes a condition that was preventing align full blocks to extend full width when their parent block has custom padding.

Props richtabor, isabel_brison, ramonopoly.
Fixes #61313.


git-svn-id: https://develop.svn.wordpress.org/trunk@58243 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 04:08:56 +00:00
Isabel Brison
4e244424f0 Editor: add aspect ratio presets support.
Enables customizing the list of aspect ratio options available through theme.json.

Props fabiankaegy, isabel_brison, swissspidy.


git-svn-id: https://develop.svn.wordpress.org/trunk@58242 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 03:08:31 +00:00
Isabel Brison
d6692b7e32 Editor: level global styles specificity at 0-1-0.
Adjusts the block level global styles selectors so they have a consistent specificity of 0-1-0, and adjusts base and layout global style selectors to their minimum required specificity.

Props aaronrobertshaw, isabel_brison, andrewserong, mukesh27.
Fixes #61165.


git-svn-id: https://develop.svn.wordpress.org/trunk@58241 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-30 01:14:15 +00:00
Joe Dolson
ee8f64c17e Media: Accessibility: Make alt text information URL translatable.
Allow translators to replace the W3C WAI decision tree link used to provide information about writing alt text. Improves accessibility for non-English speaking content authors.

Props tmatsuur, joedolson, oglekler, SergeyBiryukov, myhro, sabernhardt.
Fixes #60975.

git-svn-id: https://develop.svn.wordpress.org/trunk@58240 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 22:20:43 +00:00
Tammie Lister
79a5ab1370 Twenty Sixteen: Fixes pre element having less padding in the editor.
The verse block has different padding between editor and frontend. 

Props pranitdugad, sumitsingh, sumitbagthariya16, hitendra-chopda, sabernhardt, huzaifaalmesbah, shuvomohajan, hmbashar.
Fixes #61306.


git-svn-id: https://develop.svn.wordpress.org/trunk@58239 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 21:05:20 +00:00
Tammie Lister
70203a19be Twenty Eleven: Resolves padding for media and text block.
The media and test block had misaligned padding. This changes styles to match margins.

Props kajalgohel, nidhidhandhukiya, ironprogrammer, sabernhardt, costdev, huzaifaalmesbah, hmbashar.
Fixes #57195.


git-svn-id: https://develop.svn.wordpress.org/trunk@58238 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 20:58:13 +00:00
Tammie Lister
415995a210 Twenty Seventeen: Updates docblock for function.
The new function twentyseventeen_should_show_featured_image was missing documentation for the custom filter. This brings that in.

Props poena.
Fixes #39281.


git-svn-id: https://develop.svn.wordpress.org/trunk@58237 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 19:41:03 +00:00
Pascal Birchler
a53b5314ea I18N: Add new lang_dir_for_domain filter.
This new filter in `WP_Textdomain_Registry` allows plugins to override the determined languages folder when using just-in-time translation loading.

Props swissspidy, chouby, johnbillion.
Fixes #61206.

git-svn-id: https://develop.svn.wordpress.org/trunk@58236 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 15:42:46 +00:00
Sergey Biryukov
a6f91faa79 Tests: Use more specific assertions in a few tests.
Follow-up to [121/tests], [915/tests], [34903], [36307], [43548], [44154], [52286], [57337].

See #60705.

git-svn-id: https://develop.svn.wordpress.org/trunk@58235 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 12:20:56 +00:00
Greg Ziółkowski
4b91a597b7 Interactivity API: Move directive processing to WP_Block class
Integrates the directives processing into the WP_Block class. It removes the overhead of running additional hooks when rendering blocks and simplifies the way we detect whether the directive processing should run on an interactive region of the produced final HTML for the blocks.

Introduces `interactivity_process_directives` filter to offer a way to opt out from directives processing. It's needed in Gutenberg: https://github.com/WordPress/gutenberg/pull/62095.

Props gziolo, cbravobernal.
Fixes #61185.



git-svn-id: https://develop.svn.wordpress.org/trunk@58234 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 11:55:27 +00:00
Dennis Snell
6ca5bdc3ac HTML API: Fix token length bug in Tag Processor.
The Tag Processor stores the byte-offsets into its HTML document where
the current token starts and ends, and also for every bookmark. In some
cases for tags, the end offset has been off by one.

In this patch the offset is fixed so that a bookmark always properly
refers to the full span of the token it's bookmarking. Also the current
token byte offsets are properly recorded.

While this is a defect in the Tag Processor, it hasn't been exposed 
through the public interface and has not affected any of the working
of the processor. Only subclasses which rely on the length of a bookmark
have been potentially affected, and these are not supported environments
in the ongoing work.

This fix is important for future work and for ensuring that subclasses
performing custom behaviors remain as reliable as the public interface.

Developed in https://github.com/WordPress/wordpress-develop/pull/6625
Discussed in https://core.trac.wordpress.org/ticket/61301

Props dmsnell, gziolo, jonsurrell, westonruter.
Fixes #61301.


git-svn-id: https://develop.svn.wordpress.org/trunk@58233 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 11:40:16 +00:00
Greg Ziółkowski
a928272d05 Tests: Update the generated fixture for REST API
Follow-up [58227].
See #61137.




git-svn-id: https://develop.svn.wordpress.org/trunk@58232 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 10:48:48 +00:00
Tammie Lister
79e4d2f34b Twenty Fifteen: Resolves seperator block being too thick in iframe editor.
The seperator block was looking different in the iframe editor. This resolves that by unifying.

Props nidhidhandhukiya, sabernhardt, darshitrajyaguru97, yuvrajsinj2211.
Fixes #60079.


git-svn-id: https://develop.svn.wordpress.org/trunk@58231 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 09:45:29 +00:00
Ella
6a8460b033 Options: Add 'label' argument to register_setting.
The 'label' will displayed to users when editing core or custom settings via block editors. It avoids hardcoding Settings labels and improves extensibility.

Backports https://github.com/WordPress/gutenberg/pull/59243.

Props mamaduka, timothyblynjacobs, ellatrix.

Fixes #61023.



git-svn-id: https://develop.svn.wordpress.org/trunk@58230 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 08:51:04 +00:00
Pascal Birchler
5b9d094eaa REST API: Remove default text domain from translatable strings after [58227].
See #61137.

git-svn-id: https://develop.svn.wordpress.org/trunk@58229 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 08:21:18 +00:00
Ella
c106049fc3 Theme JSON: Extract util to get valid block style variations.
Extracts the repeated collection of valid block style variations into a util that can be reused or updated in a single place for future work around extending block style variations.

Backports https://github.com/WordPress/gutenberg/pull/61030.

Props aaronrobertshaw, audrasjb.

Fixes #61121.



git-svn-id: https://develop.svn.wordpress.org/trunk@58228 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 07:44:30 +00:00
Riad Benguella
48d8aef4f5 REST API: Allow view access of template endpoint to anyone with the edit_post capability.
In order to render the block template in the locked template preview inside the post editor we need to be able to fetch the contents of any block templates/template parts for any user role that can edit a post.

Props fabiankaegy, youknowriad.
Fixes #61137.

git-svn-id: https://develop.svn.wordpress.org/trunk@58227 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 07:19:56 +00:00
Isabel Brison
5064ffccdf Editor: improve consistency of root padding.
Improve the behaviour of global padding when useRootPaddingAwareAlignments is enabled in theme.json to be more consistent across blocks, templates and patterns.

Props richtabor, isabel_brison, andrewserong.
Fixes #61304.


git-svn-id: https://develop.svn.wordpress.org/trunk@58226 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-29 05:14:00 +00:00
Pascal Birchler
6fc019aa71 REST API: Refactor global styles endpoints in REST API to register with post type.
Updated the global styles endpoints in the REST API to extend from existing posts and revisions controllers. This reduces duplicated code and inconsistencies. The revisions controller is now a subclass of the `WP_REST_Revisions_Controller`. Related redundant methods were removed and schema generation and collection parameters were adjusted to suit the global styles context. Updated permission checks, constructor, and collection parameters accordingly. This change allows for easy override of these classes using the `register_post_type_args` filter.

This reintroduces [57624] (reverted in [57628]) with improved backward compatibility and further enhancements.

Props ramonopoly, spacedmonkey, mukesh27, swissspidy.
Fixes #60131.

git-svn-id: https://develop.svn.wordpress.org/trunk@58225 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-28 12:38:28 +00:00
Sergey Biryukov
f4165ae8ec Docs: Clarify that the $wp_error parameter of login_header() is nullable.
Follow-up to [7991], [25701], [28792], [43457], [58209], [58220].

See #60668, #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@58224 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-28 11:11:19 +00:00
Riad Benguella
647f285015 Toolbar: Update the site editor link in the Admin Bar.
The details page is being removed from the site editor in 6.6. we need to direct the admin bar menu item to the "edit" mode page directly.

Props youknowriad, mamaduka.
Fixes #61266.

git-svn-id: https://develop.svn.wordpress.org/trunk@58223 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-28 08:00:18 +00:00
Robert Anderson
e0d2960e12 Block Themes: Allow setting site-wide background images in theme.json
Syncs the necessary changes from Gutenberg to allow setting site-wide
background images using the top-level `styles.background` key in `theme.json`.

Props ramonopoly.
Fixes #61123.


git-svn-id: https://develop.svn.wordpress.org/trunk@58222 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-28 06:04:37 +00:00
Peter Wilson
3708901bf1 Build/Test Tools: Assert files exist/do not exist directly.
Replaces various boolean assertions wrapping `file_exists()` with either `assertFileExists()` or `assertFileDoesNotExist()` as appropriate for the test.

Props peterwilsoncc, mukesh27.
See #60705.


git-svn-id: https://develop.svn.wordpress.org/trunk@58221 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-28 05:25:06 +00:00
Jb Audras
aa34065c67 Login and Registration: login_header() docblock update after [58209].
This changeset indicates that the `$title` parameter is now nullable.

Follow-up to [58209].

Props skithund.
Fixes #60668.




git-svn-id: https://develop.svn.wordpress.org/trunk@58220 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 21:30:14 +00:00
Jb Audras
3d90f510c0 External Libraries: Revert some unwanted changes after [58218].
This reverts some unwanted changes related to `react` and react-dom` versions in `$vendor_scripts_versions`.

Follow-up to [58218].

Unprops audrasjb.
Fixes #61090.




git-svn-id: https://develop.svn.wordpress.org/trunk@58219 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 21:20:22 +00:00
Jb Audras
ef42cbbb52 External Libraries: Update the jQuery UI library to version 1.13.3.
For more information on the changes included, see https://blog.jqueryui.com/2024/04/jquery-ui-1-13-3-released/.

Props audrasjb, desrosj, khokansardar, swissspidy.
Fixes #61090.




git-svn-id: https://develop.svn.wordpress.org/trunk@58218 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 21:12:08 +00:00
Joe Dolson
4a0bed4d85 Media: Add missing units for length and dimensions in media library.
Include explicit units for media length and dimensions in attachment modal and media details screen.

Props Presskopp, joedolson, shailu25, audrasjb.
Fixes #59009.

git-svn-id: https://develop.svn.wordpress.org/trunk@58217 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 19:42:15 +00:00
Pascal Birchler
113c702798 Build/Test Tools: Update REST API fixtures after [58211].
See #41172.

git-svn-id: https://develop.svn.wordpress.org/trunk@58216 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 19:03:49 +00:00
Joe Dolson
b20f48ba81 Toolbar: Accessibility: Fix keyboard focus order of search form.
Change the priority of the search form & remove `float` so that the visual position of the form matches it's positioning in the DOM.

This sets the priority of the search form to an arbitrarily high value of `9999` to ensure it will generally be last in the DOM.

Props joedolson, sabernhardt, audrasjb.
Fixes #60685.

git-svn-id: https://develop.svn.wordpress.org/trunk@58215 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 18:39:53 +00:00
Joe Dolson
9a3ab81615 Media: Improve scale/crop layout in image editor medium breakpoints.
Adjust the max-width of the image edit settings panel so that reflow handling at intermediary breakpoints is more consistent and less fragile.

Props deepakvijayan, huzaifaalmesbah, joedolson, khokansardar.
Fixes #58979.

git-svn-id: https://develop.svn.wordpress.org/trunk@58214 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 18:01:56 +00:00
Joe Dolson
ca2a585353 Themes: Accessibility: Logo block returns empty link when image not set.
The logo block does not use theme mods, and instead saves a site-wide option `site_logo` to use as the site logo. 

Add handling for cases where the logo image does not exist and delete the `site_logo` option when the attachment configured as site logo is deleted.

Props afercia, joedolson, khokansardar, SergeyBiryukov.
Fixes #60922.

git-svn-id: https://develop.svn.wordpress.org/trunk@58213 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 16:39:13 +00:00
Sergey Biryukov
74ca651d9e Docs: Improve documentation for a few functions accepting a WP_Post object.
Follow-up to [15777], [23769], [24490], [25697], [37252], [49544].

See #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@58212 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 16:28:00 +00:00
Pascal Birchler
56a12ceea0 Posts, Post Types: Remove now obsolete hardcoded attachment check for autosave support.
Follow-up to [58201].

Props swissspidy, spacedmonkey.
See #41172.

git-svn-id: https://develop.svn.wordpress.org/trunk@58211 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 15:22:05 +00:00
Jb Audras
5eb0c701f0 Upload: Add missing escaping functions in wp-admin/async-upload.php.
Props nareshbheda, mukesh27.
Fixes #60978.




git-svn-id: https://develop.svn.wordpress.org/trunk@58210 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 14:29:56 +00:00
Jb Audras
95a31c331c Login and Registration: Ensure login header title is translatable.
This changeset ensures the login header default title string is translatable in `login_header()`.

Props juliobox, swissspidy, audrasjb.
Fixes #60668.




git-svn-id: https://develop.svn.wordpress.org/trunk@58209 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 14:09:09 +00:00
Jb Audras
50f32ec40e HTTP API: Improve download_url() error message.
This changeset improves the error message returned when no URL is provided, and updates the related unit tests accordingly.

Props hinnerk, audrasjb.
Fixes #60565.




git-svn-id: https://develop.svn.wordpress.org/trunk@58208 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 13:53:55 +00:00
Tammie Lister
f1c0e5856e Twenty Seventeen: Resolves image block caption text alignment inconsitency.
The caption for image block was misaligned. The issue appeared in 5.8 due to the block class name change making the selector meaningless. This is resolved by a change in the selectors.

Props nkeller15, sabernhardt, thakordarshil, anilvaza, shailu25, pavanpatil1, darshitrajyaguru97.
Fixes #58539.


git-svn-id: https://develop.svn.wordpress.org/trunk@58207 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 12:41:32 +00:00
Tammie Lister
cf2cbb9fbd Twenty Seventeen: Add filter for display of featured image in header.
When a layout doesn't use custom post types it was appearing broken. This adds a filter for the display of the featured image to resolve this.

Props justnorris, JPry, davidakennedy, SergeyBiryukov, zkarj, poena, nhrrob, lamarajan.
Fixes #39281.


git-svn-id: https://develop.svn.wordpress.org/trunk@58206 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 12:26:51 +00:00
Tammie Lister
f2f6ab008d Twenty Twenty: Fixes button link not inheriting custom letter spacing.
The button block link did not inherit the custom letter spacing. This resolves that issue.

Props nidhidhandhukiya, sabernhardt, wesatintellitonic, pooja1210, shailu25.
Fixes #58024.


git-svn-id: https://develop.svn.wordpress.org/trunk@58205 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 10:44:46 +00:00
Tammie Lister
2baabca8bd Twenty Seventeen: Resolves latest comments author font weight difference.
The latest comments author font weight was showing different between editor and front. This fixes that and also removes an extra ruleset. 

Props pitamdey, sabernhardt, shailu25, naeemhaque, darshitrajyaguru97.
Fixes #61180.


git-svn-id: https://develop.svn.wordpress.org/trunk@58204 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 10:29:47 +00:00
Tammie Lister
3afede6179 Twenty Twenty-One: Test failure fix for theme [58202].
Compiling stylesheets to pass tests.

See #52551.


git-svn-id: https://develop.svn.wordpress.org/trunk@58203 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-27 10:26:26 +00:00