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 [61032], [61045].
See #64324.
Built from https://develop.svn.wordpress.org/trunk@61373
git-svn-id: http://core.svn.wordpress.org/trunk@60685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [60775], [61131].
See #64324.
Built from https://develop.svn.wordpress.org/trunk@61370
git-svn-id: http://core.svn.wordpress.org/trunk@60682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `get_comment` filter now explicitly documents returning `null` in addition to a `WP_Comment` object. This allows the filter to be used to exclude comments from an export. The `get_comment()` function already supported returning `null`.
Developed in https://github.com/WordPress/wordpress-develop/pull/8383
Props abcd95, WPExplorer, desrosj, mukesh27, westonruter, SirLouen, lbones, mdibrahimk48, audrasjb, jorbin, wildworks, hellofromTonya, saurabh.dhariwal, mabfahad.
Fixes#61244.
Built from https://develop.svn.wordpress.org/trunk@61369
git-svn-id: http://core.svn.wordpress.org/trunk@60681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [59132].
See #64324.
Built from https://develop.svn.wordpress.org/trunk@61367
git-svn-id: http://core.svn.wordpress.org/trunk@60679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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 [61032].
See #64324.
Built from https://develop.svn.wordpress.org/trunk@61364
git-svn-id: http://core.svn.wordpress.org/trunk@60676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the default post title was always set to `Auto Draft`, regardless of whether the CPT supports a title.
This commit ensures that the default title is present when a CPT has title support, and is an empty string otherwise.
Follow-up to [12987], [49288], [49614].
Props SirLouen, rajanit2000, garrett-eclipse, wildworks, nrqsnchz, donmhico, marybaum, audrasjb, bridgetwillard, TimothyBlynJacobs, joyously, hellofromTonya, helen, Cybr, mosescursor, fakhriaz, gulamdastgir04, peterwilsoncc, mindctrl, westonruter, SergeyBiryukov.
Fixes#45516.
Built from https://develop.svn.wordpress.org/trunk@61360
git-svn-id: http://core.svn.wordpress.org/trunk@60672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On older PHP versions, MariaDB version is reported with the `5.5.5-` prefix, e.g. `5.5.5-10.6.24-MariaDB`.
This includes PHP 8.0.15 or earlier, as well as PHP 8.1.0—8.1.2, which was not accounted for previously.
This commit updates the condition for removing the `5.5.5-` prefix to include PHP 8.1.0—8.1.2.
Follow-up to [54384].
Props maximumsoftware, hbhalodia, SergeyBiryukov.
Fixes#64332.
Built from https://develop.svn.wordpress.org/trunk@61349
git-svn-id: http://core.svn.wordpress.org/trunk@60661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Some class names with HTML character references could be mishandled, for example:
- Failure to remove an existing class like `&` with `::remove_class( '&' )`
- Double-encoding of an existing class like `&` after a modification, becoming `&`
The second case manifested after double-encoding prevention was removed from `::set_attribute()` in [60919].
Developed in https://github.com/WordPress/wordpress-develop/pull/10591.
Props jonsurrell, dmsnell.
Fixes#64340.
Built from https://develop.svn.wordpress.org/trunk@61346
git-svn-id: http://core.svn.wordpress.org/trunk@60658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Now that a version of `imagick` with support for PHP 8.5 has been released and the containers maintained by the project for the local development environemnt have been updated to include it, there are some new PHP 8.5 compatibility issues that have surfaced related to HEIF/HEIC image format.
PHP 8.5 added support for the HEIF/HEIC image format in `getimagesize()`. To properly support this in a cross-version way, a few changes are necessary.
Since [58849], WordPress has supported this format and the `IMAGETYPE_HEIC` constant was introduced as a placeholder until proper support was added in PHP. Since that has now happened, this constant needs to be changed to contain a value of `20` instead of `99`, and the name upstream was added as `IMAGETYPE_HEIF`. The constant in Core is being changed to match those included in PHP.
The implementation for this image format in `getimagesize()` also follows a similar pattern to that of AVIF where additional information such as the image `bits` and `channels` are also returned. This additional information is causing unit tests to fail. The tests have been updated to account for different versions of PHP returning a different level of detail.
Props westonruter, skithund, johnbillion, adamsilverstein.
Fixes#64322.
Built from https://develop.svn.wordpress.org/trunk@61328
git-svn-id: http://core.svn.wordpress.org/trunk@60640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This became unnecessary (and confusing) after the plaintext password was removed from the email, and the URL to set a new password was added directly above in WordPress 4.3.
Follow-up to [2872], [8058], [10931], [33023].
Props clayray, manhphucofficial, pratiklondhe, johnbillion, SergeyBiryukov.
Fixes#64316.
Built from https://develop.svn.wordpress.org/trunk@61321
git-svn-id: http://core.svn.wordpress.org/trunk@60633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit removes the `required` attribute from the file input element in the media uploader to avoid browser form validation issues and ensure that the `form` element is submitted correctly.
Props adamsilverstein, ellatrix, desrosj, huzaifaalmesbah, immeet94, krupajnanda, madhavishah01, parthvataliya, ravichudasama01, sabernhardt, wildworks, yagniksangani.
Fixes#64305.
Built from https://develop.svn.wordpress.org/trunk@61320
git-svn-id: http://core.svn.wordpress.org/trunk@60632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This avoids a PHP warning when `::dirlist()` returns `false` under certain conditions:
> `Warning: Trying to access array offset on value of type bool in wp-admin/includes/class-wp-filesystem-ftpsockets.php on line 326`
Follow-up to [6779], [30678], [45226].
Props apermo, malt3, SergeyBiryukov.
Fixes#63474.
Built from https://develop.svn.wordpress.org/trunk@61311
git-svn-id: http://core.svn.wordpress.org/trunk@60623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace regex-based HTML parsing with WP_HTML_Tag_Processor to properly extract text nodes from menu labels. This ensures only root-level text nodes are
collected.
Additionally, replace html_entity_decode() with WP_HTML_Decoder::decode_attribute() with the menu URL for consistent attribute decoding.
Follow-up to [61124], [61126], [61127], [61142].
Props: dmsnell, madhavishah01, peterwilsoncc, wildworks.
Fixes#64233.
Built from https://develop.svn.wordpress.org/trunk@61310
git-svn-id: http://core.svn.wordpress.org/trunk@60622 1a063a9b-81f0-0310-95a4-ce76da25c4cd