Commit Graph

48730 Commits

Author SHA1 Message Date
Bernhard Reiter
36f543f447 JavaScript: Add new Modules API.
This changeset adds a new API for WordPress, designed to work with native ES Modules and Import Maps. It introduces functions such as `wp_register_module`, and `wp_enqueue_module`.

The API aims to provide a familiar experience to the existing `WP_Scripts` class, offering similar functionality. However, **it's not intended to duplicate the exact functionality of `WP_Scripts`**; rather, it is carefully tailored to address the specific needs and capabilities of ES modules.

For this initial version, **the current proposal is intentionally simplistic**, covering only the essential features needed to work with ES modules. Other enhancements and optimizations can be added later as the community identifies additional requirements and use cases.

== Differences Between WP_Script_Modules and WP_Scripts

=== Dependency Specification

With `WP_Script_Modules`, the array of dependencies supports not only strings but also arrays that include the dependency import type (`static` or `dynamic`). This design choice allows for future extensions of dependency properties, such as adding a `version` property to support "scopes" within import maps.

=== Module Identifier

Instead of a handle, `WP_Script_Modules` utilizes the module identifier, aligning with the module identifiers used in JavaScript files and import maps.

=== Deregistration

There is no equivalent of `wp_deregister_script` at this stage.

== API

=== `wp_register_module( $module_identifier, $src, $deps, $version )`

Registers a module.

{{{
// Registers a module with dependencies and versioning.
wp_register_module(
  'my-module',
  '/path/to/my-module.js',
  array( 'static-dependency-1', 'static-dependency-2' ),
  '1.2.3'
);
}}}

{{{
// my-module.js
import { ... } from 'static-dependency-1';
import { ... } from 'static-dependency-2';

// ...
}}}

{{{
// Registers a module with a dynamic dependency.
wp_register_module(
  'my-module',
  '/path/to/my-module.js',
  array(
    'static-dependency',
    array(
      'id'     => 'dynamic-dependency',
      'import' => 'dynamic'
    ),
  )
);
}}}

{{{
// my-module.js
import { ... } from 'static-dependency';

// ...
const dynamicModule = await import('dynamic-dependency');
}}}

=== `wp_enqueue_module( $module_identifier, $src, $deps, $version )`

Enqueues a module. If a source is provided, it will also register the module.

{{{
wp_enqueue_module( 'my-module' );
}}}

=== `wp_dequeue_module( $module_identifier )`

Dequeues a module.

{{{
wp_dequeue_module( 'my-module' );
}}}

== Output

- When modules are enqueued, they are printed within script tags containing `type="module"` attributes.
- Additionally, static dependencies of enqueued modules utilize `link` tags with `rel="modulepreload"` attributes.
- Lastly, an import map is generated and inserted using a `<script type="importmap">` tag.

{{{
<script type="module" src="/path/to/my-module.js" id="my-module"></script>
<link rel="modulepreload" href="/path/to/static-dependency.js" id="static-dependency" />
<script type="importmap">
  {
    "imports": {
      "static-dependency": "/path/to/static-dependency.js",
      "dynamic-dependency": "/path/to/dynamic-dependency.js"
    }
  }
</script>
}}}

== Import Map Polyfill Requirement

Even though all major browsers already support import maps, an import map polyfill is required until the percentage of users using old browser versions without import map support drops significantly.

This work is ongoing and will be added once it's ready. Progress is tracked in #60232.

Props luisherranz, idad5, costdev, neffff, joemcgill, jorbin, swissspidy, jonsurrell, flixos90, gziolo, westonruter.
Fixes #56313.
Built from https://develop.svn.wordpress.org/trunk@57269


git-svn-id: http://core.svn.wordpress.org/trunk@56775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-11 14:47:14 +00:00
Sergey Biryukov
c9291ac596 Tests: Remove some leftover debugging in WP_REST_Revisions_Controller tests.
Follow-up to [57222].

See #59875.
Built from https://develop.svn.wordpress.org/trunk@57268


git-svn-id: http://core.svn.wordpress.org/trunk@56774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-11 13:18:17 +00:00
joedolson
bcb0f74678 Media: Fix handling of multibyte exif description metadata.
The exif standards expect the UserComment field to be used as a substitute for ImageDescription if multibyte characters are needed. WordPress media only mapped the ImageDescription field and did not correctly handle descriptions with multibyte characters.

Fix metadata saving to better handle media with multibyte characters in metadata and update unit tests.

Props fotodrachen, antpb, joedolson, mikinc860, azaozz, nicolefurlan.
Fixes #58082.
Built from https://develop.svn.wordpress.org/trunk@57267


git-svn-id: http://core.svn.wordpress.org/trunk@56773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 21:59:13 +00:00
joedolson
1d2e7fd49d Tests: Fix tests following r57265.
Update unit tests failing after r57265 changed strings in single post template descriptions. Follow up to [57265].

Props joedolson.
Fixes #60216.
Built from https://develop.svn.wordpress.org/trunk@57266


git-svn-id: http://core.svn.wordpress.org/trunk@56772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 21:14:16 +00:00
Sergey Biryukov
39f7f558d9 Editor: Clarify single post and page template descriptions.
Follow-up to [55500].

Props mikachan.
Fixes #60216.
Built from https://develop.svn.wordpress.org/trunk@57265


git-svn-id: http://core.svn.wordpress.org/trunk@56771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 17:08:11 +00:00
dmsnell
29dd837333 HTML API: Add support for list elements.
Adds support for the following HTML elements to the HTML Processor:

 - LI, OL, UL.
 - DD, DL, DT.

Previously, these elements were not supported and the HTML Processor would bail when encountering them.
With this patch it will proceed to parse an HTML document when encountering those tags as long as other normal conditions don't cause it to bail (such as complicated format reconstruction).

Props audrasjb, jonsurrell, bernhard-reiter.
Fixes #60215.


Built from https://develop.svn.wordpress.org/trunk@57264


git-svn-id: http://core.svn.wordpress.org/trunk@56770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 14:05:17 +00:00
costdev
28331b7aae Docs: Correct some typos in docblocks and inline comments.
This corrects several typos in documentation, including:
- "imput" -> "input"
- "proessing" -> "processing"
- "instantating" -> "instantiating"
- "filtersing" -> "filtering"
- "officaly" -> "officially"

Follow-up to [8852], [25307], [26191], [37488], [54416].

Props benniledl, mukesh27, jayadevankbh, Presskopp.
Fixes #60069. See #59651.
Built from https://develop.svn.wordpress.org/trunk@57263


git-svn-id: http://core.svn.wordpress.org/trunk@56769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 11:57:15 +00:00
costdev
cee1cd2789 Customize: Correct a typo in a console warning message.
This corrects a typo from "instantating" to "instantiating".

Follow-up to [41374].

Props benniledl, mukesh27, Presskopp.
Fixes #60222.
Built from https://develop.svn.wordpress.org/trunk@57262


git-svn-id: http://core.svn.wordpress.org/trunk@56768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 11:13:19 +00:00
isabel_brison
f2e220ffa2 Editor: fix inline comment formatting.
Correctly formats inline comment in `wp_get_global_stylesheet`.

Follow-up to [57259].

Props mukesh27.
See #60134.

Built from https://develop.svn.wordpress.org/trunk@57261


git-svn-id: http://core.svn.wordpress.org/trunk@56767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 04:09:18 +00:00
isabel_brison
2588f90ab2 Editor: Allow default duotone styles if not explicitly disabled in theme.json.
Removes setting that disabled default duotone palette from being output in themes without theme.json.

Props andrewserong.
Fixes #60136.

Built from https://develop.svn.wordpress.org/trunk@57260


git-svn-id: http://core.svn.wordpress.org/trunk@56766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-10 00:27:15 +00:00
isabel_brison
c8dc74b0bc Editor: output palette presets when appearance tools or border are enabled.
Adds color palette presets to global styles output if current theme supports either appearance tools or border.

Props andrewserong, noisysocks.
Fixes #60134.

Built from https://develop.svn.wordpress.org/trunk@57259


git-svn-id: http://core.svn.wordpress.org/trunk@56765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 23:32:12 +00:00
Aaron Jorbin
c4c8ae426d Editor: update npm packages in trunk for 6.4.3.
Package Update includes fixes for:
- Image Block: Enable image block to be selected correctly when clicked.
- Reduce specificity of default Cover text color styles.
- Image Block: Fix deprecation when width/height attribute is number.
- Text selection: show CSS hack to Safari only.
- SlotFill: Allow contextual SlotFillProviders.

See: https://github.com/WordPress/wordpress-develop/pull/5696
See: bd6767b8a4
See: https://github.com/WordPress/gutenberg/pull/56043
See: https://github.com/WordPress/gutenberg/pull/56411
See: https://github.com/WordPress/gutenberg/pull/57063
See: https://github.com/WordPress/gutenberg/pull/57300
See: https://github.com/WordPress/gutenberg/pull/56779

Props mikachan, wildworks, alexstine, poena, isabel_brison, andrewserong, czapla, andraganescu, joen, ellatrix, youknowriad, ntsekouras.
Fixes #59943, #59943.


Built from https://develop.svn.wordpress.org/trunk@57258


git-svn-id: http://core.svn.wordpress.org/trunk@56764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 20:17:30 +00:00
hellofromTonya
178deab664 Tests: Add hook priority call order tests.
Adds happy (integer) and unhappy (non-integer) tests for validating the priority call order for:

* `do_action()`
* `WP_Hook::do_action()`
* `apply_filters()`
* `WP_Hook::apply_filters()`

As each of these functions have differing code, the tests are added to each to ensure expected results and protect against future regressions.

Follow-up to [53804], [52010], [25002], [25/tests], [62/tests].

Props hellofromTonya, mukesh27, dd32, valendesigns, drrobotnik.
Fixes #60193.
Built from https://develop.svn.wordpress.org/trunk@57257


git-svn-id: http://core.svn.wordpress.org/trunk@56763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 16:34:17 +00:00
Sergey Biryukov
26099a407d Docs: Add a mention of appearance-tools as a possible value for add_theme_support().
Follow-up to [57255].

See #60118.
Built from https://develop.svn.wordpress.org/trunk@57256


git-svn-id: http://core.svn.wordpress.org/trunk@56762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 11:41:18 +00:00
isabel_brison
b0b64739ff Themes: Add theme support for appearance tools.
Reapplies the patch reverted in #57649 as the original patch was no longer applying cleanly. Adds theme support for appearance tools to `WP_Theme_JSON_Resolver`.

Props andrewserong, mukesh27, noisysocks.
Fixes #60118.


Built from https://develop.svn.wordpress.org/trunk@57255


git-svn-id: http://core.svn.wordpress.org/trunk@56761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 06:26:16 +00:00
isabel_brison
90088c4c92 Editor: add size and repeat to background image support.
Adds background size and background repeat style processing to the background image block support and `WP_Style_Engine` definitions.

Props andrewserong, mukesh27.
Fixes #60175.


Built from https://develop.svn.wordpress.org/trunk@57254


git-svn-id: http://core.svn.wordpress.org/trunk@56760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 06:12:18 +00:00
isabel_brison
6e67ad1701 Editor: add CSS var parsing for fontSize and fontFamily.
Adds capability to parse CSS custom properties for fontSize and fontFamily in `WP_Style_Engine`.

Props ramonopoly.
Fixes #59982.

Built from https://develop.svn.wordpress.org/trunk@57253


git-svn-id: http://core.svn.wordpress.org/trunk@56759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-09 02:45:16 +00:00
Aaron Jorbin
c59c7d90c4 Upgrade/Install: Check theme compatibility during bulk upgrades.
Previously, bulk upgrades did not verify that a theme package was compatible with the site's WordPress version or the server's PHP version.

This was previusly done for plugins in #59198, but themes were missed.

Follow-up to: [56525].

Props salcode, lakshmananphp.
Fixes #59758.

Built from https://develop.svn.wordpress.org/trunk@57252


git-svn-id: http://core.svn.wordpress.org/trunk@56758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 23:19:16 +00:00
Sergey Biryukov
a38245a657 Taxonomy: Check for empty term after DB sanitization in wp_insert_term().
When inserting a new term in the database, `wp_insert_term()` will check if the term is empty and return a corresponding error.

Afterwards the term is sanitized and inserted in the database. However, there is a chance the term is empty after the DB sanitization.

This commit adds a check for an empty term name after the term is sanitized, returning an error in that case.

Follow-up to [5726], [8393].

Props fgiannar, kraftbj.
Fixes #59995.
Built from https://develop.svn.wordpress.org/trunk@57251


git-svn-id: http://core.svn.wordpress.org/trunk@56757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 22:44:17 +00:00
desrosj
854f43fdac Build/Test Tools: Increase the max old space size in Node.
The Test Build Processes workflow started failing recently on MacOS runners due to “JavaScript heap out of memory” errors (see https://github.com/WordPress/wordpress-develop/actions/runs/7421385568/job/20209241826#step:8:82).

This increases the maximum memory size of the old memory section in Node from the default of 4GB to 8GB (specified in megabytes) to avoid unnecessary failures while ways to optimize the Gutenberg build process are explored.

Props dmsnell, joemcgill, hellofromTonya, isabel_brison.
See #59805.
Built from https://develop.svn.wordpress.org/trunk@57250


git-svn-id: http://core.svn.wordpress.org/trunk@56756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 18:38:22 +00:00
desrosj
af166c4d98 Build/Test Tools: Remove svn debug command.
SVN support has officially been sunset by GitHub. While SVN was not has not been utilized in GitHub Action workflows, the version of SVN being used has been output for debugging purposes.

This removes those debug lines to prevent encountering failures as new versions of test runners are pushed out without `svn` installed.

See https://github.blog/changelog/2024-01-08-subversion-has-been-sunset/.

See #59805.
Built from https://develop.svn.wordpress.org/trunk@57249


git-svn-id: http://core.svn.wordpress.org/trunk@56755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 15:51:26 +00:00
Bernhard Reiter
372e3c4b97 HTML API: Add explicit handling or failure for all tags.
The HTML API HTML processor does not yet support all tags. Many tags (e.g. list elements) have some complicated rules in the [https://html.spec.whatwg.org/#parsing-main-inbody "in body" insertion mode].

Implementing these special rules is blocking the implementation for a catch-all rule for "any other tag" because we need to prevent special rules from being handled by the catch-all.

  Any other start tag
  Reconstruct the active formatting elements, if any.

  Insert an HTML element for the token.

  …

This change ensures the HTML Processor fails when handling special tags. This is the same as existing behavior, but will allow us to implement the catch-all "any other tag" handling without unintentionally handling special elements.

Additionally, we add tests that assert the special elements are unhandled. As these tags are implemented, this should help to ensure they're removed from the unsupported tag list.

Props jonsurrell, dmsnell.
Fixes #60092.
Built from https://develop.svn.wordpress.org/trunk@57248


git-svn-id: http://core.svn.wordpress.org/trunk@56754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 14:05:24 +00:00
isabel_brison
d966a9f046 Editor: add setting to disable layout content and wide size controls.
Adds support for an `allowCustomContentAndWideSize` setting in `WP_Theme_JSON` valid settings.

Props andrewserong.
Fixes #60133.

Built from https://develop.svn.wordpress.org/trunk@57247


git-svn-id: http://core.svn.wordpress.org/trunk@56753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 06:23:14 +00:00
isabel_brison
2b005a61ef Editor: add layout classes to legacy Group inner container.
Moves generated layout classes into the Group block inner container in classic themes, so that block gap support can work correctly.

Props flixos90, mukesh27.
Fixes #60130.

Built from https://develop.svn.wordpress.org/trunk@57246


git-svn-id: http://core.svn.wordpress.org/trunk@56752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-08 06:13:20 +00:00
Sergey Biryukov
45df401868 Site Health: Include site ID in debug data on multisite installations.
Follow-up to [44986].

Props sebastienserre, mukesh27.
Fixes #60081.
Built from https://develop.svn.wordpress.org/trunk@57245


git-svn-id: http://core.svn.wordpress.org/trunk@56751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-07 16:09:21 +00:00
Sergey Biryukov
7670c25979 Tests: Use assertSame() in some newly introduced 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 [55859], [56380], [56802], [57115], [57129], [57185].

See #59655.
Built from https://develop.svn.wordpress.org/trunk@57244


git-svn-id: http://core.svn.wordpress.org/trunk@56750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-06 13:01:20 +00:00
costdev
f86599ded1 Docs: Fix typo in twentyten_header_image_height filter's docblock.
This corrects a minor typo from "defaul" to "default" in the docblock of the `twentyten_header_image_height` filter.

Props mukesh27.
See #59651.
Built from https://develop.svn.wordpress.org/trunk@57243


git-svn-id: http://core.svn.wordpress.org/trunk@56749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-06 09:47:24 +00:00
Sergey Biryukov
9398968765 Tests: Add a @ticket reference for WP_Customize_Manager::trash_changeset_post() test.
Follow-up to [56043], [57238], [57241].

Props mukesh27.
See #60183.
Built from https://develop.svn.wordpress.org/trunk@57242


git-svn-id: http://core.svn.wordpress.org/trunk@56748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-05 11:40:20 +00:00
Sergey Biryukov
e864ae4450 Tests: Add a unit test for post trash hooks executed when trashing a changeset.
The test ensures that the correct number of arguments is passed to post trash hooks in `WP_Customize_Manager::trash_changeset_post()`, which bypasses `wp_trash_post()`.

Follow-up to [56043], [57238].

See #60183.
Built from https://develop.svn.wordpress.org/trunk@57241


git-svn-id: http://core.svn.wordpress.org/trunk@56747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-04 11:47:18 +00:00
hellofromTonya
d913aebb4f Fonts: Fix font_style typo in wp_print_font_faces().
Changes `font_style` to `font-style` to reflect the CSS property.

Follow-up to [56540].

Props tmatsuur, rajinsharwar, audrasjb. 
Fixes #59858.
Built from https://develop.svn.wordpress.org/trunk@57240


git-svn-id: http://core.svn.wordpress.org/trunk@56746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-03 22:13:18 +00:00
hellofromTonya
d30fe43245 Docs: Replace "sanity" with "confidence" for inclusive language.
The phrase "sanity check" unnecessarily references mental health. It's an old phrase used to denote an extra step in verifying code works as expected.

“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

While "sanity check" is a well-known phrase with a specific meaning, "confidence check" is a direct replacement that is more clear of its intent while being more inclusive.

Words matter.

Follow-up to [49216], [46271], [40583], [38832], [38637], [37409], [33359], [32162], [30346], [30345], [30238], [30055], [29902], [28763], [26141], [25002], [22227], [13428], [12148], [11025], [8927].

Props dartiss, hellofromTonya.
Fixes #60187.
Built from https://develop.svn.wordpress.org/trunk@57239


git-svn-id: http://core.svn.wordpress.org/trunk@56745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-03 21:59:19 +00:00
Sergey Biryukov
87a8377de2 Customize: Pass the previous status to post trash hooks when trashing a changeset.
This ensures that the correct number of arguments is passed to post trash hooks in `WP_Customize_Manager::trash_changeset_post()`, which bypasses `wp_trash_post()`.

Follow-up to [56043].

Props joelcj91, mukesh27.
Fixes #60183.
Built from https://develop.svn.wordpress.org/trunk@57238


git-svn-id: http://core.svn.wordpress.org/trunk@56744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-03 16:22:20 +00:00
Sergey Biryukov
997e4bc41e Tests: Use more specific assertions in wp_scheduled_delete() tests.
Includes clarifying test method names and descriptions.

Follow-up to [57224].

See #59938.
Built from https://develop.svn.wordpress.org/trunk@57237


git-svn-id: http://core.svn.wordpress.org/trunk@56743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-02 15:59:19 +00:00
Sergey Biryukov
4a14689016 Docs: Remove a trailing period from a URL in a @see tag.
This ensures that the ticket link works as expected.

Follow-up to [55005].

Props mukesh27.
Fixes #60171.
Built from https://develop.svn.wordpress.org/trunk@57236


git-svn-id: http://core.svn.wordpress.org/trunk@56742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-01 14:17:16 +00:00
Gary Pendergast
7d7a52367d Happy New Year! 😘
Update copyright year to 2024 in `license.txt` and bundled themes.

Follow-up to [18201], [23306], [28064], [36855], [36856], [39659], [40241], [42424], [46719], [46720], [47025], [47026], [49915], [52427], [55024].


Built from https://develop.svn.wordpress.org/trunk@57235


git-svn-id: http://core.svn.wordpress.org/trunk@56741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-01 00:02:19 +00:00
Sergey Biryukov
f06012264c Docs: Document the $wp_registered_sidebars global in wp_map_sidebars_widgets().
Follow-up to [41555].

Props shailu25.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57234


git-svn-id: http://core.svn.wordpress.org/trunk@56740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-31 13:34:20 +00:00
Sergey Biryukov
ced2ac5437 Docs: Correct the variable name passed to the determine_locale filter.
Follow-up to [43776], [44134].

Props truptikanzariya.
Fixes #60167.
Built from https://develop.svn.wordpress.org/trunk@57233


git-svn-id: http://core.svn.wordpress.org/trunk@56739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-30 11:46:24 +00:00
Sergey Biryukov
366d370d37 Canonical: Check if the author parameter is a string in redirect_canonical().
This avoids a PHP warning or error when viewing an author on the front end, while an array is passed as `$_GET['author']`.

Follow-up to [12034], [12040], [12202].

Props david.binda, antonvlasenko, azaozz, SergeyBiryukov.
Fixes #60059.
Built from https://develop.svn.wordpress.org/trunk@57232


git-svn-id: http://core.svn.wordpress.org/trunk@56738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-29 13:54:17 +00:00
Andrea Fercia
4388ba3a03 External Libraries: Accessibility: Clean up clipboard.js Copy buttons from focus management workaround.
`clipboard.js` used to suffer from a bug that triggered a focus loss when activating the Copy buttons. The bug was fixed a while ago with the `clipboard.js` 2.0.11 release so that the workaround implemented in WordPress is no longer necessary.

Props dhrumilk, paulkevan, afercia.
Fixes #60139.

Built from https://develop.svn.wordpress.org/trunk@57231


git-svn-id: http://core.svn.wordpress.org/trunk@56737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-28 15:27:15 +00:00
Sergey Biryukov
a0b82585ab Docs: Document the $post global in REST API posts and revisions controllers.
Follow-up to [38832], [40601].

Props viralsampat.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57230


git-svn-id: http://core.svn.wordpress.org/trunk@56736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-28 15:19:20 +00:00
Sergey Biryukov
45aea1a36d Twenty Twenty-Four: Use consistent title case in custom template names.
Follow-up to [56716].

Props wildworks, mukesh27.
Fixes #60083.
Built from https://develop.svn.wordpress.org/trunk@57229


git-svn-id: http://core.svn.wordpress.org/trunk@56735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-27 11:01:22 +00:00
Sergey Biryukov
ae1c461ed5 KSES: Add background-repeat to the list of safe CSS properties.
Follow-up to [45242], [46235].

Props andrewserong, ramonopoly, mukesh27.
Fixes #60132.
Built from https://develop.svn.wordpress.org/trunk@57228


git-svn-id: http://core.svn.wordpress.org/trunk@56734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-26 14:24:21 +00:00
Sergey Biryukov
13f7ee3063 Coding Standards: Correct alignment in WP_HTML_Tag_Processor::apply_attributes_updates().
This fixes an `Equals sign not aligned correctly` WPCS warning.

Follow-up to [57179].

Props antonvlasenko, dmsnell, ironprogrammer.
Fixes #60078.
Built from https://develop.svn.wordpress.org/trunk@57227


git-svn-id: http://core.svn.wordpress.org/trunk@56733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-25 14:03:19 +00:00
Sergey Biryukov
356dd51612 Docs: Document the $wp_hasher global in wp_generate_user_request_key().
Includes adding a description for the global in a few other functions.

Follow-up to [42791], [42964], [43008].

Props viralsampat.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57226


git-svn-id: http://core.svn.wordpress.org/trunk@56732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-24 13:05:21 +00:00
Sergey Biryukov
9b09f2c239 Customize: Remove unused $wpdb global in _wp_customize_publish_changeset().
Follow-up to [38810], [39180], [41192], [41824].

Props viralsampat.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57225


git-svn-id: http://core.svn.wordpress.org/trunk@56731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-23 14:43:22 +00:00
Aaron Jorbin
5e201d4b5b Build/Test: Add Tests for wp_scheduled_delete.
Props pbearne.
Fixes #59938.

Built from https://develop.svn.wordpress.org/trunk@57224


git-svn-id: http://core.svn.wordpress.org/trunk@56730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-22 15:22:24 +00:00
Sergey Biryukov
9b905f9573 Docs: Remove unused $posts global reference in get_attachment_template().
Follow-up to [32628], [32804].

Props viralsampat.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57223


git-svn-id: http://core.svn.wordpress.org/trunk@56729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-22 14:52:21 +00:00
isabel_brison
6e1fe93a1c REST API: check parent and revision ids match before retrieving revision.
Adds a condition to check that parent id matches revision parent id in `WP_REST_Revisions_Controller` `get_item` method.

Props ramonopoly, adamsilverstein, danielbachhuber, spacedmonkey, andrewserong.
Fixes #59875.

Built from https://develop.svn.wordpress.org/trunk@57222


git-svn-id: http://core.svn.wordpress.org/trunk@56728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-22 02:12:21 +00:00
desrosj
45c67f7f11 Build/Test Tools: Add missing MySQL versions for WordPress 5.0.
Follow up to [57218], [57219], [57220].

See #58977.
Built from https://develop.svn.wordpress.org/trunk@57221


git-svn-id: http://core.svn.wordpress.org/trunk@56727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-22 01:38:23 +00:00
desrosj
8a4bef5bcb Build/Test Tools: Run installation tests when data files are updated.
When the JSON data files that supply the PHP/MySQL version support to the installation test workflow are changed, the workflow should be run to confirm the changes are correct. This updates the `path` filtering rules to ensure this happens.

Follow up to [57218], [57219].

See #58977.
Built from https://develop.svn.wordpress.org/trunk@57220


git-svn-id: http://core.svn.wordpress.org/trunk@56726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-22 01:23:21 +00:00