Commit Graph

48915 Commits

Author SHA1 Message Date
Peter Wilson
3a36e92c88 Media: Redirect inactive attachement pages for logged-out users.
Ensure logged out users are redirected to the media file when attachment pages are inactive. This removes the `read_post` capability check from the canonical redirects as anonymous users lack the permission.

Follow-up to [56657], [56658], [56711].

Props afercia, aristath, chesio, joppuyo, jorbin, lakshmananphp, poena, sergeybiryukov.
Fixes #59866.
See #57913.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-19 00:44:13 +00:00
Sergey Biryukov
a6c37e6b50 Docs: Fix several typos in inline comments.
Follow-up to [7747], [27419], [55155].

Props shailu25, sabernhardt.
Fixes #60285.
Built from https://develop.svn.wordpress.org/trunk@57309


git-svn-id: http://core.svn.wordpress.org/trunk@56815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-18 22:13:16 +00:00
Felix Arntz
0e4eaa64b5 Build/Test Tools: Fix unstable query tests.
Three `WP_Query` tests could randomly fail due to an undefined order because two test posts were using the exact same `post_date`.

Props boonebgorges, flixos90.
Fixes #60288.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-18 18:40:13 +00:00
Aaron Jorbin
f4b5da2859 Embeds: Ensure the deprecated function print_emoji_styles isn't used
Ensure that the proper new function wp_enqueue_emoji_styles is used in embeds.

Follow-up to: [56194].

Props peterwilsoncc, bobbingwide, hellofromTonya.
Fixes #59892. See: #58775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 21:36:16 +00:00
Pascal Birchler
e09d2034a6 I18N: Fix duplicate determine_locale() tests added in [57286].
Props johnbillion.
See #58696.
Built from https://develop.svn.wordpress.org/trunk@57305


git-svn-id: http://core.svn.wordpress.org/trunk@56811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 18:56:12 +00:00
Sergey Biryukov
2ba732f956 Twenty Twenty-Four: Remove extra tab character inside the text domain.
Follow-up to [57281].

Props sabernhardt.
Fixes #60245.
Built from https://develop.svn.wordpress.org/trunk@57304


git-svn-id: http://core.svn.wordpress.org/trunk@56810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 18:00:16 +00:00
Pascal Birchler
e6a10d45e7 I18N: Prevent PHP warning in WP_Textdomain_Registry.
Prevents a warning upon cache invalidation after language pack updates if the arguments don’t have the expected format.

Follow-up to [57287], [57290], [57298], [57299].

See #58919.
Built from https://develop.svn.wordpress.org/trunk@57303


git-svn-id: http://core.svn.wordpress.org/trunk@56809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 14:32:18 +00:00
audrasjb
b9638e6b00 Docs: Fix var types of parameters in sanitize_option() and sanitize_option_{$option}.
The related docblocks were previously defining `$value` and `$original_value` as if they were of type `string`, but they can also be of other types, like `array`.

Props gerardreches, crstauf, mukesh27.
Fixes #60214.
See #59651.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 09:09:15 +00:00
audrasjb
79e39943a5 Twenty Twenty: Replace wp_date() with date_i18n().
Since WordPress 5.3 it is recommended to use `wp_date()` instead of `date_i18n()`. This changeset replaces the function in Twenty Twenty, with a fallback to `date_i18n()` for old versions of WordPress.

For more info, see https://make.wordpress.org/core/2019/09/23/date-time-improvements-wp-5-3/.

Props sachyya-sachet, joyously, sabernhardt, poena.
Fixes #48589.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 09:01:16 +00:00
audrasjb
1866ae2cb3 Bundled Themes: Typo corrections in various themes docblocks.
Props shailu25.
Fixes #60268.
See #59651.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-17 08:53:15 +00:00
Sergey Biryukov
0a0b0e91cf I18N: Correctly invalidate language file paths in WP_Textdomain_Registry.
Since the cache key in `::get_language_files_from_path()` is based on a path that always includes a trailing slash, the path in `::invalidate_mo_files_cache()` should include the trailing slash as well.

Includes adjusting the test expectations accordingly.

Follow-up to [57287], [57290], [57298].

See #58919.
Built from https://develop.svn.wordpress.org/trunk@57299


git-svn-id: http://core.svn.wordpress.org/trunk@56805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 21:45:12 +00:00
Sergey Biryukov
fb3b7f59e3 Tests: Remove leftover trailingslashit() calls in WP_Textdomain_Registry tests.
Follow-up to [57287], [57290].

See #58919.
Built from https://develop.svn.wordpress.org/trunk@57298


git-svn-id: http://core.svn.wordpress.org/trunk@56804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 21:34:16 +00:00
desrosj
d76e220659 Bundled Themes: Version bump themes affected by #60241.
In order to release the fix for #60241, this bumps the version of the following themes:
- Twenty Seventeen: 3.5
- Twenty Twenty: 2.5
- Twenty Twenty-One: 2.2

Props sabernhardt, jorbin.
See #60267.
Built from https://develop.svn.wordpress.org/trunk@57296


git-svn-id: http://core.svn.wordpress.org/trunk@56802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 19:25:12 +00:00
joedolson
cb1e71aa25 Administration: Remove empty form action attributes.
Remove the `action` attribute in the login language selector, privacy forms, and classic widget forms.

An empty `action` attribute is invalid HTML4 and unsupported HTML5. The `action` attribute is optional, but must have a valid URL when provided.

Props Malae, audrasjb, bartkleinreesink, nicolefurlan, shubhamsedani, costdev, peterwilsoncc, rajinsharwar, joedolson.
Fixes #58226.
Built from https://develop.svn.wordpress.org/trunk@57295


git-svn-id: http://core.svn.wordpress.org/trunk@56801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 17:31:13 +00:00
Felix Arntz
14263ea394 Media: Consider inline image CSS width to backfill width and height attributes.
Prior to this changeset, WordPress core would use the original image size, which in the particular case of inline images would be severely off, as they are usually very small. This could lead to incorrect application of `fetchpriority="high"` and other performance optimizations.

Props westonruter, flixos90, joemcgill, mukesh27.
Fixes #59352.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 17:03:13 +00:00
Pascal Birchler
365a82ffeb I18N: Do not use trailingslashit in WP_Textdomain_Registry.
This usage of `trailingslashit()`, introduced in [57287], is not only redundant, but also discouraged in order to avoid `formatting.php` dependency (which might not always be loaded).

Props SergeyBiryukov.
See #58919.
Built from https://develop.svn.wordpress.org/trunk@57290


git-svn-id: http://core.svn.wordpress.org/trunk@56796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 12:12:17 +00:00
Peter Wilson
2590eeb14c Docs: Format new_admin_email_content placeholders as a list.
Format the email placeholders for the `new_admin_email_content` hook as a list for clarity and to avoid parsing errors in docblock consumers.

Props dd32, shooper, stevenlinx.
Fixes #60262.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-16 04:06:18 +00:00
Pascal Birchler
4d37fc7865 I18N: Cache list of language file paths in WP_Textdomain_Registry.
Loading a list of language file paths using `glob()` can be expensive if involving thousands of files.

Expands scope of `WP_Textdomain_Registry` to cache list of language file paths in object cache and provides a way to invalidate that cache upon translation updates. Plugins can clear the cache using calls such as `wp_cache_delete( 'cached_mo_files_' . md5( $path ), 'translations' );`

Props mreishus, swissspidy
Fixes #58919
Built from https://develop.svn.wordpress.org/trunk@57287


git-svn-id: http://core.svn.wordpress.org/trunk@56793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-15 19:05:14 +00:00
Pascal Birchler
b713c5eb9c Upgrade/Install: Fix JavaScript localization on install page.
Blocks registration causes scripts to be initialized and localized very early, before the current locale has been properly set on the installation page.

This changes `determine_locale()` so that the locale chosen during installation is recognized and loaded earlier, ensuring proper script localization.

Props sabernhardt, NekoJonez, jornp, costdev.
Fixes #58696
Built from https://develop.svn.wordpress.org/trunk@57286


git-svn-id: http://core.svn.wordpress.org/trunk@56792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-15 18:57:14 +00:00
Sergey Biryukov
50670cd102 Comments: Use post_password_required() for comment capability checks.
Follow-up to [56836], [57123].

Fixes #59929.
Built from https://develop.svn.wordpress.org/trunk@57285


git-svn-id: http://core.svn.wordpress.org/trunk@56791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-15 17:42:18 +00:00
Sergey Biryukov
368e2fc5cd Tests: Move wp_parse_list() tests to their own file.
This aims to make the tests more discoverable and easier to expand.

Follow-up to [44546].

See #59647.
Built from https://develop.svn.wordpress.org/trunk@57284


git-svn-id: http://core.svn.wordpress.org/trunk@56790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-14 17:17:15 +00:00
audrasjb
f16bd4cac4 Administration: Introduce new_admin_email_subject filter.
This changeset introduces the `new_admin_email_subject` hook which allow developers to filter the subject of the email sent when a change of site admin email address is attempted.

Props MadtownLems, johnbillion, alexanderkoledov, shooper, Marc_J, nikmeyer, xlthlx, devmuhib, nuhel, audrasjb.
Fixes #59250.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-14 11:01:17 +00:00
audrasjb
4d2c122564 Twenty Seventeen: Fix wrong text-domain introduced in [57281].
Follow-up to [57281].

Unprops audrasjb.
See #60245.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-14 10:48:09 +00:00
audrasjb
7502811c88 Bundled Themes: Add missing text domain to various block patterns.
This changeset adds missing text domain to block patterns in Twenty Sixteen, Twenty Seventeen and Twenty Twenty-Four.

Follow-up to [49583] (Twenty Sixteen), [49584] (Twenty Seventeen) and [56716] (Twenty Twenty-Four.)

Props shailu25, sabernhardt.
Fixes #60245.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-14 10:44:14 +00:00
audrasjb
b6d3cb0838 Docs: Fix wrong inline comment in delete_theme().
Props wildworks.
Fixes #60246.
See #59651.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-14 10:06:18 +00:00
audrasjb
855c1b55d6 Docs: Improve wp_admin_notice() function docblock.
This changeset adds a description for the `attributes` key of `$args` in `wp_admin_notice()`.

Props tmatsuur.
Fixes #59887.




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


git-svn-id: http://core.svn.wordpress.org/trunk@56785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-14 08:42:19 +00:00
Sergey Biryukov
41fe45ced7 Tests: Correct the @group annotation in some tests.
Follow-up to [56971], [57146].

See #59647.
Built from https://develop.svn.wordpress.org/trunk@57278


git-svn-id: http://core.svn.wordpress.org/trunk@56784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-13 16:33:18 +00:00
Sergey Biryukov
32bd6d1a8e Twenty Twenty-One: Revert usage of str_contains() in theme files.
The theme supports WordPress 5.3 or later, while the polyfill for `str_contains()` only exists in WordPress 5.9 or later.

Follow-up to [55988], [57275], [57276].

Props poena.
Fixes #60241.
Built from https://develop.svn.wordpress.org/trunk@57277


git-svn-id: http://core.svn.wordpress.org/trunk@56783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-12 19:16:07 +00:00
Sergey Biryukov
93a75784b7 Twenty Twenty: Revert usage of str_contains() in theme files.
The theme supports WordPress 4.7 or later, while the polyfill for `str_contains()` only exists in WordPress 5.9 or later.

Follow-up to [55988], [57275].

Props poena.
See #60241.
Built from https://develop.svn.wordpress.org/trunk@57276


git-svn-id: http://core.svn.wordpress.org/trunk@56782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-12 19:14:08 +00:00
Sergey Biryukov
91004791b9 Twenty Seventeen: Revert usage of str_contains() in theme files.
The theme supports WordPress 4.7 or later, while the polyfill for `str_contains()` only exists in WordPress 5.9 or later.

Follow-up to [55988].

Props poena.
See #60241.
Built from https://develop.svn.wordpress.org/trunk@57275


git-svn-id: http://core.svn.wordpress.org/trunk@56781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-12 19:12:14 +00:00
joedolson
9ddc1f9761 Users: Remove periods in checkbox labels for consistency.
Remove periods at the ends of three checkbox labels on add new user screen.

Checkboxes in the WordPress admin generally do not have periods.

Props pratikthink, joedolson.
Fixes #43814.
Built from https://develop.svn.wordpress.org/trunk@57274


git-svn-id: http://core.svn.wordpress.org/trunk@56780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-12 17:14:14 +00:00
joedolson
ea9bf63acc Media: Fix inaccurate docs for wp_attachment_is().
Correct the documentation for the `$type` parameter to accept file extensions as well as attachment type groups. Also fix the return description to reflect the change.

Props nirav7707, joedolson.
Fixes #59698.
Built from https://develop.svn.wordpress.org/trunk@57273


git-svn-id: http://core.svn.wordpress.org/trunk@56779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-12 16:49:16 +00:00
joedolson
1ee473633a Administration: Remove invalid attribute maxlength on number input.
Remove the `maxlength` attribute on screen options number of items per page input. Previously kept due to input inconsistencies in IE 11 and Edge, this invalid usage is no longer needed. IE 11 is no longer supported, and Edge now behaves according to specifications.

Props Arena94, afercia, joedolson.
Fixes #40610.
Built from https://develop.svn.wordpress.org/trunk@57272


git-svn-id: http://core.svn.wordpress.org/trunk@56778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-11 17:44:12 +00:00
Bernhard Reiter
ffcd954ef8 Modules API: Fix indentation.
Follow-up [57269].

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


git-svn-id: http://core.svn.wordpress.org/trunk@56777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-11 15:53:22 +00:00
Andrea Fercia
48a4a51b91 Administration: Accessibility: Improve color contrast of the Copy buttons success message.
Props sabernhardt.
Fixes #60140.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-11 15:52:14 +00:00
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