Add the `aria-haspopup` attribute and `aria-controls` on the Add Media button in the classic editor, so that screen reader users are notified about the behavior of the button.
Props alh0319, rishabhwp, joedolson.
Fixes#63973.
Built from https://develop.svn.wordpress.org/trunk@60786
git-svn-id: http://core.svn.wordpress.org/trunk@60122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Rename the arguments in `comment_type()` to use underscore separators per coding standards and to add vowels for clarity.
"Pingback" and "Trackback" in the variable names are left unchanged as they are concatenated for display to site owners.
See #63168.
Built from https://develop.svn.wordpress.org/trunk@60779
git-svn-id: http://core.svn.wordpress.org/trunk@60115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to bring more consistency with the rest of core, and more closely mirrors the similar changes upstream to use `sys_get_temp_dir()`.
The potential `false` return value was not checked by the only caller in `Text_Diff_Engine_shell::diff()`.
Follow-up to [7747], [48464], [49185], [60776].
Props TimoTijhof, apermo, SergeyBiryukov.
Fixes#63711.
Built from https://develop.svn.wordpress.org/trunk@60777
git-svn-id: http://core.svn.wordpress.org/trunk@60113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the third in a series of patches to modernize and standardize UTF-8 handling.
When the fallback UTF-8 validation code was added it was placed inside formatting.php; however, that validation logic can be reused for a number of related UTF-8 functions. To faciliate this it was moved into a new location and loaded early. This patch is follow-up to that first half, whereby the UTF-8 scanning logic forms its own new `_wp_scan_utf8()` function. This new UTF-8 scanner is a low-level function which forms a shared spec-compliant processing core to power multiple fallback functions and some new functionality as well.
Developed in https://github.com/WordPress/wordpress-develop/pull/9830
Discussed in https://core.trac.wordpress.org/ticket/63863
Follow-up to: [60743].
See #63863.
Built from https://develop.svn.wordpress.org/trunk@60768
git-svn-id: http://core.svn.wordpress.org/trunk@60104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Because an exact version is pinned for `composer/ca-bundle`, the `composer update` command cannot update the dependency to the latest version. The command also does not work for a single dependency due to the fact that Composer has been configured not to generate a `composer.lock` file.
This updates the Grunt task to determine the new version using `composer outdated` before running `composer require composer/ca-bundle:NEW_VERSION --dev` to properly update the pinned version.
This also updates the build process test workflow to confirm that the certificate-related files under version control in `src/wp-includes/certificates` are up to date.
Props johnbillion.
Fixes#63939.
Built from https://develop.svn.wordpress.org/trunk@60765
git-svn-id: http://core.svn.wordpress.org/trunk@60101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `WP_Tests_Image_Resize_UnitTestCase` class extends `WP_Image_UnitTestCase`, which already has a `wp_image_editors` filter performing the same action.
This also officially declares `$editor_engine` as a property in the base class.
Props mukesh27.
See #63167.
Built from https://develop.svn.wordpress.org/trunk@60763
git-svn-id: http://core.svn.wordpress.org/trunk@60099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is the second in a series of patches to modernize and standardize UTF-8 handling.
When the fallback UTF-8 validation code was added it was placed inside formatting.php; however, that validation logic can be reused for a number of related UTF-8 functions. To faciliate this it should move into a new location and be loaded early. This patch is the first half of doing that, whereby the original fallback function is moved unchanged to the `compat-utf8.php` module. The follow-up patch will abstract the UTF-8 scanning logic for reuse. Splitting this into a move and a separate change involves an extra step, but faciliates tracking the heritage of the code through the changes.
Developed in https://github.com/WordPress/wordpress-develop/pull/9825
Discussed in https://core.trac.wordpress.org/ticket/63863
Follow-up to: [60630].
See #63863.
Built from https://develop.svn.wordpress.org/trunk@60743
git-svn-id: http://core.svn.wordpress.org/trunk@60079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The updated PHP 8.4 and 8.3 containers are running Imagick 7 which is producing some test failures for AVIFs and PNGs with 1-bit transparency. This requires further investigation, possibly accompanied by more comprehensive testing across Imagick versions, so these tests are disabled for now.
Additional missing assertions have also been added which ensure an unexpected `WP_Error` instance correctly fails the test and is not passed to an image processing function.
Props johnbillion, siliconforks, desrosj, jorbin.
See #63932
Built from https://develop.svn.wordpress.org/trunk@60736
git-svn-id: http://core.svn.wordpress.org/trunk@60072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`esc_url()` will now prepend `https://` to the URL if it does not already contain a scheme and the first item in the `$protocols` array is `'https'`.
Follow-up to [5088], [6015], [13299], [33851], [60672].
Props sabernhardt, mkaz, rachelbaker, audrasjb, costdev, aksl95, johnbillion, pcarvalho, SergeyBiryukov.
Fixes#52886.
Built from https://develop.svn.wordpress.org/trunk@60734
git-svn-id: http://core.svn.wordpress.org/trunk@60070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This is a follow-up to [59461] from 6.8, which leveraged `Domain Path` for just-in-time loading of MO/PHP translation files.
Now, the same is done for script translations, which means plugins/themes shipping with their own translation no longer need to manually specify the translation path when calling `wp_set_script_translations()`.
Props tusharbharti, swissspidy, shailu25, jsnajdr.
See #62244, #54797.
Fixes#63944.
Built from https://develop.svn.wordpress.org/trunk@60728
git-svn-id: http://core.svn.wordpress.org/trunk@60064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When encountering HTML tags with boolean or missing tags, the get_attribute() method in the HTML API returns true and null, respectively. If these returned values are sent directly into string comparison functions then as of PHP 8.0 they will throw E_DEPRECATED errors.
In this patch, block supports is enhanced to check that the class value is a string before it performs string operations on it.
Also in this patch: using `assertEqualHTML()` in background support test instead of `assertSame()`
Developed in https://github.com/WordPress/wordpress-develop/pull/5486
Discussed in https://core.trac.wordpress.org/ticket/59622
Props dmsnell, jonsurrell, hellofromtonya, peterwilsoncc.
Fixes#59622.
Built from https://develop.svn.wordpress.org/trunk@60727
git-svn-id: http://core.svn.wordpress.org/trunk@60063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As there's an `is_string()` check already, `! empty( $href )` can be simplified to a string comparison, as the other variable types that are checked in `empty()` won't appear.
`empty()` also returns `false` for the string `"0"` which would however be a valid (relative) URL and thus should be detectable by the function.
Follow-up to [60665].
Props TobiasBg.
Fixes#63694.
Built from https://develop.svn.wordpress.org/trunk@60726
git-svn-id: http://core.svn.wordpress.org/trunk@60062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This resolves an error on Multisite networks where an individual site doesn't have plugins active:
{{{
array_search(): Argument #2 ($haystack) must be of type array, string given
}}}
Follow-up to [60666], [60721].
Props dd32.
See #53323.
Built from https://develop.svn.wordpress.org/trunk@60725
git-svn-id: http://core.svn.wordpress.org/trunk@60061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Specifically, this change when a network activated plugin has plugin dependencies, the disabled deactivate row action link text is changed from "Deactivate" to "Network Deactivate".
Follow-up to [57545].
Props pbiron, nikunj8866, shailu25, jjj.
Fixes#63942.
Built from https://develop.svn.wordpress.org/trunk@60723
git-svn-id: http://core.svn.wordpress.org/trunk@60059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit:
* Moves the call to `upgrade_690()` to the correct place so it actually gets called.
* Wraps Hello Dolly upgrade code in a version check per standard practice.
* Removes the `$wpdb->query()` call to avoid attempting to create the new index twice, once in the upgrade and once in `dbDelta()`.
Follow-up to [60666], [60716], [60717].
Props peterwilsoncc, mukesh27.
See #50161, #53323.
Built from https://develop.svn.wordpress.org/trunk@60721
git-svn-id: http://core.svn.wordpress.org/trunk@60057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Refactoring covered:
- Use the newly introduced `block_bindings_supported_attributes_{$block_name}` filter to register a `test/block`'s attribute as supported by Block Bindings, rather than using an actual block (Paragraph) for most tests.
- Merge three test cases that check if `get_value_callback` works correctly (accepts arguments; correctly includes symbols and numbers; return value is sanitized when rendered) into one, by using a `dataProvider`.
- Merge two test cases that check if block context is correctly evaluated, and that access is only given to context included in a source's `uses_context` property.
Follow-up to [60684].
Props bernhard-reiter, gziolo.
See #63840.
Built from https://develop.svn.wordpress.org/trunk@60720
git-svn-id: http://core.svn.wordpress.org/trunk@60056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve the source locations referenced by developer tooling in supporting browsers. Inline source locations are named like inline:handle-js-after and appear in the developer tools "sources" panel.
This is the second attempt to add sourceURL comments. The first attempt in [60685] was reverted due to an issue with script concatenation that has been addressed.
Developed in https://github.com/WordPress/wordpress-develop/pull/9672.
Follow-up to [60685], [60690].
Props jonsurrell, westonruter, wildworks, peterwilsoncc, johnbillion, tobiasbg.
Fixes#63887.
Built from https://develop.svn.wordpress.org/trunk@60719
git-svn-id: http://core.svn.wordpress.org/trunk@60055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to improve performance of some queries on installations with a large number of posts.
Follow-up to [3678], [3690], [9290], [13576].
Props josephscott, LucasMS, Otto42, flixos90, matt, johnjamesjacoby, siliconforks, mukesh27, jonsurrell, SirLouen, SergeyBiryukov.
Fixes#50161.
Built from https://develop.svn.wordpress.org/trunk@60717
git-svn-id: http://core.svn.wordpress.org/trunk@60053 1a063a9b-81f0-0310-95a4-ce76da25c4cd