48906 Commits

Author SHA1 Message Date
Pascal Birchler
c3fd114539 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57290 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 12:10:47 +00:00
Peter Wilson
8dee781969 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57289 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-16 04:04:27 +00:00
Pascal Birchler
24531a9afc 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

git-svn-id: https://develop.svn.wordpress.org/trunk@57287 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-15 19:03:27 +00:00
Pascal Birchler
0d109bda84 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

git-svn-id: https://develop.svn.wordpress.org/trunk@57286 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-15 18:55:59 +00:00
Sergey Biryukov
56e16bda31 Comments: Use post_password_required() for comment capability checks.
Follow-up to [56836], [57123].

Fixes #59929.

git-svn-id: https://develop.svn.wordpress.org/trunk@57285 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-15 17:40:06 +00:00
Sergey Biryukov
ba40e28093 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57284 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-14 17:15:49 +00:00
Jb Audras
3d19b28eaf 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.





git-svn-id: https://develop.svn.wordpress.org/trunk@57283 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-14 10:59:48 +00:00
Jb Audras
2c1a6ae742 Twenty Seventeen: Fix wrong text-domain introduced in [57281].
Follow-up to [57281].

Unprops audrasjb.
See #60245.





git-svn-id: https://develop.svn.wordpress.org/trunk@57282 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-14 10:46:09 +00:00
Jb Audras
e3fc05220b 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.





git-svn-id: https://develop.svn.wordpress.org/trunk@57281 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-14 10:42:58 +00:00
Jb Audras
753b41bd4a Docs: Fix wrong inline comment in delete_theme().
Props wildworks.
Fixes #60246.
See #59651.





git-svn-id: https://develop.svn.wordpress.org/trunk@57280 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-14 10:04:38 +00:00
Jb Audras
6089ffbed1 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.





git-svn-id: https://develop.svn.wordpress.org/trunk@57279 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-14 08:40:59 +00:00
Sergey Biryukov
9ae009f06d Tests: Correct the @group annotation in some tests.
Follow-up to [56971], [57146].

See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57278 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-13 16:31:08 +00:00
Sergey Biryukov
454f2bf012 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57277 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-12 19:13:02 +00:00
Sergey Biryukov
c59b7b15ea 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57276 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-12 19:11:34 +00:00
Sergey Biryukov
f03688086f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57275 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-12 19:10:28 +00:00
Joe Dolson
c3639812be 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57274 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-12 17:12:05 +00:00
Joe Dolson
15cbfd58e8 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57273 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-12 16:47:03 +00:00
Joe Dolson
efc2d9ed7c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57272 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-11 17:43:00 +00:00
bernhard-reiter
0bea937295 Modules API: Fix indentation.
Follow-up [57269].

Props mukesh27.
See #56313.

git-svn-id: https://develop.svn.wordpress.org/trunk@57271 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-11 15:50:48 +00:00
Andrea Fercia
c827e32b37 Administration: Accessibility: Improve color contrast of the Copy buttons success message.
Props sabernhardt.
Fixes #60140.


git-svn-id: https://develop.svn.wordpress.org/trunk@57270 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-11 15:50:38 +00:00
bernhard-reiter
ed88ebb55c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57269 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-11 14:45:10 +00:00
Sergey Biryukov
fd42519d7b Tests: Remove some leftover debugging in WP_REST_Revisions_Controller tests.
Follow-up to [57222].

See #59875.

git-svn-id: https://develop.svn.wordpress.org/trunk@57268 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-11 13:16:26 +00:00
Joe Dolson
94b70f1ae0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57267 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 21:57:50 +00:00
Joe Dolson
7e7315ba22 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57266 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 21:12:07 +00:00
Sergey Biryukov
543c9f50cc Editor: Clarify single post and page template descriptions.
Follow-up to [55500].

Props mikachan.
Fixes #60216.

git-svn-id: https://develop.svn.wordpress.org/trunk@57265 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 17:06:51 +00:00
Dennis Snell
7c1c48c141 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57264 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 14:03:57 +00:00
Colin Stewart
eff1a3d24b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57263 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 11:55:04 +00:00
Colin Stewart
3da32969b2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57262 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 11:11:02 +00:00
Isabel Brison
57597d9ccc Editor: fix inline comment formatting.
Correctly formats inline comment in `wp_get_global_stylesheet`.

Follow-up to [57259].

Props mukesh27.
See #60134.


git-svn-id: https://develop.svn.wordpress.org/trunk@57261 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 04:07:32 +00:00
Isabel Brison
ca24196233 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57260 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-10 00:25:19 +00:00
Isabel Brison
788d709a56 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57259 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 23:30:10 +00:00
Aaron Jorbin
18cacc0abb 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57258 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 20:15:30 +00:00
Tonya Mork
52720efece 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57257 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 16:32:14 +00:00
Sergey Biryukov
20f8b300cb Docs: Add a mention of appearance-tools as a possible value for add_theme_support().
Follow-up to [57255].

See #60118.

git-svn-id: https://develop.svn.wordpress.org/trunk@57256 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 11:39:16 +00:00
Isabel Brison
cb564055e0 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57255 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 06:24:44 +00:00
Isabel Brison
15b5be2acd 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@57254 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 06:10:09 +00:00
Isabel Brison
2d764b4101 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57253 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-09 02:43:48 +00:00
Aaron Jorbin
fa421cac11 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57252 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 23:17:48 +00:00
Sergey Biryukov
868f2ef1fd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57251 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 22:42:49 +00:00
Jonathan Desrosiers
71cb3f8615 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57250 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 18:36:56 +00:00
Jonathan Desrosiers
cc645160ab 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57249 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 15:49:27 +00:00
bernhard-reiter
8b2ed2fe62 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57248 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 14:03:40 +00:00
Isabel Brison
b315d4ec01 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57247 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 06:21:02 +00:00
Isabel Brison
f7041f1cbf 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@57246 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-08 06:12:00 +00:00
Sergey Biryukov
4c90a9118a Site Health: Include site ID in debug data on multisite installations.
Follow-up to [44986].

Props sebastienserre, mukesh27.
Fixes #60081.

git-svn-id: https://develop.svn.wordpress.org/trunk@57245 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-07 16:07:47 +00:00
Sergey Biryukov
b9ca649f3b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57244 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-06 12:59:49 +00:00
Colin Stewart
15637fa436 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57243 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-06 09:45:44 +00:00
Sergey Biryukov
cb85d888a0 Tests: Add a @ticket reference for WP_Customize_Manager::trash_changeset_post() test.
Follow-up to [56043], [57238], [57241].

Props mukesh27.
See #60183.

git-svn-id: https://develop.svn.wordpress.org/trunk@57242 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-05 11:38:34 +00:00
Sergey Biryukov
e43275b61c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57241 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-04 11:45:31 +00:00
hellofromTonya
43d2455dc6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57240 602fd350-edb4-49c9-b593-d223f7449a82
2024-01-03 22:11:01 +00:00