Move `wp_get_script_tag()`, `wp_print_script_tag()`, `wp_print_inline_script_tag()` and `wp_get_inline_script_tag()` functions from `functions.php` to `script-loader.php`.
Relocate related tests to `dependencies` sub-directory.
Follow up to [50167].
Props adamsilverstein, hellofromTonya, SergeyBiryukov.
Fixes#39941.
git-svn-id: https://develop.svn.wordpress.org/trunk@50409 602fd350-edb4-49c9-b593-d223f7449a82
Prevent `wp_localize_script()` (via `WP_Scripts::localize()`) throwing warnings in PHP 8 when the translation data is passed as a string. This maintains backward compatibility with earlier versions of PHP.
Introduce a `_doing_it_wrong()` notice to `WP_Scripts::localize()` if the translation data is not passed as an array.
Props jrf, peterwilsoncc, SergeyBiryukov.
Fixes#52534.
git-svn-id: https://develop.svn.wordpress.org/trunk@50408 602fd350-edb4-49c9-b593-d223f7449a82
This avoids an "Undefined index" PHP notice in the function when running the `media` test group separately.
Follow-up to [32342], [50156], [50164], [50393].
Props johnbillion.
Fixes#52606.
git-svn-id: https://develop.svn.wordpress.org/trunk@50406 602fd350-edb4-49c9-b593-d223f7449a82
Previously, only posts with the `publish` status could be embedded.
Props goaroundagain, peterwilsoncc, poena.
Fixes#47574.
git-svn-id: https://develop.svn.wordpress.org/trunk@50401 602fd350-edb4-49c9-b593-d223f7449a82
Update @wordpress npm packages to the latest published versions. This includes
block editor bug fixes for WordPress 5.7 RC 1.
Fixes#52588.
git-svn-id: https://develop.svn.wordpress.org/trunk@50400 602fd350-edb4-49c9-b593-d223f7449a82
Replace loopback health check URL with a `POST` request to `wp-cron.php` in the WordPress install directory. This more closely represents how WordPress uses loopback requests.
A `POST` request is used to cause `wp-cron.php` to exit prior to running any cron jobs. This allows the test to indicate success quicker and accounts for sites that set the `DISABLE_WP_CRON` constant to avoid running cron jobs on loopback requests.
Props clorith, peterwilsoncc, TimothyBlynJacobs.
Fixes#52547.
git-svn-id: https://develop.svn.wordpress.org/trunk@50399 602fd350-edb4-49c9-b593-d223f7449a82
This is a maintenance release. Changes include:
* Handle early connection errors such as 421 during connection and EHLO states.
* Make the `mail()` and sendmail transports set the envelope sender the same way as SMTP does, i.e. use whatever `From` is set to, only falling back to the `sendmail_from` php.ini setting if `From` is unset. This avoids errors from the `mail()` function if `Sender` is not set explicitly and php.ini is not configured. This is a minor functionality change, so bumps the minor version number.
* Extend `parseAddresses` to decode encoded names.
Release notes: https://github.com/PHPMailer/PHPMailer/releases/tag/v6.3.0
For a full list of changes in this update, see the PHPMailer GitHub:
https://github.com/PHPMailer/PHPMailer/compare/v6.2.0...v6.3.0
Props ayeshrajans.
Fixes#52577.
git-svn-id: https://develop.svn.wordpress.org/trunk@50397 602fd350-edb4-49c9-b593-d223f7449a82
This avoids an "Undefined index" PHP notice in `wp_resource_hints()` tests when running the full test suite.
Remove the unused global from `get_home_url()`.
Follow-up to [25443], [38100], [38174], [50156], [50164].
Props peterwilsoncc.
Fixes#52566.
git-svn-id: https://develop.svn.wordpress.org/trunk@50393 602fd350-edb4-49c9-b593-d223f7449a82
Prior to this changeset, the check for the correct RSD link output was relying on a specific protocol, although it needs to accept both the HTTP and HTTPS version of the URL.
Props TimothyBlynJacobs.
Fixes#52542. See #47577.
git-svn-id: https://develop.svn.wordpress.org/trunk@50391 602fd350-edb4-49c9-b593-d223f7449a82
The `addInlineNotice()` function expects a single string as a success or error message, not an array of strings.
Follow-up to [50129].
Props audrasjb.
Fixes#52573.
git-svn-id: https://develop.svn.wordpress.org/trunk@50390 602fd350-edb4-49c9-b593-d223f7449a82
When deleting a term, it has to be removed individually from each object it's connected to, which can take some significant time when there are a lot of objects.
By calling `wp_remove_object_terms()` when no default term is required, we can skip the terms fetch/diff step and significantly speed up the deletion process.
Props dd32.
Fixes#52549.
git-svn-id: https://develop.svn.wordpress.org/trunk@50389 602fd350-edb4-49c9-b593-d223f7449a82
The admin bar height custom property is used in `calc` functions, which require consistent unit use, even when the value is zero. A unitless value returns an invalid value for the "height" property, where this variable is used. This also changes the stylelint rule in the theme to allow zero values with a unit, just in custom properties.
Props nico23.
Fixes#52564.
git-svn-id: https://develop.svn.wordpress.org/trunk@50388 602fd350-edb4-49c9-b593-d223f7449a82
This updates two published GitHub actions to their latest versions:
- `actions/setup-node` from `v1` to `v2`.
- `styfle/cancel-workflow-action` from `0.5.0` to `0.8.0`.
See #50401.
git-svn-id: https://develop.svn.wordpress.org/trunk@50387 602fd350-edb4-49c9-b593-d223f7449a82
In #50547, the admin color schemes were added to the customizer UI, but at some point specificity changed and the colors were overridden by the defaults. This brings the color schemes back into the customizer, using the button color as a highlight, with the link color for text to keep things readable.
Follow up to [48371].
Props audrasjb, peterwilsoncc.
Fixes#52230.
git-svn-id: https://develop.svn.wordpress.org/trunk@50386 602fd350-edb4-49c9-b593-d223f7449a82
The `blur()` method there is not the jQuery method, but is an HTML DOM method instead.
This makes the Close button on the "View details" modal on Plugins screen functional again.
Follow-up to [50367].
Props afragen.
See #51812.
git-svn-id: https://develop.svn.wordpress.org/trunk@50383 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that subsequent renders of a reusable block will render correctly and that recursively inserting a reusable block into itself does not cause an internal server (500) error.
Props bernhard-reiter, SergeyBiryukov.
Fixes#52364.
git-svn-id: https://develop.svn.wordpress.org/trunk@50382 602fd350-edb4-49c9-b593-d223f7449a82
Use `home_url()` for asynchronous loopback test to ensure correct results on sites with WordPress installed elsewhere, for example WordPress in a sub-directory.
Props Levdbas.
Fixes#52547.
git-svn-id: https://develop.svn.wordpress.org/trunk@50381 602fd350-edb4-49c9-b593-d223f7449a82
In `unstick_post()` if a post ID is duplicated in the `sticky_posts` option remove all instances.
In both `stick_post()` and `unstick_post()` check for duplicate IDs already stored in the `sticky_post` option and remove them if the option is updated.
Props rahmohn, archon810.
Fixes#52007.
git-svn-id: https://develop.svn.wordpress.org/trunk@50380 602fd350-edb4-49c9-b593-d223f7449a82
This addresses `JQMIGRATE` warnings in some admin files and the Thickbox library.
Follow-up to [50001], [50270].
Props bordoni, poena.
See #51812.
git-svn-id: https://develop.svn.wordpress.org/trunk@50367 602fd350-edb4-49c9-b593-d223f7449a82
This block variation doesn't support custom colors, so allowing a background color leads to a mismatch between frontend and editor styles.
Props poena, paaljoachim, audrasjb.
Fixes#52499.
git-svn-id: https://develop.svn.wordpress.org/trunk@50364 602fd350-edb4-49c9-b593-d223f7449a82
Updates older themes to fix alignment, spacing, and font issues to better match the frontend display. Applies to themes: Twenty Eleven, Twenty Thirteen, Twenty Fourteen, Twenty Sixteen, Twenty Seventeen, and Twenty Twenty.
Props burnuser, talldanwp, cristinasoponar, poena, kjellr
Fixes#52009.
git-svn-id: https://develop.svn.wordpress.org/trunk@50358 602fd350-edb4-49c9-b593-d223f7449a82
This brings its styling inline with other meta boxes in the admin area.
Props antonlukin, kburgoine, grzim, sabernhardt, pbiron, audrasjb
Fixes#48782
git-svn-id: https://develop.svn.wordpress.org/trunk@50357 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a fatal error on PHP 8 caused by passing a zero value to `fread()` as the `$length` argument, which must be greater than zero.
Props yakimun, fierevere, jrf, DavidAnderson, SergeyBiryukov.
Fixes#52018.
git-svn-id: https://develop.svn.wordpress.org/trunk@50355 602fd350-edb4-49c9-b593-d223f7449a82
This provides better context and makes the action easier to use when the call passes specific content in the payload of the request.
Props dd32.
Fixes#52524.
git-svn-id: https://develop.svn.wordpress.org/trunk@50353 602fd350-edb4-49c9-b593-d223f7449a82
Adds an explicit relationship between the upload button and the maximum upload limit, moves focus to the error dismiss button if an error occurs, and adds a call to wp.a11y.speak to report the error after it occurs.
Props afercia, anevins, antpb, adamsilverstein, poena
Fixes#47120
git-svn-id: https://develop.svn.wordpress.org/trunk@50352 602fd350-edb4-49c9-b593-d223f7449a82