49374 Commits

Author SHA1 Message Date
John Blackbourn
3f6ea2a829 Networks and Sites: Add a clearer warning message before deleting a site from a network.
Props johnjamesjacoby, kebbet, cafenoirdesign, Mista-Flo, johnbillion

Fixes #51358


git-svn-id: https://develop.svn.wordpress.org/trunk@58098 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 22:10:44 +00:00
John Blackbourn
7750458133 Bootstrap/Load: Add support for custom ports in multisite site addresses.
This allows a Multisite network to use an address that includes a port name, such as `example.com:1234`, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at `localhost:8889`.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes #21077, #52088

git-svn-id: https://develop.svn.wordpress.org/trunk@58097 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 19:23:31 +00:00
Sergey Biryukov
4a256357e9 Feeds: Add an optional $post parameter to get_the_title_rss().
This allows the function to be used outside of the loop and brings parity with `get_the_title()`.

Follow-up to [1976], [3314], [21735].

Props khokansardar, oglekler.
Fixes #61139.

git-svn-id: https://develop.svn.wordpress.org/trunk@58096 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 19:09:57 +00:00
John Blackbourn
121e5d69d7 I18N: Pass the $locale variable to the load_translation_file filter.
This avoids the need for the locale to be recalculated by code that hooks into this filter.

Props swissspidy, mukesh27, johnbillion

Fixes #61108


git-svn-id: https://develop.svn.wordpress.org/trunk@58095 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 17:25:54 +00:00
John Blackbourn
9d6cd2dcb3 Site Health: Improve the internationalisation of strings used in disk space health checks.
This allows the disk space values to be changed in the future without requiring a string change.

Props afragen, audrasjb, johnbillion

Fixes #61115


git-svn-id: https://develop.svn.wordpress.org/trunk@58094 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-04 17:21:26 +00:00
Sergey Biryukov
a412372806 Login and Registration: Check that post_password is a string in wp-login.php.
This prevents a fatal error if an array is passed instead.

Follow-up to [19925], [34909], [58023].

Props dd32, swissspidy.
Fixes #61136.

git-svn-id: https://develop.svn.wordpress.org/trunk@58093 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-03 14:30:56 +00:00
Jonathan Desrosiers
8175698ba5 Build/Test Tools: Remind contributors to include a Trac ticket link.
Contributing to WordPress using `wordpress-develop` on GitHub is a useful way collaborate, test, and review suggested changes to the code base. One of the required criteria, though, is including a link to a corresponding Trac ticket. This ensures the PR and associated activity is listed on the Trac ticket, which serves as the source of truth.

It’s easy to forget this and newer contributors aren’t always aware of this requirement. This adds a GitHub Actions job that will add a comment as a reminder when no Trac ticket is included.

Is the waiting really ended? Two thousand years.

Props anamarijapapic, peterwilsoncc.
Fixes #60129.

git-svn-id: https://develop.svn.wordpress.org/trunk@58092 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-03 12:37:05 +00:00
Pascal Birchler
1911cbabb2 Embeds: Add Bluesky as a trusted oEmbed provider.
Props swissspidy, thelovekesh, peterwilsoncc, bnewboldbsky.
Fixes #61020.

git-svn-id: https://develop.svn.wordpress.org/trunk@58091 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-03 07:56:16 +00:00
Isabel Brison
5207502ecf Editor: Fix coding standards and move deprecated function to correct file.
Follow-up to [58074], formats docblocks correctly and moves `wp_render_elements_support` to the deprecated file.

Props aaronrobertshaw, isabel_brison, mukesh27, spacedmonkey.
See #60681.


git-svn-id: https://develop.svn.wordpress.org/trunk@58090 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-03 05:23:42 +00:00
Isabel Brison
6b328e6915 Editor: add Style Engine support for nested CSS rules.
Adds support for passing a `$rules_group` string to wp_style_engine_get_stylesheet_from_css_rules(), so rules can be nested under a media query, layer or other rule.

Props isabel_brison, ramonopoly.
Fixes #61099.


git-svn-id: https://develop.svn.wordpress.org/trunk@58089 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-03 04:45:20 +00:00
John Blackbourn
65b4b6ad28 Docs: Revert the documentation change to WP_Block_Parser::parse() made in [58084].
This file needs to be synced from the Gutenberg repository.

See #60699

git-svn-id: https://develop.svn.wordpress.org/trunk@58085 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 20:07:46 +00:00
John Blackbourn
f6a6e68d3c Docs: Document the array shapes for parsed blocks, template part areas, and template types.
See #60699

git-svn-id: https://develop.svn.wordpress.org/trunk@58084 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 19:52:42 +00:00
Sergey Biryukov
e147f6d67b Docs: Add missing documentation for various upgrade/install class methods.
Follow-up to [13602], [13686], [14879], [25806], [28495], [32655], [48661], [53952].

Props yagniksangani, audrasjb, SergeyBiryukov.
Fixes #61124.

git-svn-id: https://develop.svn.wordpress.org/trunk@58082 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 17:18:53 +00:00
Aaron Jorbin
530b73ca94 Plugins: Show an admin notice on successful activation.
Plugin activation on the Plugins > Add New screen is performed using AJAX, no longer performing redirects. This means that users will not see a newly activated plugin's menu items, admin notices, or other UI elements until the user refreshes or navigates to another screen. Without adequate messaging and direction, users may be unsure of what to do next.

This shows an admin notice when a plugin is activated from its plugin card or modal, informing the user that the plugin was activated, and that some changes may not occur until they refresh the page.

Follow-up to [57545].

Props costdev, jorbin, jeherve, flixos90, joedolson, ironprogrammer, audrasjb, alanfuller, kevinwhoffman, devsahadat, afragen, adrianduffell, azaozz, jason_the_adams, JeffPaul, webdevmattcrom, DrewAPicture, justlevine, stevejonesdev, benlk, roytanck.
Fixes #60992. See #22316.


git-svn-id: https://develop.svn.wordpress.org/trunk@58081 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 17:03:36 +00:00
Aaron Jorbin
91c546d47a REST API: Return empty object when no fallback templates are found (wp/v2/templates/lookup)
This prevents a number of php notices that are surfaced due to the endpoint being called on load of the post editor even when there are no templates.

Props grantmkin, CookiesForDevo, britner, wildworks, jorbin.
Fixes #60909.


git-svn-id: https://develop.svn.wordpress.org/trunk@58079 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 16:01:29 +00:00
Pascal Birchler
73b7808db1 Build/Test Tools: Fix performance tests logging script after [58076].
Removes some unintended debug cruft, whoops!

See #59900.

git-svn-id: https://develop.svn.wordpress.org/trunk@58077 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 14:40:30 +00:00
Pascal Birchler
53b75a10fc Build/Test Tools: Overhaul performance tests to improve stability and cover more scenarios.
Simplifies the tests setup by leveraging a test matrix, improving maintenance and making it much easier to test more scenarios. With this change, tests are now also run with an external object cache (Memcached). Additional information such as memory usage and the number of database queries is now collected as well.

Improves test setup and cleanup by disabling external HTTP requests and cron for the tests, as well as deleting expired transients and flushing the cache in-between. This should aid the test stability.

When testing the previous commit / target branch, this now leverages the already built artifact from the build process workflow. Raw test results are now also uploaded as artifacts to aid debugging.

Props swissspidy, adamsilverstein, joemcgill, mukesh27, desrosj, youknowriad, flixos90.
Fixes #59900

git-svn-id: https://develop.svn.wordpress.org/trunk@58076 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 13:57:49 +00:00
John Blackbourn
f1724c73a4 Docs: Various docblock improvements.
See #60699


git-svn-id: https://develop.svn.wordpress.org/trunk@58075 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 13:17:45 +00:00
Isabel Brison
cc3055e5c4 Editor: Merge element style and classname generation to single filter.
Fixes element classnames not being output when block attributes are filtered with `render_block_data`.

Props aaronrobertshaw, isabel_brison, jorbin.
Fixes #60681.



git-svn-id: https://develop.svn.wordpress.org/trunk@58074 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-02 06:59:30 +00:00
John Blackbourn
ec1110c719 Docs: Various docblock corrections.
See #60699


git-svn-id: https://develop.svn.wordpress.org/trunk@58073 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-01 23:59:03 +00:00
Dennis Snell
a8d5879867 HTML API: Fix context reset in html5lib test suite.
The html5lib-tests suite parses tests from a number of files with a specific
data format. It uses a dataProvider in a loop that yields test information.
This relies on some variables being reset on each iteration. The context
element has not properly reset on each iteration.

The test specification describes the context element as follows:
a9f44960a9/tree-construction/README.md

> Then there *may* be a line that says "#document-fragment", which must be
> followed by a newline (LF), followed by a string of characters that indicates
> the context element, followed by a newline (LF). If the string of characters
> starts with "svg ", the context element is in the SVG namespace and the
> substring after "svg " is the local name. If the string of characters starts
> with "math ", the context element is in the MathML namespace and the
> substring after "math " is the local name. Otherwise, the context element is
> in the HTML namespace and the string is the local name. If this line is
> present the "#data" must be parsed using the HTML fragment parsing algorithm
> with the context element as context.

Without the proper reset of this value, a single context element would change
subsequent tests, breaking the test suite.

This patch adds the reset to ensure that the test suite works properly.

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

Fixes #61102.
Props costdev, dmsnell, jonsurrell.


git-svn-id: https://develop.svn.wordpress.org/trunk@58072 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-01 23:43:11 +00:00
John Blackbourn
aca5616afd Docs: Correct some docblock indentation.
See #60699


git-svn-id: https://develop.svn.wordpress.org/trunk@58071 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-01 23:42:24 +00:00
Sergey Biryukov
ebc66bb9a1 Tests: Use assertSame() in wp_validate_redirect() 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 [36444].

Props costdev.
See #60706.

git-svn-id: https://develop.svn.wordpress.org/trunk@58070 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-01 18:54:36 +00:00
Pascal Birchler
2f2dbbf246 General: Remove any usage of wp_reset_vars().
The way `wp_reset_vars()` sets global variables based on `$_POST` and `$_GET` values makes code hard to understand and maintain. It also makes it easy to forget to sanitize input.

This change removes the few places where `wp_reset_vars()` is used in the admin to explicitly use `$_REQUEST` and sanitize any input.

Props swissspidy, audrasjb, davideferre, killua99, weijland, voldemortensen.
Fixes #38073.

git-svn-id: https://develop.svn.wordpress.org/trunk@58069 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-01 17:59:05 +00:00
Pascal Birchler
816ff687eb Script Loader: Ensure wp_localize_script() works when called early.
Before, `wp_localize_script()` did not work when the `$wp_scripts` global was not already set (for example because of a script registration happening elsewhere) and even emitted a warning in that case. Due to side effects such as block registration early in the load process, this usually never happened. However, the absence of these side effects in 6.5 caused the `wp_localize_script()` to no longer work in places such as the `login_enqueue_scripts`.

By calling `wp_scripts()` in `wp_localize_script()`, the `$wp_scripts` global is automatically set if needed, restoring previous behavior. Adds both a PHP unit test and an e2e test to verify this use case. Hat tip: jorbin.

Happy birthday, Aaron!

Props salcode, aslamdoctor, jorbin, swissspidy.
Fixes #60862.

git-svn-id: https://develop.svn.wordpress.org/trunk@58068 602fd350-edb4-49c9-b593-d223f7449a82
2024-05-01 15:40:02 +00:00
Sergey Biryukov
6974b994de Coding Standards: Remove extra conditional in get_plugins().
Follow-up to [1894], [5152], [55990].

Props abhijitrakas, mukesh27.
Fixes #44853.

git-svn-id: https://develop.svn.wordpress.org/trunk@58067 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 16:43:09 +00:00
Pascal Birchler
f9e5c6fb22 REST API: allow overriding excerpt length.
This can be used by the excerpt block in the editor to change the excerpt length without filtering `excerpt_length` in a conflicting way. This enhancement still needs a corresponding change on the Gutenberg side.

Props swissspidy, antonvlasenko, mukesh27, azaozz, andraganescu, timothyblynjacobs.
Fixes #59043.

git-svn-id: https://develop.svn.wordpress.org/trunk@58065 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 09:31:41 +00:00
Pascal Birchler
b2842988f1 I18N: Fix plural usage in wp_print_admin_notice_templates().
Moves the translatable strings from the JS template defined in PHP to the `updates.js` script, where `_n()` can be used as recommended.

Props ideag, SergeyBiryukov, daledupreez, audrasjb, ocean90, swissspidy.
Fixes #37287.

git-svn-id: https://develop.svn.wordpress.org/trunk@58064 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 08:53:51 +00:00
Pascal Birchler
c2a00e1669 Embeds: Remove empty CSS blocks from wp-embed-template.css.
Originally added in [34903], these empty CSS blocks serve no purpose.

Props ravipatel, sabernhardt.
Fixes #61085.

git-svn-id: https://develop.svn.wordpress.org/trunk@58063 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 08:42:10 +00:00
Pascal Birchler
2f0d2dec4c I18N: Actually add all the files for [58061], not just the test fixtures.
Improve support for using only PHP translation files.

This builds on top of the PHP translation file support added in WordPress 6.5, improving the behavior for projects using solely `.l10n.php` translation files and no `.mo.` and `.po` files.

Updates `wp_get_installed_translations()`, which is used when updating language packs and when uninstalling plugins/themes (to remove the translations again), to look for PHP translation files and read metadata from them. Additionally, the file lookup is now cached thanks to using `WP_Textdomain_Registry`.

Updates `Language_Pack_Upgrader::check_package()` to allow language packs that only contain PHP translation files. While WordPress.org continues to serve `.mo` and `.po` files, third-party services might want to only use the PHP file format.

See #60554.

git-svn-id: https://develop.svn.wordpress.org/trunk@58062 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 08:37:25 +00:00
Pascal Birchler
22796f5869 I18N: Improve support for using only PHP translation files.
This builds on top of the PHP translation file support added in WordPress 6.5, improving the behavior for projects using solely `.l10n.php` translation files and no `.mo.` and `.po` files.

Updates `wp_get_installed_translations()`, which is used when updating language packs and when uninstalling plugins/themes (to remove the translations again), to look for PHP translation files and read metadata from them. Additionally, the file lookup is now cached thanks to using `WP_Textdomain_Registry`.

Updates `Language_Pack_Upgrader::check_package()` to allow language packs that only contain PHP translation files. While WordPress.org continues to serve `.mo` and `.po` files, third-party services might want to only use the PHP file format.

Props swissspidy.
Fixes #60554.

git-svn-id: https://develop.svn.wordpress.org/trunk@58061 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 08:34:50 +00:00
Jb Audras
6a9e0d3c44 Help/About: Reduce About screens heading sizes on smaller viewports.
[56950] reduced the heading size of About screen headings, but that did not edit the size for smaller viewports.
This changeset fixes this issue, and also updates the larger fluid font size (960px - 1200px).

Follow-up to [56950].

Props dhruvang21, sabernhardt, khokansardar.
Fixes #61030.




git-svn-id: https://develop.svn.wordpress.org/trunk@58060 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 06:57:20 +00:00
Isabel Brison
ca58a0583e Editor: add ticket number to test after string update.
Follow-up to [58028]; adds ticket number to the updated test.

Props jorbin, isabel_brison.
See #60981.


git-svn-id: https://develop.svn.wordpress.org/trunk@58059 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-30 03:58:59 +00:00
Jb Audras
204a1bbf4e Editor: Add item_updated label for wp_template and wp_template_part post types.
This adds the `item_updated` label to Template and Template Part post types registration. This prevents from displaying the default `post updated` label.
See https://github.com/WordPress/gutenberg/pull/61146 

Follow-up to [52062], [51003].

Props ntsekouras, ellatrix.
Fixes #61095.




git-svn-id: https://develop.svn.wordpress.org/trunk@58055 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-29 22:30:20 +00:00
Sergey Biryukov
d1e0a6241d Tests: Use assertSame() in WP_Comment::get_instance() 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 [38381].

Props costdev.
See #60706.

git-svn-id: https://develop.svn.wordpress.org/trunk@58054 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-29 15:38:39 +00:00
Tammie Lister
e9bea6d9bb Twenty Fourteen: Adds base font size to pullquote block.
The pullquote block needed the base font size adding back in. This also adds in support for appearance settings for weight and style in addition to the original ticket. This fixes a previous commit which changed the default font size of pullquote blocks, quote blocks and blockquotes.

Props sabernhardt.
Fixes #61034.


git-svn-id: https://develop.svn.wordpress.org/trunk@58053 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-29 12:15:42 +00:00
Sergey Biryukov
66b5d25be2 Tests: Use assertSame() in wp_handle_comment_submission() 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 [38778], [46829].

Props costdev.
See #60706.

git-svn-id: https://develop.svn.wordpress.org/trunk@58052 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-28 18:55:25 +00:00
Sergey Biryukov
179789fab3 Tests: Add more specific messages for a custom assertion in WP_Test_REST_TestCase.
All assertions in PHPUnit have a `$message` parameter. Setting this parameter allows to distinguish which assertion is failing when a test runs multiple assertions, making debugging of the tests easier.

Follow-up to [34928], [51478], [58039].

See #60426.

git-svn-id: https://develop.svn.wordpress.org/trunk@58051 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-26 15:49:19 +00:00
Adam Silverstein
2074392c5c Media: fix potential error in class-avif-info.php::get_item_features().
Import upstream fix from libavifinfo, correcting a potential fatal error.

Props yguyon.
Fixes #60980.



git-svn-id: https://develop.svn.wordpress.org/trunk@58049 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-26 15:00:03 +00:00
Dennis Snell
7de15eb4b0 HTML API: Tests should use expectedIncorrectUsage phpunit annotation
Some tests in the HTML API test suite use `setExpectedIncorrectUsage`.
The annotation `@expectedIncorrectUsage` can be used to simplify the tests.

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

Fixes #61080.
Props dmsnell, jonsurrell.


git-svn-id: https://develop.svn.wordpress.org/trunk@58048 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-26 13:51:06 +00:00
bernhard-reiter
81882ddcc0 Tests: Skip Gutenberg plugin activation test on older WP versions.
The purpose of `tests/e2e/specs/gutenberg-plugin.test.js` is to ensure that running the Gutenberg plugin (stable version) on a WordPress `trunk` install doesn't produce any fatals.

The test was introduced in [54913], i.e. it has been around since WP 6.2. It makes sense to have it present on older branches, as the Gutenberg plugin not only supports `trunk`, but also the current stable version of WordPress (i.e. currently 6.5), and one version below (6.4). However, it is not expected to work on any earlier versions beyond that; in practice, it has produced errors on some of those.

This changeset checks the REST API response from the plugin activation request. If it returns an error with error code `plugin_wp_incompatible`, it skips the test.

Props jorbin, johnbillion, swissspidy.
Fixes #60971.

git-svn-id: https://develop.svn.wordpress.org/trunk@58046 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-26 10:29:26 +00:00
Sergey Biryukov
0c99bcfe86 Docs: Remove extra commas in WP_User_Query::prepare_query() DocBlock.
Follow-up to [52226], [58032].

Props nareshbheda, mukesh27.
Fixes #61076.

git-svn-id: https://develop.svn.wordpress.org/trunk@58045 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-25 10:47:19 +00:00
Sergey Biryukov
7159243c09 Tests: Use assertSame() in WP_oEmbed_Controller 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 [41047].

Props costdev.
See #60706.

git-svn-id: https://develop.svn.wordpress.org/trunk@58044 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-24 22:03:06 +00:00
bernhard-reiter
d898a25d1a Block Hooks: Fix @since and deprecated versions.
Two `@since` PHPDoc fields, and the version argument to one `_deprecated_argument()` incorrectly stated 6.5.1 as the relevant WordPress version where a change was introduced.

This changeset fixes them by setting them to 6.5.3 instead.

Follow-up to [57919].
See #60754.

git-svn-id: https://develop.svn.wordpress.org/trunk@58042 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-24 12:09:30 +00:00
Dennis Snell
10c3dd9cfb HTML API: Fix detection of single-length funky comments.
Since [60428] the Tag Processor has been misidentifying single-character
funky comments. It has been asserting that the full token-length for a
funky comment must be at least three characters after the opening (e.g.
`</1>`), but it has been starting to look for the closing `>` after
those same three characters. This means that it has been skipping the
actual close of these funky comments and swallowing up the next syntax
until it finds a `>`, often consuming the next tag in the process.

This patch fixes the detector and restores finding the following token.

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

Follow-up to [60428].
Fixes #60170.
Props dmsnell, gziolo, jonsurrell.


git-svn-id: https://develop.svn.wordpress.org/trunk@58040 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-24 07:43:02 +00:00
Sergey Biryukov
25b9f8b156 Tests: Add a $message parameter for a custom assertion in WP_Test_REST_TestCase.
All assertions in PHPUnit have a `$message` parameter. Setting this parameter allows to distinguish which assertion is failing when a test runs multiple assertions, making debugging of the tests easier.

This optional parameter is now added for `WP_Test_REST_TestCase::assertErrorResponse()`.

Follow-up to [34928], [51478].

Props mykolashlyakhtun, antonvlasenko, swissspidy, SergeyBiryukov.
Fixes #60426.

git-svn-id: https://develop.svn.wordpress.org/trunk@58039 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-23 18:55:26 +00:00
Pascal Birchler
68baba5c9f Docs: Improve incorrect indentation/alignment in a few docblocks.
See #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@58037 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-23 12:36:49 +00:00
Jb Audras
3d139fdf61 Toolbar: Replace "Edit Site" link with "Site Editor" in the Admin Toolbar.
This changesets replaces the "Edit Site" link with "Site Editor" to avoid duplicate link anchors on multisite admin toolbar. The remaining "Edit site" link takes the user to the site editing screen in the network admin area (`network/site-info.php`) while the new "Site Editor" link takes the user to the site editor (`site-editor.php`).

Follow-up to [52158]. See GB27135.

Props johnbillion, sabernhardt, audrasjb, johnjamesjacoby, pratiklondhe.
Fixes #60977.




git-svn-id: https://develop.svn.wordpress.org/trunk@58035 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-22 21:04:08 +00:00
Tammie Lister
a92bccb6a5 Twenty Twenty-Three: Wraps navigation block in row within header template part.
This allows inserting of own blocks into header since the release of the Block Hooks API, specifically after the navigation block.

Props tomjcafferkey, poena, shailu25.
Fixes #60723.


git-svn-id: https://develop.svn.wordpress.org/trunk@58034 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-22 20:53:47 +00:00
Jb Audras
0fc223cd23 Media: Prevent division by zero in wp_img_tag_add_width_and_height_attr().
This changesets adds a check for `$size_array` values to prevent a potential division by zero.
Follow-up to [57294].

Props jdekhtiar.
Fixes #61054.
See #59352.




git-svn-id: https://develop.svn.wordpress.org/trunk@58033 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-22 20:33:31 +00:00