This patch replaces the use of the problematic error-suppresssion operator with a specific error-handler to catch and report Unicode PCRE support without raising the related issues of error-suppression: notably conflating errors and failing to prevent completely the logging of the warnings.
In this case, the WPCS rule against using error-suppression was actually helpful in pointing out the risk, but the code was left in place with an “ignore” comment to silence the violation; this patch addresses the risk and removes the need for the comment.
Developed in https://github.com/WordPress/wordpress-develop/pull/9576
Discussed in https://core.trac.wordpress.org/ticket/63865
Follow-up to: [45611].
Props dmsnell.
Fixes#63865.
Built from https://develop.svn.wordpress.org/trunk@60694
git-svn-id: http://core.svn.wordpress.org/trunk@60030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates the following third-party actions to their latest versions:
`actions/checkout` from `4.2.2` to `5.0.0`
`shivammathur/setup-php` from `2.32.0` to `2.35.3`
`actions/setup-node` from `4.3.0` to `4.4.0`
`ramsey/composer-install` from `3.1.0` to `3.1.1`
`actions/cache` from `4.2.3` to `4.2.4`
`actions/download-artifact` from `4.2.1` to `5.0.0`
`codecov/codecov-action` from `5.4.0` to `5.4.3`
`slackapi/slack-github-action` from `2.0.0` to `2.1.1`
See #63170.
Built from https://develop.svn.wordpress.org/trunk@60692
git-svn-id: http://core.svn.wordpress.org/trunk@60028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As of WordPress 6.7.0, it is possible -- e.g. for plugins -- to register block templates via a new API, `register_block_template()`. Unlike block templates loaded from theme files or from the database, however, those block templates didn't have Block Hooks applied. This changeset rectifies this inconsistency.
Props iamadisingh, aljullu, bernhard-reiter.
Fixes#63808.
Built from https://develop.svn.wordpress.org/trunk@60688
git-svn-id: http://core.svn.wordpress.org/trunk@60024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace the existing block-specific, hard-coded, logic in the `WP_Block` class with more generic code that is able to locate and replace a `rich-text` sourced attribute based on the `selector` definition in its `block.json`.
This should make it easier to add block bindings support for more block attributes.
Props bernhard-reiter, jonsurrell, gziolo, cbravobernal, dmsnell.
Fixes#63840.
Built from https://develop.svn.wordpress.org/trunk@60684
git-svn-id: http://core.svn.wordpress.org/trunk@60020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There's no reason not to add a semantic class to the plugin icons on the update screen instead of making our CSS more complex, so let's do that and ensure that the existing `.plugin-icon` styles are scoped to `.plugin-card` on the install screen.
Partially reverts [60673].
Fixes#63120.
Built from https://develop.svn.wordpress.org/trunk@60680
git-svn-id: http://core.svn.wordpress.org/trunk@60016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The playlist shortcode has a base set of JavaScript that should only be loaded once. Previously, this JS was only loaded the first time a playlist shortcode was processed. If the first playlist was broken, because the media file was missing for instance, this would break all other playlists on the page.
This commit introduces a new static variable to keep track of whether the necessary JavaScript has been loaded instead.
Props iamadisingh, abcd95, justlevine, jorbin, rollybueno, Guido07111975.
Fixes#63583.
Built from https://develop.svn.wordpress.org/trunk@60678
git-svn-id: http://core.svn.wordpress.org/trunk@60014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Moves the Hello Dolly test plugin file from `tests/phpunit/data/plugins/hello.php` to `tests/phpunit/data/plugins/hello-dolly/hello.php` to match the updated plugin structure in the main codebase.
Fixes failing tests in Tests_Admin_IncludesPlugin that expect the plugin to be located in a hello-dolly directory.
Props jorbin, davidb, afragen.
Built from https://develop.svn.wordpress.org/trunk@60677
git-svn-id: http://core.svn.wordpress.org/trunk@60013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change updates `term_exists` by ensuring that any numeric value passed as the `$parent_term` argument is passed to the subsequent `get_terms` call when the `$term` argument is an integer. This change includes unit tests to validate the fix.
Props spacedmonkey, lopo, lgadzhev, hugod, thehercules, nickbrazilian, audrasjb, vijendrajat, sachinrajcp123, bobbyleenoblestudios.
Fixes#55358.
Built from https://develop.svn.wordpress.org/trunk@60676
git-svn-id: http://core.svn.wordpress.org/trunk@60012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevents emojis in plugin titles from floating to the front of text when
WordPress uses emoji fallback rendering. When emoji feature detection fails,
WordPress replaces emoji characters with `<img>` elements that were incorrectly
affected by CSS float rules intended for plugin icons.
Updates CSS selectors to target specific icon types (dashicons, icon classes,
and data URI images) rather than all images, ensuring emoji images remain
inline with plugin title text while preserving proper layout for actual
plugin icons.
- Consolidates `.plugins .plugin-title img` and `.plugins .plugin-title .dashicons` rules
- Adds support for `img.dashicons`, `img[class*="icon"]`, and `img[src*="data:image"]` selectors
- Maintains 64px sizing and left float for legitimate plugin icons
- Fixes visual issue where "myplugin❤️wordpress" displayed as "❤️mypluginwordpress"
Props slimndap, ankitkumarshah, sandeepdahiya, sabernhardt, tomdevisser,
debarghyabanerjee, nusrat21, SirLouen, wpfy, hmbashar, klevismiho,
rollybueno, jamesgiroux, jorbin, whyisjake.
Fixes#63120.
Built from https://develop.svn.wordpress.org/trunk@60673
git-svn-id: http://core.svn.wordpress.org/trunk@60009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Changes the Hello Dolly plugin from a single file structure to a proper plugin directory structure, moving from `hello.php` to `hello-dolly/hello.php` to align with Plugin Handbook Best Practices.
- Adds proper `Text Domain: hello-dolly` header to Hello Dolly plugin
- Updates core files to remove special case handling for `hello.php`
- Updates plugin dependency system to handle new directory structure
- Adds upgrade routine to migrate active plugin references and keep plugin active
- Updates all tests to use new plugin path format `hello-dolly/hello.php`
- Updates build configuration and .gitignore for new directory structure
- Adds `hello.php` to old files list for cleanup during core updates
- Adds `plugins/hello-dolly/` to new bundled directories list
Props afragen, SergeyBiryukov, peterwilsoncc, SirLouen, matt, davidbaumwald, desrosj, hellofromtonya, justinahinon,audrasjb, oglekler, whyisjake.
Fixes#53323.
Built from https://develop.svn.wordpress.org/trunk@60666
git-svn-id: http://core.svn.wordpress.org/trunk@60002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the textarea control was forced to use 5 rows. This commit instead applies a default value of 5, but allows for a developer to specify a different number of rows using the input_attrs arg.
Props sirlouen, timhavinga, celloexpressions, sainathpoojary.
Fixes#47445.
Built from https://develop.svn.wordpress.org/trunk@60662
git-svn-id: http://core.svn.wordpress.org/trunk@59998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`get_term()` can return `WP_Error` or `null` on failure, so the result should be verified as a `WP_Term` instance before accessing the `count` property.
This commit prevents a PHP warning if `get_term()` returns `null` for a child term:
{{{
Warning: Attempt to read property "count" on null
}}}
Follow-up to [27458], [37572].
Props josephscott, coleatkinson1, kebbet, jakariaistauk, sabernhardt, westonruter, SergeyBiryukov.
Fixes#63877.
Built from https://develop.svn.wordpress.org/trunk@60661
git-svn-id: http://core.svn.wordpress.org/trunk@59997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This pins the images to PHP 8.3.10 and 8.4.11 on Debian Bullseye pending further investigation into the root cause of the certificate verification failure affecting the connection to the database containers.
This also removes memcached from the test matrix pending further investigation into the missing Memcached executable.
Props desrosj, bernhard-reiter, SirLouen, johnbillion.
See #63876
Built from https://develop.svn.wordpress.org/trunk@60660
git-svn-id: http://core.svn.wordpress.org/trunk@59996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As the original URLs are no longer accessible, this commit uses the latest available copy of the corresponding documentation from the Wayback Machine.
Follow-up to [1346], [56167].
Props mayur8991, panchalhimani711, SergeyBiryukov.
Fixes#63848.
Built from https://develop.svn.wordpress.org/trunk@60655
git-svn-id: http://core.svn.wordpress.org/trunk@59991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Modifies `wp_insert_user()` to throw the warning `The user_pass field is required when creating a new user. The user will need to reset their password before logging in.` when called without the `user_pass` argument defined.
This avoids a mix of warnings being thrown depending on the version of PHP the system is running on, anywhere between zero and three.
To retain backward compatibility the user is created with an empty password. As WordPress does not accept an empty password during authentication, this will require the newly created user complete the password reset process.
Props dd32, hbhalodia, iamadisingh, mindctrl, rollybueno, sheldorofazeroth, shilpaashokan94
Fixes#63770.
Built from https://develop.svn.wordpress.org/trunk@60650
git-svn-id: http://core.svn.wordpress.org/trunk@59986 1a063a9b-81f0-0310-95a4-ce76da25c4cd