Commit Graph

49490 Commits

Author SHA1 Message Date
Sergey Biryukov b6b5ffbf9f Tests: Use `assertSame()` in block support tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Includes renaming a few test classes per the naming conventions.

Reference: [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization Writing PHP Tests: Naming and Organization].

Follow-up to [53076], [53085], [54497], [56046], [56614], [57246], [57491].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58181


git-svn-id: http://core.svn.wordpress.org/trunk@57644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-21 10:33:13 +00:00
spacedmonkey 90de126bd5 Query: Add more context to the split_the_query filter.
Add more context to the `split_the_query` filter by adding two new parameters: '$old_request' and '$clauses'. This enriches the filter with additional information about the SQL query before the query is run, enabling developers to have more context to help decide if a query should be split. 

Props spacedmonkey, shailu25, rcorrales, tillkruess.
Fixes #59514.
Built from https://develop.svn.wordpress.org/trunk@58180


git-svn-id: http://core.svn.wordpress.org/trunk@57643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 21:21:16 +00:00
Tammie Lister 73bb34454d Twenty Twenty-Three: Updates Screenshot.
The screenshot wasn't showing the front view. This now resolves it to fit guidelines. 

Props kafleg, poena, shivashankerbhatta, SergeyBiryukov.
Fixes #56949.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 17:49:17 +00:00
Tammie Lister cd0b1dde3c Bundled Themes: Removes measurement in px for zero and related fixes.
The measurement in px for zero values is not needed. It does this for Twenty Twenty-One, Twenty Ten, Twenty Eleven and Twenty Nineteen. This also adds short-hand-property-no-redudant-values to Twenty Twenty-One's stylelint rules. Included is removing box-shadow prefixed rules before the standard property in Twenty Ten. Finally, it also removes empty spaces at the ends of lines in Twenty Thirteen, Twenty Nineteen and Twenty Twenty. 

Props ankitmaru, SergeyBiryukov, netweb, mukesh27, ryelle, audrasjb, sabernhardt.
Fixes #53874.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 15:14:16 +00:00
Tammie Lister 15c49cc2ca Twenty Sixteen: Fixes mismatch of visual and DOM order of elements.
In the footer the site info and social menu visual order and DOM order was mismatched. This fixes that and resolves the altering.

Props afercia, joedolson, rcreators, sabernhardt.
Fixes #60496.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 14:42:11 +00:00
Sergey Biryukov 22aa7cb48a Tests: Correct a number of invalid `@covers` tags.
This resolves a few warnings when running PHPUnit with the code coverage report:
{{{
"@covers WP_Privacy_Requests_List_Table::get_views" is invalid
"@covers WP_Block_Bindings_Registry::register_block_bindings_source" is invalid
"@covers WP_Block_Patterns_Registry::_register_theme_block_patterns" is invalid
}}}

The two removed `@coversDefaultClass` annotations are redundant, as the class name is already included in the individual `@covers` tags. Removing them allows `@covers ::_register_theme_block_patterns` to work as expected, where `_register_theme_block_patterns` is an standalone function, not a class method.

Follow-up to [54215], [56733], [57373], [57562].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58176


git-svn-id: http://core.svn.wordpress.org/trunk@57639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 14:40:16 +00:00
Sergey Biryukov 1251cb8c5e Coding Standards: Rewrite an empty conditional in `get_post_status()`.
Expand the comment to further clarify the post object check performed.

Follow-up to [58174].

See #59283.
Built from https://develop.svn.wordpress.org/trunk@58175


git-svn-id: http://core.svn.wordpress.org/trunk@57638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 13:44:15 +00:00
youknowriad e1034e15f0 Posts: Ensure get_sample_permalink returns the right permalink for auto-draft posts.
The post editor uses the permalink_template property from the posts REST API to render the post slug input or not. For auto-drafts or newly created posts, this property was not set properly. This PR solves by fixing the get_sample_permalink function used to compute this property.

Props youknowriad, mcsf, antonvlasenko, azaozz, peterwilsoncc, andrewserong, hellofromTonya, spacedmonkey.
Fixes #59283.
Built from https://develop.svn.wordpress.org/trunk@58174


git-svn-id: http://core.svn.wordpress.org/trunk@57637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 09:49:16 +00:00
Peter Wilson 3cdaeae7ab Editor: Fix unit tests for fluid typography CSS.
Fixes a unit test to assert that CSS variables are defined in `:root{}` rather than `body{}`. Fixes a couple of docblocks in the same file.

Follow up to [58171].

Props ramonopoly.
See #61118.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-20 05:24:18 +00:00
Sergey Biryukov e59e190855 Docs: Add a note that the `who` parameter in `WP_User_Query` is deprecated.
Any usage of `'who' => 'authors'` should be updated to use capability queries instead.

Includes documenting the capability query parameters in `wp_dropdown_users()`.

Follow-up to [51943].

Props kkmuffme, swissspidy, SergeyBiryukov.
See #61243.
Built from https://develop.svn.wordpress.org/trunk@58172


git-svn-id: http://core.svn.wordpress.org/trunk@57635 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-19 19:53:19 +00:00
isabel_brison ff2929bf19 Editor: pass fluid typography theme.json settings to `wp_get_typography_font_size_value`.
Updates `wp_get_typography_font_size_value` to accept an array of theme.json settings instead of a boolean derived from global state.

Props ramonopoly, audrasjb.
Fixes #61118.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-18 23:18:15 +00:00
isabel_brison ab8cc6dce3 Editor: add column and row spans to grid children.
Adds support for setting spans using `grid-column` and `grid-row` properties on children of blocks with grid layout.

Props isabel_brison, andrewserong, peterwilsoncc, mukesh27.
Fixes #61111.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-18 20:32:17 +00:00
dmsnell c4ff251f13 Move is_utf8_charset() into functions.php
This caused issues in maintenance mode, and it's not warranted to have
its own module. This will live alongside `_canonical_charset()`, it's
partner function.

Fixes: #61182.
Props: dmsnell, sergeybiryukov, swisspiddy.
Follow-up to: [58148].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-18 18:22:14 +00:00
Sergey Biryukov c649fd77bd Shortcodes: Remove redundant variable type check in `get_post_galleries()`.
`shortcode_parse_atts()` always returns an array as of [57597], so the check is no longer needed.

Follow-up to [40070], [57597].

Props david.binda, swissspidy, oglekler.
Fixes #60581.
Built from https://develop.svn.wordpress.org/trunk@58168


git-svn-id: http://core.svn.wordpress.org/trunk@57631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-18 15:21:15 +00:00
joedolson 4b51c9f5d5 Administration: A11y: Hide thickbox close icon from screen readers.
Add `aria-hidden="true"` to the dashicon symbol used as the `close` icon in Thickbox modals. Prevent the icon from being read as a replacement character by screen readers.

Props stevejonesdev, sabernhardt, joedolson.
See #61028.
Built from https://develop.svn.wordpress.org/trunk@58167


git-svn-id: http://core.svn.wordpress.org/trunk@57630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-17 20:30:15 +00:00
desrosj 3ac0cb9fce Build/Test Tools: Convert GitHub action workflows into reusable ones.
With a few exceptions, GitHub Actions workflows run using the version of the workflow file present in the commit SHA or Git ref for the triggering event. This is useful for maintaining different versions of a workflow file.

In the case of WordPress where there are currently 25+ branches that could potentially receive a security fix, it creates a huge maintenance burden. When 3rd party actions are updated or features are deprecated on GitHub Actions, the required changes need to be backported to all of those branches. This takes considerable time and effort.

This change converts Core’s workflow files to reusable ones. This allows the same workflow to be used for all (or most) branches, allowing the described maintenance updates to be made once in `trunk`.

To keep track of which files are reusable vs. those that are responsible for holding the strategy matrix for that branch, reusable workflows are now prefixed with `reusable-`.

Props johnbillion, swissspidy, jorbin, desrosj.
Fixes #61213.
Built from https://develop.svn.wordpress.org/trunk@58165


git-svn-id: http://core.svn.wordpress.org/trunk@57628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-17 17:43:13 +00:00
Sergey Biryukov 8c878056d5 Tests: Remove trailing characters from `@ticket` annotations.
Follow-up to [44693], [46209], [54230], [54733], [55151].

Props jonsurrell.
See #61238.
Built from https://develop.svn.wordpress.org/trunk@58164


git-svn-id: http://core.svn.wordpress.org/trunk@57627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-17 13:13:16 +00:00
Pascal Birchler 802fa72d10 Script Loader: Update failing test after [58162].
See #60962.
Built from https://develop.svn.wordpress.org/trunk@58163


git-svn-id: http://core.svn.wordpress.org/trunk@57626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-16 17:26:11 +00:00
Pascal Birchler 4a4b9a6493 Script Loader: Disable `injectPolyfill` flag in webpack config.
This is a follow-up to [57981] to ensure that `wp-polyfill` is no longer automatically added as a dependency to package scripts. This avoids unnecessarily loading the polyfill script in places such as the block editor.

See #60962.
Built from https://develop.svn.wordpress.org/trunk@58162


git-svn-id: http://core.svn.wordpress.org/trunk@57625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-16 16:44:11 +00:00
Aaron Jorbin a91012a34b Plugins: Assign role of button to links that act as buttons.
Clicking on these links initiates an action, so they are more semantically a button rather than a link. Keeping them as an anchor in html allows any existing JS that is targeted to these items to continue to function. The addition of the role helps assistive technology to know that they should treat this as a button.

Props stevejonesdev, sabernhardt, vipulgupta003, rcreators, joedolson.
Fixes #61011.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-16 15:31:12 +00:00
Sergey Biryukov fdbe1f11a5 Tests: Use `assertSame()` in `block_has_support()` tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [56382].

See #60706.
Built from https://develop.svn.wordpress.org/trunk@58160


git-svn-id: http://core.svn.wordpress.org/trunk@57623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-16 15:15:13 +00:00
dmsnell a3b5efe883 Improve legibility of JSON-encoded Interactivity API store data.
The Interactivity API has been rendering client data in a SCRIPT element with the
type `application/json` so that it's not executed as a script, but is available
to one. The data runs through `wp_json_encode()` and is encoded with some flags
to ensure that potentially-dangerous characters are escaped.

However, this can lead to some challenges. Eagerly escaping when not necessary
can make the data difficult to comprehend when reading the output HTML. For example,
all non-ASCII Unicode characters are escaped with their code point equivalent.
This results in `\ud83c\udd70` instead of `🅰`.

In this patch, the flags for JSON encoding are refined to ensure what's necessary
while relaxing other rules (leaving in those Unicode characters if the blog charset
is UTF-8). This makes for Interactivity API data that's quicker as a human reader
to decipher and diagnose.

In summary:

 - This data is JSON encoded and printed in a `<script type="application/json">` tag.

 - If we ensure that `<` is never printed inside the data, it should be impossible to
   break out of the script tag and the browser treats everything as the element's `textContent`.

 - All other escaping becomes unnecessary at that point, including unicode escaping 
   if the page uses the UTF-8 charset (the same encoding as JSON).

See https://github.com/WordPress/wordpress-develop/pull/6433#pullrequestreview-2043218338

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

Fixes: #61170
Follow-up to: [57563].
Props: bjorsch, dmsnell, jonsurrell, sabernhardt, westonruter.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-15 17:42:10 +00:00
desrosj ad15b88403 Build/Test Tools: Remove `version` from `docker-compose.yml`.
The `version` property throws a warning when working with the local Docker environment. According to the Docker Compose spec, the property only remains for backward compatibility and should be removed.

Props narenin, mukesh27, swissspidy.
Fixes #61101.
Built from https://develop.svn.wordpress.org/trunk@58157


git-svn-id: http://core.svn.wordpress.org/trunk@57620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-15 15:35:10 +00:00
Pascal Birchler 3c38870487 Docs: Improve docblock for `WP_REST_Template_Revisions_Controller::get_parent()`.
Props rockfire.
See #60699, #61113.
Built from https://develop.svn.wordpress.org/trunk@58156


git-svn-id: http://core.svn.wordpress.org/trunk@57619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-15 11:18:12 +00:00
Pascal Birchler c4dc645821 Docs: Fix incorrect docblock for `WP_Translation_Controller::translate_plural`.
Props szepeviktor.
See #60699.
Built from https://develop.svn.wordpress.org/trunk@58155


git-svn-id: http://core.svn.wordpress.org/trunk@57618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-15 09:07:11 +00:00
Sergey Biryukov f695d7f8b9 Tests: Use `assertSame()` in `absint()` tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Includes correcting a few erroneously duplicated test cases to match their intended purpose.

Follow-up to [57724].

See #60706.
Built from https://develop.svn.wordpress.org/trunk@58150


git-svn-id: http://core.svn.wordpress.org/trunk@57615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-15 01:09:10 +00:00
audrasjb d4ef1a6cd5 Administration: Add `primary` class to the FTP credentials modal submit button.
This helps differentiate the two buttons available in the FTP credentials modal by setting a `primary` class to the submit button.

Props mapk, curdin, audrasjb, shailu25.
Fixes #37647.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 22:17:13 +00:00
dmsnell 06a25caf23 Quick-fix: Normalize UTF-8 charset slug detection.
In the merge of [58417] the new file was missed. This commit adds the missing required file.

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

Fixes #61182.
Follow-up to [58147].
Props dmsnell, jonsurrell.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 18:07:07 +00:00
dmsnell d30cd41ed4 Normalize UTF-8 charset slug detection.
There are several exist places in Core that attempt to detect if a blog charset
is UTF-8. Each place attempts to perform the same check, except the logic is
spread throughout and there's no single method provided to make this
determination in a consistent way. The `_canonical_charset()` method exists,
but is marked private for use.

In this patch the new `unicode` module provides `is_utf8_charset()` as a method
taking an optional charset slug and indicating if it represents UTF-8,
examining all of the allowable variants of that slug. Associated code is
updated to use this new function, including `_canonical_charset()`. If no slug
is provided, it will look up the current `get_option( 'blog_charset' )`.

Finally, the test functions governing `_canonical_charset()` have been
rewritten as a single test with a data provider instead of as separate test
functions.

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

Fixes #61182.
Props dmsnell, jonsurrell.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 18:05:11 +00:00
joedolson 79045fa10e Administration: A11y: Replace placeholders with visible labels.
Add visible labels to inputs that are using placeholder attributes as a substitute for visible labeling.

Labels added or made visible on the customizer theme search, customizer widget search, customizer menu item search, customizer new page UI, the search plugins screens, the media search screens, and the classic editor link inserter.

Props afercia, joedolson, rcreators, sabernhardt.
See #40331.
Built from https://develop.svn.wordpress.org/trunk@58146


git-svn-id: http://core.svn.wordpress.org/trunk@57611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 16:49:09 +00:00
Sergey Biryukov f57368d7ed Users: Reuse an existing string in the confirmation for unsaved changes in user profile.
Follow-up to [58137].

Fixes #40493.
Built from https://develop.svn.wordpress.org/trunk@58145


git-svn-id: http://core.svn.wordpress.org/trunk@57610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 16:14:11 +00:00
desrosj c2628e70d8 Build/Test Tools: Don’t upload HTML reports to Codecov.
When generating a human readable code coverage report in HTML format, the Codecov action used to fail silently. An error is now being returned, resulting in a workflow failure.

This adds a skip condition to the appropriate steps so the coverage report is only uploaded when a `clover` format is generated.

See #60733.
Built from https://develop.svn.wordpress.org/trunk@58144


git-svn-id: http://core.svn.wordpress.org/trunk@57609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-14 15:20:13 +00:00
Weston Ruter 9702c2e265 Embeds: Enable lazy-loading of post embeds and fix keyboard a11y for hidden iframes.
Chrome unreliably loads a lazy-loaded iframe when it is hidden using `clip: rect(1px, 1px, 1px, 1px)`. Instead of using `clip`, a lazy-loaded iframe can also be hidden with `visibility:hidden` which results in it loading not only in Chrome but all other browsers. With this change applied, the hard-coded check to prevent lazy-loading post embeds is now removed. An added benefit to using `visibility:hidden` is that the entire iframe in this case is not interactable, meaning that users navigating the document with the keyboard will not unexpectedly encounter tab stops inside of the hidden iframe, as can happen now with `clip` when the JS fails to reveal the loaded iframe. Note also that the `clip` property is deprecated.

Lastly, when such a post embed iframe is rendered in an RSS feed, the `style` attribute is now removed using the HTML Tag Processor as opposed to using string replacement.

Fixes #58773.
Props westonruter, joemcgill, swissspidy, joedolson, adamsilverstein.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 22:39:16 +00:00
Tammie Lister 922c74ac70 Twenty Twenty-One: Fixes primary menu disappearing.
The primary menu was disappearing at 481px. This adjusts to resolve this. It was shown when adjust the browser window not in responsive design mode.

Props stephenbrook, audrasjb, mukesh27, sabernhardt, poena, kristenfisher427, siliconforks, jwgoedert, joedolson.
Fixes #52354.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 16:43:08 +00:00
Aaron Jorbin e224be969e Tests: Add comment to explain when e2e test for gutenberg is skipped
Follow-up to [58046].

See #60971.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 16:40:11 +00:00
Sergey Biryukov f29b58aa91 Docs: Make Settings API documentation link clickable in `wp-admin/options.php`.
The link is a part of the deprecation notice displayed when saving an unregistered setting.

Follow-up to [13646], [13785], [14070], [32116], [34315], [45674].

Props timse201, sabernhardt, amitraj2203, khokansardar, SergeyBiryukov.
Fixes #61199.
Built from https://develop.svn.wordpress.org/trunk@58140


git-svn-id: http://core.svn.wordpress.org/trunk@57605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 16:26:10 +00:00
John Blackbourn 87ba206026 Bootstrap/Load: Place the debugging output for automatic plugin and theme updates behind a debugging flag.
This change means this debugging output will only be shown when both the `WP_DEBUG` and `WP_DEBUG_LOG` constants are defined as true.

Props costdev, afragen, swissspidy

Fixes #58281

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


git-svn-id: http://core.svn.wordpress.org/trunk@57604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 15:24:11 +00:00
John Blackbourn a59eb9d39c Bootstrap/Load: Update the domain parsing when initialising the cookie domain on Multisite.
This ensures the cookie domain is set to the bare domain without a port number, if one is present.

Props spacedmonkey

Fixes #21077

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


git-svn-id: http://core.svn.wordpress.org/trunk@57603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-13 13:34:11 +00:00
joedolson 39c3bec9f3 Users: Add JS confirmation if user profile has unsaved changes.
Add a confirmation dialog when users navigate away from the user profile screen if they have unsaved changes to prevent data loss.

Props ashokrane, karlijnbk, diedeexterkate, jwgoedert, joedolson, swissspidy, afercia.
Fixes #40493.
Built from https://develop.svn.wordpress.org/trunk@58137


git-svn-id: http://core.svn.wordpress.org/trunk@57602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-12 18:45:14 +00:00
Sergey Biryukov fd4159ed87 Tests: Move `add_settings_section()` tests to a more appropriate place.
Follow-up to [54247].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58136


git-svn-id: http://core.svn.wordpress.org/trunk@57601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-12 15:56:09 +00:00
Tammie Lister f38ec10f21 Twenty Seventeen: Resolves Header Image Quality Issue
The heading image had quality issues on iOS Safari in portrait and landscape modes. This resolves it through adding 200cv for smaller screens so less than full size.

Props poena, richardevs, laurelfulford, davidakennedy, joemcgill, SergeyBiryukov, ianbelanger, sabernhardt, shailu25, robertghetau.
Fixes #39253.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-12 09:29:09 +00:00
Peter Wilson 048c5ba580 Options, Meta APIs: Prime transient options prior to use.
Reduce the number of queries getting and setting transients on sites without a persistent cache. 

Transients are stored in two options: one each for the transient value and timeout. Priming the cache reduces the database queries for getting a transient from two to one.

Props peterwilsoncc, swissspidy.
Fixes #61193.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-11 23:53:15 +00:00
joedolson 77073cce6b Toolbar: Accessibility: Remove adminbar skiplink focus fix.
Based on the current browser support policies and expectations, this is no longer needed. There are almost no browsers in use where this is still in use. The same fix was removed from core themes in #54421.

Props joedolson, sabernhardt, shailu25.
Fixes #60479.
Built from https://develop.svn.wordpress.org/trunk@58133


git-svn-id: http://core.svn.wordpress.org/trunk@57598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-11 18:28:08 +00:00
Sergey Biryukov 13f85f2cd2 Docs: Update a HelpHub link on Edit Site screen to avoid unnecessary redirection.
Follow-up to [17045], [20713], [41065], [45674], [55412], [57854], [58131].

Props shailu25.
See #60732, #60699.
Built from https://develop.svn.wordpress.org/trunk@58132


git-svn-id: http://core.svn.wordpress.org/trunk@57597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-11 14:47:06 +00:00
Sergey Biryukov 447840fc0d Docs: Use more specific URLs for a few Network Admin HelpHub links.
This better reflects the originally intended destination of these links.

Follow-up to [57854].

See #60732, #60699.
Built from https://develop.svn.wordpress.org/trunk@58131


git-svn-id: http://core.svn.wordpress.org/trunk@57596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-11 14:38:13 +00:00
Pascal Birchler 960c3631e4 REST API: Ensure attachments are uploaded to the post's year/month folder.
If organizing uploads into month- and year-based folders, uploading an attachment to an existing post should store the file in `wp-content/uploads/<year>/<month>` based on the post's publish date. This is in line with the behavior in classic editor / the media modal.

Props swissspidy, adamsilverstein, timothyblynjacobs, skithund, sergeybiryukov, patricia70.
Fixes #61189.
Built from https://develop.svn.wordpress.org/trunk@58130


git-svn-id: http://core.svn.wordpress.org/trunk@57595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 18:59:11 +00:00
Sergey Biryukov 8839c33306 Posts, Post Types: Use a consistent plural form of “status” in variable names.
Follow-up to [5575], [6796], [6993], [7638], [12162], [12719], [15578], [16652], [31046], [34515], [49472].

Props Presskopp, sabernhardt, manfcarlo, SergeyBiryukov.
Fixes #58134.
Built from https://develop.svn.wordpress.org/trunk@58129


git-svn-id: http://core.svn.wordpress.org/trunk@57594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 18:09:15 +00:00
John Blackbourn 1e8d651f23 Upgrade/Install: Automatically roll back to the previous version when an automatic plugin update results in a fatal error on the front end of the site.
This builds on the temporary backup system introduced in 6.3 to allow automatic updates to benefit from fatal error protection. A loopback request is performed to the home page of the site and the plugin is rolled back to its backed up version if a fatal error is observed.

For debugging and observability during beta, this change includes several calls to `error_log()` during the upgrade and rollback stages. These calls can be removed or placed behind a flag once we're ready for RC1.

Props costdev, johnbillion, mukesh27, afragen, audrasjb, justlevine, kirasong, peterwilsoncc

Fixes #58281

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


git-svn-id: http://core.svn.wordpress.org/trunk@57593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 11:48:15 +00:00
gziolo 6edbf28fec Interactivity API: Cannot be used from wp-admin
Interactivity API has hooks that run on the frontend, but not in wp-admin. This means that interactivity data was not printed to the HTML and the interactivity Script Modules were not registered.

Fixes #61087.
Props jonsurrell, cbravobernal, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 09:13:05 +00:00
gziolo 1953f53b01 Script Modules: Hooks are not registered in wp-admin
Script Modules cannot be used in wp-admin. The necessary hooks are registered on wp_head or wp_footer, but should also be registered for the admin variants so that modules can be used from wp-admin.

Fixes #61086.
Props jonsurrell, cbravobernal, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-10 09:09:17 +00:00