Commit Graph

36456 Commits

Author SHA1 Message Date
Sergey Biryukov
3dc3dc25e9 Docs: Document the $post global in comment feed templates.
Follow-up to [18716].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-04 12:41:10 +00:00
desrosj
68f21dbbb6 Build/Test Tools: Fix the precommit:emoji script.
GitHub recently sunset support for Subversion, causing the `precommit:emoji` Grunt script to break. Since there’s no direct replacement for `svn ls` in Git, this has been replaced with a query through the GitHub CLI.

This also adds a step in the workflow that tests the build process to run the `precommit:emoji` script to ensure no changes to built files are missed when updating the Twemoji library in the future.

Follow up to [57626].

Props kraftbj, peterwilsoncc, swissspidy.
Fixes #60520. See #57600.
Built from https://develop.svn.wordpress.org/trunk@57758


git-svn-id: http://core.svn.wordpress.org/trunk@57259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-04 11:25:12 +00:00
desrosj
47714609e4 Build/Test Tools: Update 3rd-party GitHub Actions.
This updates the following GitHub Actions to their latest versions:

- `shivammathur/setup-php` from `2.29.0` to `2.30.0`
- `actions/cache` from `4.0.0` to `4.0.1`
- `ramsey/composer-install` from `2.2.0` to `3.0.0`
- `codecov/codecov-action` from `4.0.1` to `4.1.0`

This should address the remaining notices caused by running Node.js 16.x on GitHub Actions runner machines in `trunk`.

Follow up to [57197], [57362], [57655].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-04 11:06:13 +00:00
Sergey Biryukov
048e8a0cc0 Docs: Document some globals in wp-admin/setup-config.php.
Follow-up to [29669], [29705], [32642], [45737], [47230], [51477].

Props upadalavipul, sabernhardt.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57756


git-svn-id: http://core.svn.wordpress.org/trunk@57257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-03 18:23:14 +00:00
joedolson
c7a48687b5 Media: Accessibility: Copy attachment properties on site icon crop.
Add parity between site icon, custom header, and default image crop behaviors. [53027] fixed a bug where alt text and caption were not copied on custom headers, but did not apply that change in any other context.

Deprecate the `create_attachment_object` method in the `Wp_Site_Icon` and `Custom_Image_Header` classes and replace that functionality with the new function `wp_copy_parent_attachment_properties()` to improve consistency.

Props afercia, rcreators, jorbin, joedolson, huzaifaalmesbah, shailu25, swissspidy, mukesh27.
Fixes #60524.
Built from https://develop.svn.wordpress.org/trunk@57755


git-svn-id: http://core.svn.wordpress.org/trunk@57256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 20:15:13 +00:00
Pascal Birchler
3658bca7fd Editor: do not expose protected post meta fields in block bindings.
Ignores meta keys which are considered protected or not registered to be shown in the REST API. Adds tests.

Props santosguillamot, swissspidy, gziolo, xknown, peterwilsoncc.
Fixes #60651.
Built from https://develop.svn.wordpress.org/trunk@57754


git-svn-id: http://core.svn.wordpress.org/trunk@57255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 14:13:09 +00:00
Pascal Birchler
7013400867 Build/Test Tools: Add initial tests for the WP_Filesystem_Direct class.
Since `WP_Filesystem_Direct` is by far the most used filesystem abstraction class, this facilitates future changes with sufficient test coverage.

Props swissspidy, costdev, mukesh27.
Fixes #57774.
Built from https://develop.svn.wordpress.org/trunk@57753


git-svn-id: http://core.svn.wordpress.org/trunk@57254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 14:07:08 +00:00
Sergey Biryukov
690fe018e1 Docs: Document the $xmlrpc_logging global in logIO().
Follow-up to [1348], [19935].

Props viralsampat, upadalavipul, sabernhardt.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57752


git-svn-id: http://core.svn.wordpress.org/trunk@57253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 13:49:06 +00:00
Pascal Birchler
2a334ede98 Editor: Simplify sanitization code path in WP_Theme_JSON after [57496]
Removes the custom `WP_Theme_JSON::is_assoc()` method again in favor of the existing `wp_is_numeric_array()` helper function.

Props mmaattiiaass, costdev, swissspidy, spacedmonkey.
Fixes #60360.
Built from https://develop.svn.wordpress.org/trunk@57751


git-svn-id: http://core.svn.wordpress.org/trunk@57252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 13:41:05 +00:00
Pascal Birchler
02d60b4eb4 Query: Remove leading whitespace from certain database queries.
Unintended leading whitespace at the beginning of a raw MySQL query led to unexpected behavior such as broken pagination. Eliminating said whitespace avoids that.

Adds unit tests to prevent regressions.

Props wpfed, swissspidy, ironprogrammer, tadamarketing, afercia.
Fixes #56841.
Built from https://develop.svn.wordpress.org/trunk@57750


git-svn-id: http://core.svn.wordpress.org/trunk@57251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 13:38:07 +00:00
Sergey Biryukov
1a6de4d845 Build/Test Tools: Use a consistent parameter name between rand_str() and rand_long_str().
Follow-up to [36272], [50265].

Props harsh175, sabernhardt.
Fixes #60401.
Built from https://develop.svn.wordpress.org/trunk@57749


git-svn-id: http://core.svn.wordpress.org/trunk@57250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 12:55:07 +00:00
Sergey Biryukov
8b2e4d0877 Docs: Document some globals in wp-settings.php.
Follow-up to [18532], [18993], [27158], [38362].

Props upadalavipul, viralsampat, sabernhardt.
See #60021.
Built from https://develop.svn.wordpress.org/trunk@57748


git-svn-id: http://core.svn.wordpress.org/trunk@57249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-02 10:47:15 +00:00
Sergey Biryukov
d3a22f538b Docs: Correct the placement of @global tags in wp-includes/admin-bar.php.
Follow-up to [38810], [56209].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-01 22:43:11 +00:00
joedolson
bee2debbd7 Customize: Accessibility: Label menu subitems when updating menus.
Fix missing subitem indicator when menu items in the Customizer are children of parent menu items & add menu item original title to button text. Adds parity with the admin menu editor and fixes a bug where the button text was 'untitled' if the menu item title had not been edited.

Props designsimply, afercia, celloexpressions, kushang78, joedolson, rcreators.
Fixes #32728.
Built from https://develop.svn.wordpress.org/trunk@57746


git-svn-id: http://core.svn.wordpress.org/trunk@57247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-03-01 16:21:10 +00:00
Pascal Birchler
1692cf3469 Quick/Bulk Edit: Ensure the “All” checkbox is properly toggled in certain scenarios.
When removing a single item from the bulk edit box or when adding more items, the “All” checkboxes at the top and bottom of the posts list table should be properly toggled.

Props hiteshtalpada, oglekler, webcommsat, ugyensupport, chaion07, Toru.
Fixes #59121.
Built from https://develop.svn.wordpress.org/trunk@57745


git-svn-id: http://core.svn.wordpress.org/trunk@57246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 22:02:15 +00:00
Sergey Biryukov
bbe1b7338c Tests: Use assertSame() in post meta revisioning 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.

Includes correcting the test class name.

Follow-up to [56714].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 20:02:16 +00:00
Pascal Birchler
e265c6d012 Interactivity API: Revert [57742] pending a Gutenberg package update.
This function can only be renamed after updating Gutenberg npm packages, as some of the core blocks already use this function.

See #60575.
Built from https://develop.svn.wordpress.org/trunk@57743


git-svn-id: http://core.svn.wordpress.org/trunk@57244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 14:30:12 +00:00
Pascal Birchler
fbeaad601c Interactivity API: Rename data_wp_context() to wp_interactivity_data_wp_context().
Increases clarity about where the function belongs to, bringing it in line with other related functions.

Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz.
Fixes #60575.
Built from https://develop.svn.wordpress.org/trunk@57742


git-svn-id: http://core.svn.wordpress.org/trunk@57243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 12:28:09 +00:00
Pascal Birchler
2cf42cec66 Privacy: Update default privacy page content to use latest block markup.
Avoids “Updated Block” warnings being logged to the console.

Props 254volkan, swissspidy.
Fixes #60530.
Built from https://develop.svn.wordpress.org/trunk@57741


git-svn-id: http://core.svn.wordpress.org/trunk@57242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 12:17:08 +00:00
youknowriad
f67cb7370e Editor: Prevent infinite loops when filtering the font library folder.
Changing the font library is something we expect hosts to perform.
It's important that we make this filter as seemless as possible.
This commit prevents a potential infinite loop caused by calling wp_get_upload_dir() within the font_dir filter.

Props mmaattiiaass, ironprogrammer, costdev, swissspidy.
Fixes #60652.
Built from https://develop.svn.wordpress.org/trunk@57740


git-svn-id: http://core.svn.wordpress.org/trunk@57241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 10:17:07 +00:00
youknowriad
12d738c64c Bundled Theme: Fix focus outline in Twenty Twenty-Four in the editor.
Improvements made to the focus outline style for Twenty Twenty-Four caused a regression in the focus outlines of the block editor. This commit solves the regressions by reducing the CSS specificity while keeping the improvements.

Follow-up to [57554].

Props wildworks, poena, sabernhardt, youknowriad, oglekler.
Fixes #60535.
Built from https://develop.svn.wordpress.org/trunk@57739


git-svn-id: http://core.svn.wordpress.org/trunk@57240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-29 10:08:15 +00:00
dmsnell
91e7a067a8 HTML API: Remove superfluous type-coercing empty() check.
When returning modifiable text in the HTML API, if the text segment
coerces to `false` inside `empty()`, then an empty string has been
returned instead of the string itself. For example, the text node in the
following HTML snippet:

{{{
    <div>0</div>
}}}

In this patch the `empty()` check is removed. The purpose of the original
check was to skip further processing if the text content is empty, but
the check is not needed and the additioanl processing is minimal.
Removing the code removes the defect and leaves a cleaner method in its
absence.

Developed in https://github.com/WordPress/wordpress-develop/pull/6199

Follow-up to [57348]
Follow-up to #60170


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


git-svn-id: http://core.svn.wordpress.org/trunk@57239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-28 21:15:12 +00:00
Sergey Biryukov
9c91e0e91c Tests: Expand wp_parse_id_list() unit tests.
Includes:
* Moving pre-existing `wp_parse_id_list()` tests to their own file.
* Merging new and pre-existing `wp_parse_slug_list()` tests.
* Using named data provider in `wp_parse_list()` tests.

Follow-up to [25170], [40044], [44546], [57284], [57725].

Props pbearne, mukesh27, SergeyBiryukov.
Fixes #60218. See #60217, #59647.
Built from https://develop.svn.wordpress.org/trunk@57737


git-svn-id: http://core.svn.wordpress.org/trunk@57238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-28 18:11:09 +00:00
costdev
e21be71af2 Plugin Dependencies: Don't assume API response has a slug property.
Previously, `WP_Plugin_Dependencies::get_dependency_api_data()` attempted to set an array key using the `slug` property returned in a Plugins API response. However, the Plugins API response is filterable and may not contain a `slug` property.

Earlier in the method, a local `$slug` variable is used as a key for the same array.

For safety and consistency, this replaces array key references to `$information->slug` with `$slug`.

Follow-up to [57545].

Props pbiron, afragen, swissspidy, costdev.
Fixes #60540.
Built from https://develop.svn.wordpress.org/trunk@57736


git-svn-id: http://core.svn.wordpress.org/trunk@57237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-28 18:04:09 +00:00
Pascal Birchler
542c23092d Tests: Address capitalization and docblock inconsistencies in some test class names.
Follow-up to [57060], [57718], [57725], [57726], [57727], [57728], [57733].

Props swissspidy, costdev.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@57735


git-svn-id: http://core.svn.wordpress.org/trunk@57236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-28 09:46:08 +00:00
Pascal Birchler
fc91a29646 I18N: Improve docs for pomo library classes.
Props subrataemfluence, pento, hrshahin.
Fixes #44424.
Built from https://develop.svn.wordpress.org/trunk@57734


git-svn-id: http://core.svn.wordpress.org/trunk@57235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-28 09:31:12 +00:00
Sergey Biryukov
fb4f209a8c Tests: Correct capitalization and fix typos in some test class names.
Follow-up to [57060], [57718], [57725], [57726], [57727], [57728].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 23:07:08 +00:00
hellofromTonya
6ab3caeb71 General: Revert r57698 for WP_List_Util::pluck().
r57698 caused a regression for arrays of objects which have magic methods and dynamic properties. A fix is identified.

However, a deeper dive discovered additional scenarios which will require a different fix.

Reverting gives more time for resolving these scenarios and more soak time to discover if there are others.

Props dd32, jamescollins, swissspidy.
See #59774.
Built from https://develop.svn.wordpress.org/trunk@57732


git-svn-id: http://core.svn.wordpress.org/trunk@57233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 22:38:15 +00:00
Joe McGill
5f2e2f85f7 Docs: Improve docblock for WP_Block_Patterns_Registry::register.
This documents the new `filePath` property supported by `WP_Block_Patterns_Registry::register` and also updates the property name to camel case formatting to be consistent with other block pattern properties.

Props thekt12, spacedmonkey, joemcgill.
See #59532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 21:05:11 +00:00
Aaron Jorbin
845a537170 Site Icon/Customizer: Update strings in customizer to align with options-general.php.
This uses the new strings for alt text and site icon description that were introduced in [57713] as a part of #54370.

The strings are translated in PHP and then use `wp.i18n.sprintf` since the alt text strings live in a PHP file even though they are output as part of a template that is used in JavaScript.

Props westonruter, swissspidy, jorbin.
Fixes #60641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 20:21:14 +00:00
Pascal Birchler
023f523bda Build/Test Tools: Add unit tests for _delete_option_fresh_site().
Props pbearne, costdev, desrosj.
Fixes #57191.
Built from https://develop.svn.wordpress.org/trunk@57729


git-svn-id: http://core.svn.wordpress.org/trunk@57230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 19:09:04 +00:00
Pascal Birchler
a871d84dec Build/Test Tools: Add unit tests for maybe_hash_hex_color().
Props pbearne.
Fixes #60272.
Built from https://develop.svn.wordpress.org/trunk@57728


git-svn-id: http://core.svn.wordpress.org/trunk@57229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 18:53:05 +00:00
Pascal Birchler
0a5ac751d2 Build/Test Tools: Add unit tests for sanitize_hex_color_no_hash().
Props pbearne.
Fixes #60271.
Built from https://develop.svn.wordpress.org/trunk@57727


git-svn-id: http://core.svn.wordpress.org/trunk@57228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 18:51:04 +00:00
Pascal Birchler
49bc4f9e77 Build/Test Tools: Add unit tests for sanitize_hex_color().
Props pbearne.
Fixes #60270.
Built from https://develop.svn.wordpress.org/trunk@57726


git-svn-id: http://core.svn.wordpress.org/trunk@57227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 18:49:12 +00:00
Pascal Birchler
69a2411a72 Build/Test Tools: Add unit tests for wp_parse_slug_list().
Props pbearne.
Fixes #60217.
Built from https://develop.svn.wordpress.org/trunk@57725


git-svn-id: http://core.svn.wordpress.org/trunk@57226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 17:17:09 +00:00
Pascal Birchler
4d821203f6 Build/Test Tools: Add unit tests for absint().
Props pbearne.
Fixes #60101.
Built from https://develop.svn.wordpress.org/trunk@57724


git-svn-id: http://core.svn.wordpress.org/trunk@57225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 17:15:13 +00:00
Pascal Birchler
569bff821c Post WordPress 6.5 Beta 3 version bump.
Built from https://develop.svn.wordpress.org/trunk@57723


git-svn-id: http://core.svn.wordpress.org/trunk@57224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 16:26:09 +00:00
Pascal Birchler
3eed37d157 WordPress 6.5 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@57722


git-svn-id: http://core.svn.wordpress.org/trunk@57223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 16:14:11 +00:00
youknowriad
d3204b3e7e Editor: Update Packages with the latest bug fixes for 6.5 beta 3
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59394/

Props get_dave, youknowriad.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57721


git-svn-id: http://core.svn.wordpress.org/trunk@57222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 14:48:23 +00:00
youknowriad
e88758878e Font face resolver: print font faces from font families defined in all theme.json origins.
This commit updates the theme.json style generation to allow a font family name to be repeated across theme.json origins (default, theme, custom).

Props mmaattiiaass, hellofromtonya, arthur791004, ironprogrammer.
Fixes #60605.
Built from https://develop.svn.wordpress.org/trunk@57720


git-svn-id: http://core.svn.wordpress.org/trunk@57221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 12:06:10 +00:00
Pascal Birchler
4fbb3d6975 Docs: Improve wording and add missing full stops in a few docblocks.
Props shailu25, sabernhardt.
Fixes #60323.
Built from https://develop.svn.wordpress.org/trunk@57719


git-svn-id: http://core.svn.wordpress.org/trunk@57220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 10:29:11 +00:00
Pascal Birchler
139a4c2dc8 Build/Test Tools: Add PHPUnit test for the _mce_set_direction function.
The new test checks the functionality of the text direction setting, ensuring it correctly switches between `rtl` and `ltr` options.

Props pbearne, SergeyBiryukov.
Fixes #60219.
Built from https://develop.svn.wordpress.org/trunk@57718


git-svn-id: http://core.svn.wordpress.org/trunk@57219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 10:25:05 +00:00
Pascal Birchler
29a2c3a05a Editor: add shadow.defaultPresets to appearance tools opt-ins.
Props madhudollu.
Fixes #60633.
Built from https://develop.svn.wordpress.org/trunk@57717


git-svn-id: http://core.svn.wordpress.org/trunk@57218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 10:22:11 +00:00
youknowriad
9f0595ab4a Editor: Check for null values in Theme JSON to cater for blockGap.
When resolving theme.json preset variables, add a check to make sure the value is not empty before we run it through strpos() and preg_match_all().

Props ramonopoly, mukesh27, get_dave.
Fixes #60613.
Built from https://develop.svn.wordpress.org/trunk@57716


git-svn-id: http://core.svn.wordpress.org/trunk@57217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-27 10:15:13 +00:00
ryelle
f274631e5c Help/About: Update the About page for 6.5.
Introducing the new content & design for the 6.5 About page & related pages. This style is simplified, with no header images, and brings back the illustrations from previous versions for Contribute, Freedoms, and Privacy.

This also includes a fix for heading hierarchy on the Get Involved page.

Props laurlittle, dansoschin, benjamin_zekavica, richtabor, joen, annezazu, swissspidy, marybaum, ryelle, huzaifaalmesbah.
See #60303.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 23:51:12 +00:00
Pascal Birchler
8cdbaf4aeb Upgrade/Install: Improve localized strings related to plugin/theme installation and activation.
Adds context to strings where applicable to disambiguate them, coherently throughout the admin. Also improves some of the strings introduced in [57545] to ease localization.

Props swissspidy, costdev.
Fixes #60630. See #22316.
Built from https://develop.svn.wordpress.org/trunk@57714


git-svn-id: http://core.svn.wordpress.org/trunk@57215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 20:35:08 +00:00
Aaron Jorbin
7173bb9a94 Site icon: Polish up Site Icon on the general settings screen.
This fixes a number of issues, chief among them:
- Updates to the site title are reflected in the preview.
- Improve alt text for preview
- Make string describing site icon more succinct.
- Add inline documentation to JavaScript

Props kebbet, jorbin, swissspidy, afercia, mukesh27, alexstine, jameskoster, andraganescu.
Fixes #54370.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 20:18:09 +00:00
Sergey Biryukov
0eb0449db0 Twenty Nineteen: Further adjust CSS selectors used to change the primary color.
This aims to make the file, button, quote, pullquote, and search block selectors work on multiple WordPress versions.

Follow-up to [57637].

Props poena, mukesh27.
Fixes #59922.
Built from https://develop.svn.wordpress.org/trunk@57712


git-svn-id: http://core.svn.wordpress.org/trunk@57213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 16:27:12 +00:00
Pascal Birchler
60b72e87d7 Login and Registration: Slash email address when updating an existing user.
Addresses an issue with password reset keys when the email address contains special characters such as apostrophes.

Props emirpprime, rajinsharwar, fnpen, hellofromTonya, oglekler, nicolefurlan.
Fixes #52529.
Built from https://develop.svn.wordpress.org/trunk@57711


git-svn-id: http://core.svn.wordpress.org/trunk@57212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 10:43:06 +00:00
Pascal Birchler
4096795c61 Tests: Update incorrect assertion message added in [57366].
Props david.binda.
Fixes #60358.
Built from https://develop.svn.wordpress.org/trunk@57710


git-svn-id: http://core.svn.wordpress.org/trunk@57211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 10:29:13 +00:00
joedolson
28c8ff0d1b Code Standards: Fix alignment in tests.
Fix variable alignment in changed tests. Follow-up to [r57708]. Because I edited the wrong local copy when I fixed that.

Props joedolson.
See #34668.
Built from https://develop.svn.wordpress.org/trunk@57709


git-svn-id: http://core.svn.wordpress.org/trunk@57210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 01:00:09 +00:00
joedolson
059878b96d Toolbar: Accessibility: Keyboard navigation for screen readers.
Change the admin toolbar to have `role="menu"` and support opening for screen readers. Remove screen reader only log out link and collapse duplicate profile links into one link. This is an imperfect solution to a complex problem in the adminbar, but the lack of screen reader access to submenus is a major accessibility problem, and this fix provides access, even if the mechanism is imperfect.

Screen reader log out added in [21452].

Props abletec, Cheffheid, sabernhardt, alexstine, joedolson, afercia, sparklingrobots, danieltj, swissspidy, netweb, dionysous.
Fixes #34668, #43633.
Built from https://develop.svn.wordpress.org/trunk@57708


git-svn-id: http://core.svn.wordpress.org/trunk@57209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-26 00:52:10 +00:00
Peter Wilson
25ae4b9733 Upgrade/Install: Normalize major versions in is_wp_version_compatible().
Modify `is_wp_version_compatible()` to return the expected result for major WordPress versions formatted as either `x.x` or `x.x.0` (for example `6.5` and `6.5.0`).

The WordPress project currently documents major version numbers in both formats leading to confusion for developers using the `is_wp_version_compatible()` function. As the PHP function `version_compare()` treats `x.x` and `x.x.0` as different version numbers this leads to unexpected results in the WP function.

This change removes a trailing `.0` from major version numbers to account for the WordPress project using the two formats interchangeably.

Props afragen, azaozz, costdev, joemcgill, jorbin, kkmuffme, sessioncookiemonster, swissspidy, wazeter.
Fixes #59448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-25 22:17:13 +00:00
Sergey Biryukov
448030d355 Tests: Use assertSame() in new_admin_email_subject filter test.
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 [57283].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-25 15:27:12 +00:00
Sergey Biryukov
08d311ae83 Tests: Use assertSame() in comment_exists() 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 [34456], [34460].

Props costdev.
See #59655.
Built from https://develop.svn.wordpress.org/trunk@57705


git-svn-id: http://core.svn.wordpress.org/trunk@57206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-24 19:30:12 +00:00
Pascal Birchler
f5487209cb I18N: Do not set translation controller locale in bootstrap.
Removes the `WP_Translation_Controller::set_locale()` call from `wp-settings.php`, which happened before the current user was loaded.
That caused translations to be missing when the site locale and user locale were different, as the translation was associated with the wrong locale.

Turns out this call was not needed at all, as the locale will be set/updated when calling `load_textdomain()` anyway.

Props oglekler.
See #59656.
Built from https://develop.svn.wordpress.org/trunk@57704


git-svn-id: http://core.svn.wordpress.org/trunk@57205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-24 09:48:13 +00:00
Joe McGill
c5f64356af Editor: Improve PHPUnit tests for block pattern registration.
This is a followup to [57683], which adds additional unit test coverage to ensure block pattern content is not loaded from files during registration, but instead when those patterns are accessed. This also improves the `set_up` and `tear_down` methods for the `Tests_Blocks_wpBlockPattersRegistry` test class to ensure that any modifications made to registered blocks during the tests are reset after each test.

Props thekt12, joemcgill.
See #59532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-23 16:55:13 +00:00
Pascal Birchler
bad9e9669d Build/Test Tools: Update JSHint config to remove deprecated options.
Removes deprecated options that no longer have any effect, and updates the targeted ES version in line with WordPress’ browser support.

This change mostly allows new code to properly use trailing commas, as added by the Prettier formatter.

Future efforts should rather go towards adopting ESLint for code formatting, see #31823.

Props netweb.
Fixes #28236.
Built from https://develop.svn.wordpress.org/trunk@57702


git-svn-id: http://core.svn.wordpress.org/trunk@57203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-23 10:38:13 +00:00
Sergey Biryukov
096df041b6 Docs: Add a @since note for $preferred_ext parameter in wp_mime_type_icon().
Follow-up to [57687].

See #31352.
Built from https://develop.svn.wordpress.org/trunk@57701


git-svn-id: http://core.svn.wordpress.org/trunk@57202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-23 09:43:12 +00:00
gziolo
4084114eab Editor: Add id to the supported Image's binding attributes
Syncs changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/59194.

Fixes #60577.
Props kevin940726, ankit-k-gupta, sonali844, harshalkadu, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-23 09:20:12 +00:00
K. Adam White
9a3210759f Script Loader: Inject wp_remove_surrounding_empty_script_tags function name in returned error string using sprintf.
The name of this function should not be editable by the translator in the internationalized return error string.

Props naoki0h, swissspidy, kirasong.
Fixes #60590.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-23 05:45:12 +00:00
hellofromTonya
648cab6abe General: Handle missing field in WP_List_Util::pluck().
Handles when the `$field` (i.e. key or property) is missing in one of the `$input_list` items by checking the key (array) or property (object) exists before using it for assignment.

Resolves the following bugs:

* a PHP warning for undefined key|property.
* `null` being set for that array or object within the returned list.

The changes resolve the issues in both `WP_List_Util::pluck()` (if invoked directly) and `wp_list_pluck()`.

Also includes an additional test for the scenario where the `wp_list_pluck()` `$index_key` is not `null`, the `$field` is missing in one of the `$input_list` items.

Follow-up to [55423], [51663], [42527], [38928].

Props iamarunchaitanyajami, davidbinda, hellofromTonya, helgatheviking.
Fixes #59774.
Built from https://develop.svn.wordpress.org/trunk@57698


git-svn-id: http://core.svn.wordpress.org/trunk@57199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 21:52:10 +00:00
Pascal Birchler
0006dd82d8 Upgrade/Install: Improve plugin install button appearance.
Fixes a misaligned spinner icon when opening the plugin details information in a new tab rather than the modal, and then installing the plugin in that window.

Props huzaifaalmesbah, zunaid321, swissspidy.
Fixes #60494.
Built from https://develop.svn.wordpress.org/trunk@57697


git-svn-id: http://core.svn.wordpress.org/trunk@57198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 18:04:09 +00:00
Pascal Birchler
601999951c Upgrade/Install: Fix upgrade count decrement on Updates page.
Fixes a JavaScript error that caused the update count bubble not to decrement when updating a plugin.

Props nendeb55, swissspidy.
Fixes #60589.
Built from https://develop.svn.wordpress.org/trunk@57696


git-svn-id: http://core.svn.wordpress.org/trunk@57197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 17:58:08 +00:00
Pascal Birchler
e86c1971d4 Shortcodes: Fix small typo in inline documentation.
Props shailu25, mukesh27.
Fixes #60603.
Built from https://develop.svn.wordpress.org/trunk@57695


git-svn-id: http://core.svn.wordpress.org/trunk@57196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 15:53:13 +00:00
Sergey Biryukov
117fdc548e Coding Standards: Correct alignment in wp_get_attachment_image_src().
This resolves a WPCS warning:
{{{
Equals sign not aligned with surrounding statements
}}}
so that the output of `composer format` is clean.

Follow-up to [57687].

See #59650.
Built from https://develop.svn.wordpress.org/trunk@57694


git-svn-id: http://core.svn.wordpress.org/trunk@57195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 11:56:10 +00:00
Pascal Birchler
292af16439 Docs: Improve docblock for $x_redirect_by param in wp_redirect().
The `$x_redirect_by` parameter is supported by `wp_redirect()` and `wp_safe_redirect()` to set the `X-Redirect-By` header.
It can be modified via the `x_redirect_by` filter.

This updates the docblock to clarify that `false` can be passed to disable sending the header, which was previously undocumented behavior.

Props kkmuffme, swissspidy.
Fixes #60209.
Built from https://develop.svn.wordpress.org/trunk@57693


git-svn-id: http://core.svn.wordpress.org/trunk@57194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 10:58:12 +00:00
Pascal Birchler
299b8ee2a1 Docs: Use more inclusive term in rest_filter_response_fields docblock.
See #59651.
Built from https://develop.svn.wordpress.org/trunk@57692


git-svn-id: http://core.svn.wordpress.org/trunk@57193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-22 09:54:08 +00:00
joedolson
f95f3e8334 Media: Fix broken media modal following [57688]
Fix undefined TypeError overlooked in [57688].

Props antpb, swissspidy, joedolson.
Fixes #58973.
Built from https://develop.svn.wordpress.org/trunk@57691


git-svn-id: http://core.svn.wordpress.org/trunk@57192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 20:57:12 +00:00
joedolson
83ba8ad091 Twenty Twenty-Three: Update XX-large font-sizes for accessibility.
Update XX-large font-sizes so that the responsive typography meets the minimum ratio between the min and max font-sizes of 0.61 required for accessible responsive typography.

Props mikachan, ryokuhi, poena, dhruvishah2203, joedolson.
Fixes #58603.
Built from https://develop.svn.wordpress.org/trunk@57690


git-svn-id: http://core.svn.wordpress.org/trunk@57191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 20:08:06 +00:00
hellofromTonya
5c49b1cc7b Build/Test Tools: Revert r57684.
Changes to the `test_readme_mariadb_version()` test were made in an effort to stabilize the connection tests and CI failures. After the changeset, all multisite tests CI jobs connected and passed, but oddly all single site tests CI jobs repeatedly and consistently failed.

Reverting to unblock the CI jobs while continued investigation happens.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 20:06:12 +00:00
joedolson
53f5646b75 Media: Prevent Media Library sidebar from showing with no actions.
Fix an issue where the actions sidebar in the media library could appear when there are no relevant actions available.

Props sruthi89, nithi22, ivanzhuck, dhruvishah2203, joemcgill, ukdrahul, joedolson, shailu25.
Fixes #58973.
Built from https://develop.svn.wordpress.org/trunk@57688


git-svn-id: http://core.svn.wordpress.org/trunk@57189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 19:46:08 +00:00
joedolson
5fd767d87d Media: Ensure wp_mine_type_icon() returns expected file type.
Add an argument to `wp_mime_type_icon()` to control the file type returned. Following [57638], there are two file formats in the media icons directory. Different systems would pull up different files by default dependent on the order loaded into the cached array, causing intermittent test failures and unpredictable behavior.

Function update allows core usages to always return the `.svg` while maintaining backwards compatibility for any extended usage that expects a `.png`. Follow up to [57638].

Also handles a missed case in media list view.

Props SergeyBiryukov, sabernhardt, joedolson, antpb.
Fixes #31352.
Built from https://develop.svn.wordpress.org/trunk@57687


git-svn-id: http://core.svn.wordpress.org/trunk@57188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 19:29:04 +00:00
Pascal Birchler
4ee39b4d76 Editor: Ensure font collection metadata can be properly localized.
Updates `wp_register_font_collection()` and `WP_Font_Collection` so that only font families can be loaded from a file or URL.
All metadata, such as name, description, and list of font categories, needs to be passed directly in PHP so that it can be properly localized.

Props swissspidy, mmaattiiaass, grantmkin, youknowriad.
Fixes #60509.
Built from https://develop.svn.wordpress.org/trunk@57686


git-svn-id: http://core.svn.wordpress.org/trunk@57187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 19:27:14 +00:00
Joe McGill
716b7d4d26 Themes: Use original template paths when switching blogs.
This fixes a bug introduced by [57129] and [56635] in which deprecating the previous  `TEMPLATEPATH` and `STYLESHEETPATH` constants in favor of `get_template_directory()` and `get_stylesheet_directory()` functions caused the active theme template path to change when using `switch_to_blog()`.

This introduces a new function, `wp_set_template_globals()`, which is called during the bootstrap process to store the template paths to new globals values `$wp_template_path` and `$wp_stylesheet_path`. This restores behavior to how things worked prior to [56635] but retains the ability for template values to be reset for better testability.

Related #18298, #60025.

Props joemcgill, flixos90, mukesh27, swissspidy, manfcarlo, metropolis_john, jeremyfelt.
Fixes #60290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 19:26:08 +00:00
costdev
308a42fe40 Tests: Query mariadb.org instead of mariadb.com in README test.
The `test_readme_mariadb_version()` test method has been experiencing HTTP failures that result in test and CI failures.

This switches to mariadb.org which may result in more stable test runs.

Some additional safety assertions are also included.

Props hellofromTonya, SergeyBiryukov, costdev.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@57684


git-svn-id: http://core.svn.wordpress.org/trunk@57185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 19:01:11 +00:00
Joe McGill
f599968388 Editor: Load pattern content only when used.
Previously, the content for all registered patterns would get loaded on each request when the patterns are registered. Instead, this stores the path the pattern file during registration and reads the content the first time the pattern is used, which is a performance optimization.

Props thekt12, spacedmonkey, gziolo, aristath, joemcgill.
Fixes #59532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 18:50:07 +00:00
Pascal Birchler
26673814df Script Loader: Fix small typo in wp_remove_surrounding_empty_script_tags docblock.
Props shailu25.
Fixes #60591.
Built from https://develop.svn.wordpress.org/trunk@57682


git-svn-id: http://core.svn.wordpress.org/trunk@57183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 18:39:09 +00:00
hellofromTonya
6d1ed1715b Export: Include featured image for posts or pages.
This bugfix resolves an issue in `export_wp()` with featured images.

When using Tools > Export and selecting either Posts or Pages (with or without a specific author), the resulting XML file now includes a XML item for each post|page's featured image attachment and its metadata.

Uses same chunking (for performance) and code patterns from existing code in the same file.

Adds a new test class for `export_wp()` with code coverage specific to this bugfix.

Follow-up to [34326], [14444], [6375], [6335].

Props billseymour, nateallen, petitphp, hellofromTonya, duck_, jane, rcain, jghazally, jghazally, smub, batmoo, axwax, creativeslice, dlocc, nacin, wonderboymusic, ganon, SergeyBiryukov, hlashbrooke, chriscct7, fischfood, hifidesign, ankit-k-gupta, 5um17, shailu25, huzaifaalmesbah, mukesh27.
Fixes #17379.
Built from https://develop.svn.wordpress.org/trunk@57681


git-svn-id: http://core.svn.wordpress.org/trunk@57182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 18:15:14 +00:00
Sergey Biryukov
daf4121ae2 Tests: Use assertSame() in wp_insert_post() 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 [34085], [35183], [48937], [53782], [53785], [53883], [54402].

Props costdev.
See #59655.
Built from https://develop.svn.wordpress.org/trunk@57680


git-svn-id: http://core.svn.wordpress.org/trunk@57181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 17:36:12 +00:00
costdev
f023a4a635 Plugins: Output plugin card elements in the order they're displayed.
Previously, the notice for listing dependencies in a plugin card was styled with the CSS `order` properties. This created a mismatch between the visual order and DOM order of elements in the plugin card.

For accessibility, visual order and DOM order must always match when they affect meaning and functionality.

This removes the CSS `order` properties and outputs the dependencies notice later, making the visual and DOM order match. Some unused/empty CSS is also removed.

Follow-up to [57545].

Props afercia, afragen, bosskhj, huzaifaalmesbah, mukesh27, costdev.
Fixes #60488.
Built from https://develop.svn.wordpress.org/trunk@57679


git-svn-id: http://core.svn.wordpress.org/trunk@57180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 17:34:13 +00:00
John Blackbourn
a6c914d46b Docs: Correct the URLs that document the available images for MySQL and MariaDB for the local development environment.
See #59930

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


git-svn-id: http://core.svn.wordpress.org/trunk@57179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 14:34:12 +00:00
gziolo
7889a84379 Editor: Add fallback for block version when registering block script module
It aligns implementation with how regular scripts are handled.

Follow-up [57437].
See #60233.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 11:20:10 +00:00
Bernhard Reiter
3b828d85af Block Hooks: Make test a bit easier to read.
Follow-up [57668].
Props gziolo.
See #60580.
Built from https://develop.svn.wordpress.org/trunk@57676


git-svn-id: http://core.svn.wordpress.org/trunk@57177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 10:49:15 +00:00
audrasjb
46e8b6fc71 Editor: Allow symlinks in directories provided to get_block_asset_url().
This changeset allows using symbolic links for `editorScript` and `editorStyle` in `register_block_type()`. This adds `realpath` to template and stylesheet in `get_block_asset_url()` to ensure returning canonicalized absolute pathnames.

Follow-up to [56683].

Props antonlukin, spacedmonkey, maxpertici.
Fixes #59175.
See #58525.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 09:38:12 +00:00
costdev
754fa3b6f9 Tests: Mock API response in Plugin Dependencies tests.
Previously, the tests for `WP_Plugin_Dependencies::get_dependency_names()` performed an API request to WordPress.org. If an HTTP failure occurred when connecting to WordPress.org, this could trigger test failures.

This mocks the API response to prevent HTTP failures from triggering test failures.

Follow-up to [57545].

Props swissspidy, peterwilsoncc, costdev.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@57674


git-svn-id: http://core.svn.wordpress.org/trunk@57175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-21 01:07:12 +00:00
Sergey Biryukov
f99d9988f4 Tests: Use assertSame() in wp_read_image_metadata() 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 [49/tests], [198/tests], [34374], [48937], [52269].

Props costdev.
See #59655.
Built from https://develop.svn.wordpress.org/trunk@57673


git-svn-id: http://core.svn.wordpress.org/trunk@57174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 18:16:09 +00:00
audrasjb
ab1f3859e3 Post WordPress 6.5 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@57671


git-svn-id: http://core.svn.wordpress.org/trunk@57172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 17:22:07 +00:00
audrasjb
e12048f2d2 WordPress 6.5 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@57670


git-svn-id: http://core.svn.wordpress.org/trunk@57171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 17:06:06 +00:00
youknowriad
e34c2c3a94 Editor: Update Packages with the latest bug fixes for 6.5 beta 2 (Round 2).
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59208

See #60315.
Built from https://develop.svn.wordpress.org/trunk@57669


git-svn-id: http://core.svn.wordpress.org/trunk@57170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 15:41:18 +00:00
Bernhard Reiter
52170ea9d8 Block Hooks: Allow hooked_block filters to return null.
Allow returning null from the `hooked_block` and `hooked_block_{$hooked_block_type}` filters to suppress a hooked block from being inserted. This is required to allow extenders conditionally inserting a hooked block based on e.g. the value of an attribute of the anchor block.

Props swissspidy, gziolo, joshuatf, tomjcafferkey.
Fixes 60580.
Built from https://develop.svn.wordpress.org/trunk@57668


git-svn-id: http://core.svn.wordpress.org/trunk@57169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 15:22:08 +00:00
desrosj
3b057ac0e2 Build/Test Tools: Bump the Node.js version for Codespaces.
This bumps the version of Node.js used in GitHub Codespaces from 16 to 20.

Follow up to [57212].

Props itschristiandale, huzaifaalmesbah.
Fixes #60555.
Built from https://develop.svn.wordpress.org/trunk@57667


git-svn-id: http://core.svn.wordpress.org/trunk@57168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 15:06:07 +00:00
Bernhard Reiter
3963b8d98f Block Hooks: Fix actual/expected order in test assertions.
In test assertions for the `set_ignored_hooked_blocks_metadata` function, the actual value was erroneously passed as the first argument, and the expected value as the second. This changeset rectifies this by swapping the arguments.

Follow-up [57627].
See #60506.
Built from https://develop.svn.wordpress.org/trunk@57666


git-svn-id: http://core.svn.wordpress.org/trunk@57167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 13:25:11 +00:00
Pascal Birchler
51dfbf93ae Build/Test Tools: Fix docblocks in a couple of test files to use two asterisks.
Props mahnewr, rudlinkon,kraftbj, audrasjb, mukesh27.
Fixes #60513.
Built from https://develop.svn.wordpress.org/trunk@57665


git-svn-id: http://core.svn.wordpress.org/trunk@57166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 12:42:13 +00:00
youknowriad
a4aeb71603 Editor: Fix instance element styles for links applying to buttons.
These changes fix the selector used by block instance element styles for links so they do not get incorrectly applied to buttons.

Props aaronrobertshaw, freewebmentor, mukesh27.
Fixes #60557.
Built from https://develop.svn.wordpress.org/trunk@57664


git-svn-id: http://core.svn.wordpress.org/trunk@57165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 11:22:09 +00:00
youknowriad
433fd94980 Editor: Update Packages with the latest bug fixes for 6.5 beta 2.
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59197

Props youknowriad, get_dave.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57663


git-svn-id: http://core.svn.wordpress.org/trunk@57164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 11:16:26 +00:00
youknowriad
63656c178b Tests: Synchronize Theme.JSON unit test between Core and Gutenberg.
Merges the changes from Core and Gutenberg for the following tests:

- WP_REST_Global_Styles_Controller_Test
- Tests_Theme_wpThemeJsonResolver
- Tests_Theme_wpThemeJsonSchema
- Tests_Theme_wpThemeJson

This will help ensure the stability of the theme.json style generation.

Props ajlende, scruffian, aaronrobertshaw, get_dave, youknowriad.
Fixes #60387.
Built from https://develop.svn.wordpress.org/trunk@57662


git-svn-id: http://core.svn.wordpress.org/trunk@57163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 09:55:09 +00:00
Pascal Birchler
900aa7bf89 Script Loader: Add hooks for script modules and interactivity API only on after_setup_theme.
Ensures that `wp_is_block_theme()` is not called too early before the themes are fully setup.
This addresses an issue where a parent theme was mistakenly marked as being missing.

Props scruffian, youknowriad, swissspidy, poena, dennysdionigi, bgardner, westonruter.
Fixes #60411.
Built from https://develop.svn.wordpress.org/trunk@57661


git-svn-id: http://core.svn.wordpress.org/trunk@57162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 09:43:07 +00:00
Pascal Birchler
b440a4f84f Block Hooks: Introduce a new hooked_block filter.
This is a counterpart to the dynamic `hooked_block_{$block_type}` filter introduced in [57354],
which makes it easier to modify all hooked blocks prior to insertion.

Also adds the hooked block type as an additional argument to both filters for consistency.

Props bernhard-reiter, swissspidy.
Fixes #60574.
Built from https://develop.svn.wordpress.org/trunk@57660


git-svn-id: http://core.svn.wordpress.org/trunk@57161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 09:27:06 +00:00
Pascal Birchler
3394082032 REST API: Pass correct context to embedded items.
Fixes a regression introduced in [57623] where navigation embed items were missing `raw` property values.

Props mamaduka, swissspidy, youknowriad, timothyblynjacobs.
Fixes #43439.
Built from https://develop.svn.wordpress.org/trunk@57659


git-svn-id: http://core.svn.wordpress.org/trunk@57160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 09:10:09 +00:00
costdev
69d6a9e5a0 Plugin Dependencies: Remove auto-deactivation and bootstrapping logic.
Automatic deactivation of dependents with unmet dependencies requires a write operation to the database. This was performed during Core's bootstrap, which risked the database and cache becoming out-of-sync on sites with heavy traffic.

No longer loading plugins that have unmet requirements has not had a final approach decided core-wide, and is still in discussion in #60491 to be handled in a future release.

The `plugin_data` option, used to persistently store plugin data for detecting unmet dependencies during Core's bootstrap, is no longer needed.

Follow-up to [57545], [57592], [57606], [57617].

Props dd32, azaozz, swissspidy, desrosj, afragen, pbiron, zunaid321, costdev.
Fixes #60457. See #60491, #60510, #60518.
Built from https://develop.svn.wordpress.org/trunk@57658


git-svn-id: http://core.svn.wordpress.org/trunk@57159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 07:27:06 +00:00
youknowriad
134d389842 Editor: Format and sanitize font family names according the CSS spec.
This fixes two bugs in the font library. 
 - Fonts using special characters were not being rendered properly in the frontend.
 - Allows the ability to use generic() in font family names.

Props mmaattiiaass, nithins53, kafleg, vivekawsm, swissspidy, audrasjb.
Fixes #60537.
Built from https://develop.svn.wordpress.org/trunk@57657


git-svn-id: http://core.svn.wordpress.org/trunk@57158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-20 07:11:14 +00:00
Sergey Biryukov
93eaafe9c1 Tests: Use assertSame() in WP_REST_Navigation_Fallback_Controller 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 [56052].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-19 15:07:13 +00:00
Pascal Birchler
0a1b7ed030 Build/Test Tools: Update third-party GitHub Actions.
This updates the following third-party GitHub Actions to their latest versions:

* Updates `actions/setup-node` from 4.0.1 to 4.0.2
* Updates `actions/upload-artifact` from 4.3.0 to 4.3.1

Props desrosj, thelovekesh.
See #59805.
Built from https://develop.svn.wordpress.org/trunk@57655


git-svn-id: http://core.svn.wordpress.org/trunk@57156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-19 08:59:13 +00:00
Peter Wilson
b70ebbddf9 Script Loader: Switch to JavaScript translations.
Update JavaScript files for tag suggestions and the TinyMCE link plugin to use client side translations. This allows for `_n()` to be used for strings requiring singular and plural versions in which the correct form is only known client side.

Props audrasjb, chaion07, costdev, hellofromtonya, johnbillion, marybaum, nicolefurlan, oglekler, rebasaurus, rsiddharth, sergeybiryukov, shaampk1, shahariaazam, swissspidy, tobifjellner.
Fixes #48244.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-18 22:16:14 +00:00
Sergey Biryukov
378e9abb73 Tests: Use assertSame() in WP_Query tests involving ::$max_num_pages property.
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 [48937], [54402], [54768], [57648].

Props costdev.
See #58683, #59655.
Built from https://develop.svn.wordpress.org/trunk@57653


git-svn-id: http://core.svn.wordpress.org/trunk@57154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-18 19:01:06 +00:00
Pascal Birchler
0f6fc935fe Editor: Prevent PHP warning when parsing duotone hue values.
Props jacobcassidy, rahmohn, mukesh27.
Fixes #59496.
Built from https://develop.svn.wordpress.org/trunk@57652


git-svn-id: http://core.svn.wordpress.org/trunk@57153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-18 14:59:07 +00:00
Pascal Birchler
f76da9b636 Canonical: Rename admin_canonical_url filter to wp_admin_canonical_url.
This improves consistency as it matches the name of the function it is used in.

Props peterwilsoncc, shailu25.
Fixes #59545.
Built from https://develop.svn.wordpress.org/trunk@57651


git-svn-id: http://core.svn.wordpress.org/trunk@57152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-18 14:45:13 +00:00
Sergey Biryukov
9e5c828e97 Tests: Use assertSame() in get_comment_pages_count() 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 [27055], [48937], [54402], [57244], [57648].

Props costdev.
See #58683, #59655.
Built from https://develop.svn.wordpress.org/trunk@57650


git-svn-id: http://core.svn.wordpress.org/trunk@57151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-17 16:34:11 +00:00
Pascal Birchler
41532d5638 Interactivity API: Skip instead of bail out if HTML contains SVG or MATH.
Addresses an issue with server-side processing of directives when there is e.g. an SVG icon a navigation menu.

Props cbravobernal, westonruter, dmsnell, swissspidy.
Fixes #60517.
Built from https://develop.svn.wordpress.org/trunk@57649


git-svn-id: http://core.svn.wordpress.org/trunk@57150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-17 15:28:04 +00:00
Pascal Birchler
f97698702d General: Consistently cast return value to int in functions that use ceil().
The return value of `ceil()` is still of type `float` as the value range of `float` is usually bigger than that of `int`.

Props crstauf, audrasjb.
Fixes #58683.
Built from https://develop.svn.wordpress.org/trunk@57648


git-svn-id: http://core.svn.wordpress.org/trunk@57149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-17 15:24:08 +00:00
Pascal Birchler
0ab7276020 General: Further improve language in SimplePie code comments.
Follow-up to [57584].

Props manfcarlo.
Fixes #60247.
Built from https://develop.svn.wordpress.org/trunk@57647


git-svn-id: http://core.svn.wordpress.org/trunk@57148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-17 13:25:10 +00:00
Pascal Birchler
61f8789d9f Interactivity API: Use string instead of object in data-wp-interactive attribute.
The server directive processing, integrated in [57563], supports a simplified format for passing the namespace to `data-wp-interactive`.

Props cbravobernal, gziolo.
Fixes #60542.
See #60356.
Built from https://develop.svn.wordpress.org/trunk@57646


git-svn-id: http://core.svn.wordpress.org/trunk@57147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-17 13:19:16 +00:00
Peter Wilson
112f61146d Canonical: Limit post types searched by redirect_guess_404_permalink().
Limit the post types searched in `redirect_guess_404_permalink()` to public, searchable post types. This prevents redirects to 404 pages and the exposure of private post type slugs.

Props francescocarlucci, peterwilsoncc, rajinsharwar.
Fixes #59795.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 23:34:11 +00:00
John Blackbourn
eadb61542a Docs: Various improvements and corrections to inline documentation.
See #59651

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


git-svn-id: http://core.svn.wordpress.org/trunk@57145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 21:47:12 +00:00
John Blackbourn
d98b1b3db4 REST API: Clarify documentation for methods and filters relating to REST API search endpoints.
See #59651

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


git-svn-id: http://core.svn.wordpress.org/trunk@57144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 21:35:12 +00:00
Sergey Biryukov
a3e9476a21 Twenty Twenty-Four: Increase the color contrast of the Ember style variation.
This ensures that the color contrast passes the WCAG AA contrast ratio for normal text.

Follow-up to [56951].

Props poena, Anlino, richtabor, huzaifaalmesbah, shailu25, itpathsolutions.
Fixes #60459.
Built from https://develop.svn.wordpress.org/trunk@57642


git-svn-id: http://core.svn.wordpress.org/trunk@57143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 13:15:07 +00:00
gziolo
c0ed2c6f06 Editor: Merge uses_context defined by block bindings sources with block types
Adds logic that fixes the limitation for souces by allowing merging the `uses_context` defined by block bindings sources into supported block types. Each source defines the context it needs and it is added to the block types that are using the block bindings API.

Fixes #60525.
Props santosguillamot, gziolo, czapla, thekt12.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 12:55:11 +00:00
Pascal Birchler
e9a933c390 Build/Test Tools: Ignore src/wp-content/fonts from version control.
Props ironprogrammer, afercia.
Fixes #60337.
Built from https://develop.svn.wordpress.org/trunk@57640


git-svn-id: http://core.svn.wordpress.org/trunk@57141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 11:57:11 +00:00
Pascal Birchler
71ae6e2787 I18N: Prevent incorrect language dropdown entries when there are .l10n.php files.
In [57516], the just-in-time translation loading logic was enhanced to support cases where only `.l10n.php` translation exist but no `.mo` or `.po` files. This caused a slight regression in `get_available_languages()`, which uses the list of files to populate the language dropdown list on the settings page.

To address this, the new file extension is now properly stripped off, and the resulting file list is de-duplicated. New test files are added to allow the existing tests to cover this new scenario.

See #59656.
Fixes #60553.
Built from https://develop.svn.wordpress.org/trunk@57639


git-svn-id: http://core.svn.wordpress.org/trunk@57140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-16 10:28:12 +00:00
joedolson
ae111b182a Media: Replace media icon images with SVG.
Replace the `.png` files in use for media library type icons with `.svg` versions. Improves sharpness, especially on high resolution screens and devices.

Props iseulde, melchoyce, joemcgill, sabernhardt, huzaifaalmesbah, wonderboymusic, ocean90, karmatosed, boemedia, bosskhj, joedolson.
Fixes #31352.
Built from https://develop.svn.wordpress.org/trunk@57638


git-svn-id: http://core.svn.wordpress.org/trunk@57139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-15 23:49:10 +00:00
Sergey Biryukov
c454b4fa56 Twenty Nineteen: Update selectors used to change the primary color in the Customizer.
The `.editor-block-list__block` class was removed in WordPress 5.4. It is now replaced with a selector that works in the current versions and is backward compatible.

Follow-up to [43842].

Props poena, faisal03, ashikur698.
Fixes #59922.
Built from https://develop.svn.wordpress.org/trunk@57637


git-svn-id: http://core.svn.wordpress.org/trunk@57138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-15 22:18:10 +00:00
desrosj
944765af6f Build/Test Tools: Remove more unnecessary direct dependencies.
This removes the `is-plain-object`, `memize`, `path-to-regexp`, and `tslib`.

These were also introduced in [56065] and have been integrated into the build process. Instead, these are now installed as peer dependencies through the `@/wordpress/*` packages that actually require them.

Follow up to [57634].

Props swissspidy.
See #59658.
Built from https://develop.svn.wordpress.org/trunk@57636


git-svn-id: http://core.svn.wordpress.org/trunk@57137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-15 17:02:15 +00:00
desrosj
d4a8067885 Build/Test Tools: Update several dependencies.
This updates the following dependencies:
- `@pmmmwh/react-refresh-webpack-plugin` from `0.5.5` to `0.5.11`.
- `autoprefixer` from `10.4.16` to `10.4.17`.
- `copy-webpack-plugin` from `11.0.0` to `12.0.2`.
- `cssnano` from `6.0.1` to `6.0.3`.
- `dotenv` from `16.3.1` to `16.4.4`.
- `dotenv-expand` from `10.0.0` to `11.0.3`.
- `postcss` from `8.4.31` to `8.4.35`.
- `sass` from `1.69.3` to `1.70.0`.
- `sinon` from `16.0.3` to `16.1.3`.
- `source-map-loader` from `4.0.1` to `5.0.0`.
- `terser-webpack-plugin` from `5.3.9` to `5.3.10`.
- `wait-on` from `7.0.1` to `7.2.0`.
- `webpack` from `5.89.0` to `5.90.2`.

Additionally, `npm audit fix` has been run.

See #59658.
Built from https://develop.svn.wordpress.org/trunk@57635


git-svn-id: http://core.svn.wordpress.org/trunk@57136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-15 16:53:15 +00:00
desrosj
268ad5114f Build/Test Tools: Remove unnecessary direct dependencies.
This removes the `@emotion/is-prop-valid`, `@emotion/memoize`, and `framer-motion` packages as direct dependencies.

These were introduced in [56065], but do not appear to have been integrated into the build process. Instead, these are now installed as peer dependencies to the `@wordpress/block-editor` and `@wordpress/components` packages.

Props gziolo, huzaifaalmesbah.
See #59658.
Built from https://develop.svn.wordpress.org/trunk@57634


git-svn-id: http://core.svn.wordpress.org/trunk@57135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-15 14:49:16 +00:00
Sergey Biryukov
b37e80c59f Coding Standards: Allow $newlineEscape parameter in WP_Text_Diff_Renderer_inline::_splitOnWords().
This resolves a WPCS warning:
{{{
Variable "$newlineEscape" is not in valid snake_case format, try "$newline_escape"
}}}

The `WP_Text_Diff_Renderer_inline` class extends the `Text_Diff_Renderer_inline` class from the `Text_Diff` package and should have the same parameters as the parent class method, per the Task 1 section of ticket #51553.

Follow-up to [7747], [55163].

See #59650.
Built from https://develop.svn.wordpress.org/trunk@57633


git-svn-id: http://core.svn.wordpress.org/trunk@57134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-14 19:27:09 +00:00
hellofromTonya
ffc53f010f Editor: Check PHP 8.1.12 for woff/woff2 mime types in WP_Font_Utils.
Fixes a bug where fonts could not be installed in PHP 8.1.0 through 8.1.11 due to incorrect MIME type assignment.

While `WP_Font_Utils::get_allowed_font_mime_types()` conditionally sets the MIME type for woff and woff2, it incorrectly checks against PHP 8.1.0. The MIME type change did not occur until PHP 8.1.12.

References:

* [https://github.com/php/php-src/issues/8805 PHP-src: finfo returns wrong mime type for woff/woff2 files].
* [https://www.php.net/ChangeLog-8.php#8.1.12 PHP 8.1.12 changelog].
* Tests: Adjust the expected mime type for WOFF fonts on PHP 8.1.12+ [55463].
* [https://github.com/WordPress/gutenberg/pull/59015 Gutenberg PR 59015].

Follow-up to [57539].

Props costdev, kafleg, hellofromTonya.
Fixes 60536.
Built from https://develop.svn.wordpress.org/trunk@57632


git-svn-id: http://core.svn.wordpress.org/trunk@57133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-14 17:28:13 +00:00
hellofromTonya
5e52fa8477 Bundled Themes: Support pullquote block typography options in Twenty Twenty-One.
Pullquotes were not inheriting the correct styling from the block
editor. This commit resolves the issue by supporting typography options.

1. The `font-family` variable remains on the paragraph (both editor and front) so the citation continues to use the body font even when the site redefines `var(--pullquote--font-family)`.

2. The `font-size`, `font-style`, `font-weight`, `letter-spacing` and `line-height` are set on the Pullquote block to allow overriding with the sidebar settings. Then the block's paragraph element inherits those styles.

3. When the settings do not give a custom `line-height` from the sidebar, these stylesheets set the paragraph to `var(--pullquote--line-height)` instead of inheriting 1.6 from the block styles. This patch uses `:where()` to avoid increasing specificity.

Moving styles from the paragraph element to the block should not affect the citation, which has had its own styles for `font-size`, `font-style`, `font-weight` and `letter-spacing`.

Follow-up to [56959], [56451], [55089], [55088], [49574], [49320], [49216].

Props sabernhardt, poena, darshitrajyaguru97, harshgajipara, shailu25, skyakash12.
Fixes #57854.
Built from https://develop.svn.wordpress.org/trunk@57631


git-svn-id: http://core.svn.wordpress.org/trunk@57132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 21:24:10 +00:00
audrasjb
53b99200d6 Post WordPress 6.5 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@57630


git-svn-id: http://core.svn.wordpress.org/trunk@57131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 16:30:09 +00:00
audrasjb
264f13c841 WordPress 6.5 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@57629


git-svn-id: http://core.svn.wordpress.org/trunk@57130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 16:12:07 +00:00
davidbaumwald
99396f6c86 REST API: Revert the refactor of global styles endpoints in REST API in [57624].
[57624] introduced some E2E test failures which are the result of an incompatibility with the Gutenberg plugin.

Props jorbin, spacedmonkey, swissspidy, hellofromTonya, youknowriad, costdev.
See #60131.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 15:13:17 +00:00
Bernhard Reiter
d1f4f405a8 Block Hooks: Set ignoredHookedBlocks metadata upon saving.
Decouple hooked blocks insertion from setting the `metadata.ignoredHookedBlocks` attribute on anchor blocks, and perform the latter step upon saving a template or template part to the database. This ensures that anchor blocks that have been newly added to a template (or part) on the client side will also get `ignoredHookedBlocks` metadata set correctly, thus preserving editor/front-end parity. Hooked block insertion, on the other hand, will continue to happen upon ''reading'' a template (or part).

Props gziolo, tomjcafferkey.
Fixes #60506.
Built from https://develop.svn.wordpress.org/trunk@57627


git-svn-id: http://core.svn.wordpress.org/trunk@57128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 15:12:09 +00:00
desrosj
e05dc67dc6 Emoji: Replace twitter/twemoji with jdecked/twemoji.
After a chaotic change of ownership, the `twitter/twemoji` library is now considered abandoned.

After waiting for this moment to arise, a fork was created by several former employees who had maintained the library which lives at `jdecked/twemoji` on GitHub.

This switches out where the underlying source code comes from for the library, and applies the 15.0.3 update, which adheres to the Unicode 15 spec and adds support for all Emoji introduced in Emoji 15.0.

This does not update the underlying `precommit:emoji` Grunt script responsible for updating `formatting.php`. After GitHub recently sunset support for SVN, the current process needs to be replaced with a new one. This will be handled in #60520.

Let the masses rejoice for the 🐦‍⬛ singing in the dead of night, secure 🛜, aromatic 🫚, and some very silly 🪿🪿.

RIP Twemoji. Long live Twemoji!

Props peterwilsoncc, kraftbj, jeffpaul, azaozz, dd32, hareesh-pillai, jorbin.
Fixes #57600.
Built from https://develop.svn.wordpress.org/trunk@57626


git-svn-id: http://core.svn.wordpress.org/trunk@57127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 14:36:07 +00:00
Aaron Jorbin
ae4f12d406 Multisite: Escape urls and html elements in wp-activate.php
When WPMU was merged in [12603], the intent was to go back and make sure everything was escaped. This completes that intent.

Props rafiq91, rajinsharwar, costdev, oglekler, nicolefurlan, ryan, peterwilsoncc.
Fixes #57336.
See #11644.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 14:19:09 +00:00
spacedmonkey
de3ee0fde6 REST API: Refactor global styles endpoints in REST API to register with post type.
Updated the global styles endpoints in the REST API to extend from existing posts and revisions controllers. This reduces duplicated code and inconsistencies. The revisions controller is now a subclass of the WP_REST_Revisions_Controller. Related redundant methods were removed and schema generation and collection parameters were adjusted to suit the global styles context. Updated permission checks, constructor, and collection parameters accordingly. This change allows for easy override of these classes using the `register_post_type_args` filter. 

Props ramonopoly, spacedmonkey, mukesh27.
Fixes #60131.
Built from https://develop.svn.wordpress.org/trunk@57624


git-svn-id: http://core.svn.wordpress.org/trunk@57125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 14:09:08 +00:00
spacedmonkey
9b3acbae25 REST API: Set maximum 'per_page' for embedded REST API requests.
This enhancement refines the REST API server to automatically establish the maximum 'per_page' value for embedded objects, adhering to the endpoint's schema when not explicitly defined in the request. This adjustment elevates the limit from the default of 10 items to 100 items, significantly improving the likelihood of receiving the complete dataset of embedded objects.

Props manyourisms, lpawlik, spacedmonkey, kadamwhite, TimothyBlynJacobs. 
Fixes #43439.
Built from https://develop.svn.wordpress.org/trunk@57623


git-svn-id: http://core.svn.wordpress.org/trunk@57124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:48:08 +00:00
costdev
0ab75261f4 Upgrade/Install: Only check plugins whose data is already stored.
In [57592], some `update_option()` calls were removed from bootstrapping. However, this also removed a check to ensure an array key existed, and populated it if not.

Scaffolding tests by WP-CLI revealed that a plugin in the `active_plugins` option may not have data already stored within the `plugin_data` option, causing a PHP warning for an undefined array key. This data will be added the next time `get_plugins()` is called.

This adds a condition to ensure the requirements checks are only performed on plugins whose data is already stored in the `plugin_data` option.

Follow-up to [57592].

Props swissspidy, hellofromTonya, costdev.
Fixes #60461.
Built from https://develop.svn.wordpress.org/trunk@57622


git-svn-id: http://core.svn.wordpress.org/trunk@57123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:30:06 +00:00
Pascal Birchler
2a78e6400c Twenty Twenty-Four: Wrap header navigation block in row.
Makes it easier to add siblings using the block hooks API without them being treated as flex items due to its parent being a row block.

Props tomjcafferkey, poena.
Fixes #60410.
Built from https://develop.svn.wordpress.org/trunk@57621


git-svn-id: http://core.svn.wordpress.org/trunk@57122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:27:05 +00:00
costdev
b927ce0028 Plugins: Disable bulk actions for dependencies.
The intended behaviour of Plugin Dependencies is that dependencies cannot be deleted until their dependents are deleted.

While the 'Delete' link was removed from the plugin row, the bulk actions checkbox remained enabled, allowing for deletion of dependencies through bulk actions.

This was unintended behaviour and the bulk actions checkbox is now disabled as intended.

Follow-up to [57545].

Props johnbillion, afragen, knutsp, huzaifaalmesbah, mukesh27, costdev.
Fixes #60471.
Built from https://develop.svn.wordpress.org/trunk@57620


git-svn-id: http://core.svn.wordpress.org/trunk@57121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:24:10 +00:00
youknowriad
8cd718b010 Editor: Update Packages with the latest bug fixes for 6.5 beta1.
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/58964

Props youknowriad, get_dave.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57619


git-svn-id: http://core.svn.wordpress.org/trunk@57120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:12:17 +00:00
Sergey Biryukov
046fe2802c General: Some minor adjustments for the Site Icon option:
* Improve buttons flow on small viewports, taking longer translations into account.
* Make `alt` attributes translatable.
* Remove unused `id` attributes.

Follow-up to [57602].

Props kebbet, afercia, mukesh27.
See #54370.
Built from https://develop.svn.wordpress.org/trunk@57618


git-svn-id: http://core.svn.wordpress.org/trunk@57119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:09:07 +00:00
Joe McGill
46221f3bb5 Upgrade/Install: Avoid unnecessary db operations for plugin dependencies.
The Plugin Dependencies feature saves a list of any plugins that have been disabled due to unmet dependencies to a transient in order to give user feedback in the admin about what has taken place. This ensures that the DB operations to write this transient is skipped if there are no dependent plugins to deactivate.

Props joemcgill, costdev, afragen.
Fixes #60518.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 13:02:08 +00:00
Sergey Biryukov
62afd089f3 Docs: Correct the duplicate hook reference for image_save_progressive filter.
Follow-up to [57607], [57614].

Props skithund.
See #21668.
Built from https://develop.svn.wordpress.org/trunk@57616


git-svn-id: http://core.svn.wordpress.org/trunk@57117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 12:26:11 +00:00
costdev
f209cd1410 Plugins: Only set card button status on plugin install pages.
Previously, the `setCardButtonStatus()` JS function was called when a card had the ID 'plugin-information-footer'. However, the card will only exist on plugin install pages. This caused a failure when updating plugins from the plugin row on `plugins.php` due to an undefined `$card` variable.

This adds a guard to ensure that the current page is one of the plugin install pages, preventing the error and allowing plugin updates from the `plugins.php` rows to work as expected.

Follow-up to [57545].

Props Presskopp, huzaifaalmesbah, krupajnanda, hellofromTonya, krupalpanchal, costdev.
Fixes #60521.
Built from https://develop.svn.wordpress.org/trunk@57615


git-svn-id: http://core.svn.wordpress.org/trunk@57116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 12:06:10 +00:00
Sergey Biryukov
f361c6f157 Docs: Revisit the canonical location for the image_save_progressive filter.
This aims to bring consistency with the `image_make_intermediate_size` filter, which has the main DocBlock in `WP_Image_Editor_GD::_save()` and a duplicate hook reference in `WP_Image_Editor_Imagick::_save()`.

Follow-up to [57607].

See #21668.
Built from https://develop.svn.wordpress.org/trunk@57614


git-svn-id: http://core.svn.wordpress.org/trunk@57115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 11:54:13 +00:00
Pascal Birchler
c2558a5eaa Coding Standards: Add missing fullstop to docblocks in wp-includes/vars.php
Follow-up to [57612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 10:11:09 +00:00
Pascal Birchler
47df0cc10e Permalinks: Detect Caddy web server support.
Support pretty permalinks when Caddy server is detected.

Props swissspidy, mukesh27, sadpencil, cfinnberg, viliamkopecky.
Fixes #41877.
Built from https://develop.svn.wordpress.org/trunk@57612


git-svn-id: http://core.svn.wordpress.org/trunk@57113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 10:08:14 +00:00
spacedmonkey
9df3515569 REST API: Improve error handling in REST meta fields
This update modifies the error handling mechanism in the REST API meta fields functionality. Instead of halting execution and returning on the first encountered error, it now collects all errors in a WP_Error object and continues execution. Thus, this enhancement enables handling and displaying of multiple errors in a single response, improving the debugging process. 

Props TimothyBlynJacobs, spacedmonkey, hellofromTonya, oglekler. 
Fixes #48823.
Built from https://develop.svn.wordpress.org/trunk@57611


git-svn-id: http://core.svn.wordpress.org/trunk@57112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 09:57:08 +00:00
spacedmonkey
31a092799f REST API: Provide detailed error data in REST API response.
When the fatal error handler is triggered within a REST API request, it currently utilizes wp_die to display a specially formatted error response. However, crucial information captured by the fatal error handler, such as the exact line where the error occurred, is not included in the response due to potential security concerns, such as leaking file paths.

To address this limitation and aid developers in debugging, this enhancement introduces the inclusion of error data in the response when the `WP_DEBUG_DISPLAY` constant is set to true. This additional data, appended under the new key error_data, will facilitate more thorough debugging for REST API errors.

Props ecc, spacedmonkey, TimothyBlynJacobs, rcorrales.
Fixes #60014.
Built from https://develop.svn.wordpress.org/trunk@57610


git-svn-id: http://core.svn.wordpress.org/trunk@57111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 09:10:08 +00:00
audrasjb
d6728e990e Twenty Twenty-Three: Include Latin-extended characters in DM Sans font files.
This changeset fixes a bug where a replacement font was used in some languages, like Croatian.

Props cvorko, sabernhardt, poena, dingo_d.
Fixes #59008.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 08:55:17 +00:00
spacedmonkey
9e92ed15bd Themes: Add 'theme_files' cache group to block pattern cache operations.
Use 'theme_files' cache group for block pattern caches. Previously, block pattern cache data was not stored in a cache group and used the default group. This new cache group, is setup as a global cache group, meaning that sites using multisite, will have a single cache for block pattern data per theme. This change also no longer invalidate block pattern caches in multisite instances, meaning block pattern caches can be shared between sites on a network, meaning less repeated data in the object cache. 

Props spacedmonkey, flixos90, joemcgill.
Fixes #60120.
Built from https://develop.svn.wordpress.org/trunk@57608


git-svn-id: http://core.svn.wordpress.org/trunk@57109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-13 08:54:11 +00:00
Adam Silverstein
a843b188f8 Media: enable control of progressive image output.
Add a new `image_save_progressive` filter which developers can use to control whether intermediate image sizes are saved in a progressive format (when available). By default, progressive image output is not used, matching the previous behavior.

Props: adamsilverstein, _ck_, markoheijnen, SergeyBiryukov, Japh, pmeenan, mikeschroder, derekspringer, buley, ericlewis, bahia0019, born2webdesign.
Fixes #21668.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 23:26:11 +00:00
hellofromTonya
8d04dc7e1c Upgrade/Install: Micro-optimizations for getting plugin_file in plugins loader loop.
RE: Plugins Dependencies.

The following micro-optimization improvements are included for finding each plugin's file relative to the plugins' directory within `wp-settings.php`:

* Move `trailingslashit()` before `foreach()`.

The path to the plugin directory is a constant. Invoking the `trailingslashit()` within the loop for each plugin is unnecessary and less performant.

This commit moves the plugin directory logic to before the loop. The result: the logic will now run 1x instead of Px where P represents the number of active and valid plugins to be loaded.

* Use `substr()` instead of `str_replace()` to extract the plugin's file relative to the plugins' directory.

`substr()` is more performant than `str_replace()`.

Why?

Per the PHP handbook:
>"This function returns a string or an array with all occurrences of search in subject replaced with the given replace value."

`str_replace()` searches the entire string to find and replace each substring occurrence.

whereas

>"Returns the portion of string specified by the offset and length parameters."

`substr()` starts at the given offset and stops at the given (or end of the) string length.

In other words, `substr()` iterates over less of and only a specific portion of the given input string, whereas `str_replace()` iterates through the entire string searching for matches (plural).

References:
* `str_replace()` https://www.php.net/manual/en/function.str-replace.php
* `substr()` https://www.php.net/manual/en/function.substr.php
* `strlen()` https://www.php.net/manual/en/function.strlen.php
* Show the comparison in action https://3v4l.org/TbQ9U.

Follow-up to [57545], [57592].

Props hellofromTonya, costdev.
Fixes #60510.
Built from https://develop.svn.wordpress.org/trunk@57606


git-svn-id: http://core.svn.wordpress.org/trunk@57107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 23:10:12 +00:00
joedolson
5312d18ca2 Media: Update progress spinner position on small screens.
Move the media library progress spinner to overlay the filter controls while active. Improves design and prevents unpredictable layout.

Props afercia, kushang78, joedolson, karmatosed.
Fixes #33049.
Built from https://develop.svn.wordpress.org/trunk@57605


git-svn-id: http://core.svn.wordpress.org/trunk@57106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 23:02:09 +00:00
Sergey Biryukov
4c6a1c446e Twenty Nineteen: Restore transition property to a single line.
Follow-up to [57599].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 22:26:07 +00:00
Pascal Birchler
6bcab76673 REST API: Add featured_media field to attachments endpoint.
Audio and video attachments can have a featured image, also known as a poster image. This functionality is now properly exposed by the `wp/v2/media` endpoint.

Props swissspidy, timothyblynjacobs, wonderboymusic, dlh, spacedmonkey.
Fixes #41692.
Built from https://develop.svn.wordpress.org/trunk@57603


git-svn-id: http://core.svn.wordpress.org/trunk@57104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 22:17:11 +00:00
Aaron Jorbin
d080076580 General: Add an option to configure the site icon in general settings.
This restores the site icon setting to its original home on the settings page where it lives with the title and tagline.

The base for this code was originally added in [32994] and then removed in [33329]. The majority of the modification to that version are to remove the no-js pieces and make the workflow completely inline rather than putting the cropping on a separate page.

Additionally, since image crops rely on the ability to upload an image, this setting is gated by the `upload_files` capability.

Follow-up to: [32994], [33329].

Props jorbin, audrasjb, mukesh27, joedolson, afercia, kebbet, swissspidy, obenland, jameskoster, kjellr, andraganescu, stacimc, mikeschroder, h71, krupajnanda, huzaifaalmesbah.
Fixes #54370.
See #16434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 21:57:09 +00:00
audrasjb
bc39cfc822 Bundled Themes: Cast font URL functions to string for add_editor_style().
This changeset ensures the result of the font URL functions is a `string` before using it in `add_editor_style()`, to avoid PHP warnings on child themes. This similarily updates Twenty Thirteen, Twenty Fourteen, Twenty Fifteen, Twenty Sixteen, and Twenty Seventeen.

Props jordesign, SergeyBiryukov, sabernhardt, huzaifaalmesbah, shailu25.
Fixes #59704.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 21:48:08 +00:00
joedolson
fb3ce8ed15 Toolbar: Add adminbar link for new sites in network installs.
Add a link that allows network administrators to go to the new site page from the "New" menu in the adminbar. 

Props johnjamesjacoby, sabernhardt, joedolson, rajinsharwar, huzaifaalmesbah.
Fixes #41104.
Built from https://develop.svn.wordpress.org/trunk@57600


git-svn-id: http://core.svn.wordpress.org/trunk@57101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 20:53:12 +00:00
Sergey Biryukov
811de39c6f Twenty Nineteen: Correct line height for Button block.
This commit moves `line-height` to the Buttons container and removes the duplicate `outline` property.

Props sabernhardt, nidhidhandhukiya, monzuralam, shailu25, hrrarya, karmatosed, harshgajipara, nicolefurlan, fnpen, oglekler, poena, huzaifaalmesbah, audrasjb.
Fixes #58443.
Built from https://develop.svn.wordpress.org/trunk@57599


git-svn-id: http://core.svn.wordpress.org/trunk@57100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 18:52:07 +00:00
davidbaumwald
3fae0d4fe5 Upgrade/Install: Remove unnecessary individual subfiles from $_old_files array.
On upgrade, the `$_old_files` array is used to cleanup any files that exist in a previous version of core but are no longer present in the current version.  Sometimes, an entire directory should be removed.  In the past, when a parent directory was included in the array, subfiles were also included for good measure.  

However, the code that removes the old files uses `$wp_filesystem->delete()` with the `$recursive` parameter set to `true`.  With this setup, individual subfiles are not required to be individually listed when their parent directory is already included in the `$_old_files` array.

This commit removes all individual subfiles from the `$_old_files` array when their parent directory is already included.

Props SergeyBiryukov, mhshohel, pbiron, oglekler.
Fixes #58995.
Built from https://develop.svn.wordpress.org/trunk@57598


git-svn-id: http://core.svn.wordpress.org/trunk@57099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 16:53:13 +00:00
Pascal Birchler
10b96420a5 Shortcodes: Always return an array in shortcode_parse_atts().
Previously, `shortcode_parse_atts()` would return the input (an empty string) if a shortcode had no attributes, even though the documentation said otherwise.

Always returning an (empty) array reduces confusion and improves developer experience as the return value does not have to be manually checked in the shortcode itself.

Props: nicolefurlan, swissspidy, johnbillion, bedas.
Fixes #59249.
Built from https://develop.svn.wordpress.org/trunk@57597


git-svn-id: http://core.svn.wordpress.org/trunk@57098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 16:08:10 +00:00
audrasjb
64b5e4c51a Networks and Sites: Improve switch_to_blog() docblock.
Follow-up to [41373].

Props sabernhardt, jeremyfelt, audrasjb.
Fixes #60332.
See #41815.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 15:38:09 +00:00
audrasjb
d3d9374e06 Canonical: Introduce admin_canonical_url filter.
This changeset introduces the new `admin_canonical_url` hook to help developers and extenders to modify the admin canonical url value.

Props prionkor, audrasjb.
Fixes #59545.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 15:26:10 +00:00
Bernhard Reiter
c193c9936b Block Hooks: Inject hooked blocks into modified templates and parts.
Using the new technique introduced in [57157] of using a `metadata.ignoredHookedBlocks` attribute in the anchor block to store information about whether or not a hooked block should be considered for injection, extend said injection to encompass ''modified'' templates and parts.

Fixes #59646.
Props gziolo, matveb.
Built from https://develop.svn.wordpress.org/trunk@57594


git-svn-id: http://core.svn.wordpress.org/trunk@57095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 13:15:09 +00:00
gziolo
b0e171fe16 Script Modules API: Add deregister module function
It was impossible to deregister a script module. It is changing to avoid problems for extenders that want to override any Core script module.

Fixes #60463.
Props cbravobernal, gziolo, mukesh27, youknowriad.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 13:00:10 +00:00
costdev
c04996591b Upgrade/Install: Avoid update_option() calls during bootstrap.
[57545] introduced the Plugin Dependencies feature, which contains a new `plugin_data` option.

Previously, the `plugin_data` option was being updated during bootstrap and in `get_plugins()`, causing an error when using the install script as the options database table does not yet exist, and also risked an "out of sync" issue between the database and the cache on websites with heavy traffic.

This removes the calls to `update_option()` during Core's bootstrap, and guards the call in `get_plugins()` to ensure that it doesn't run when WordPress is installing.

Follow-up to [57545].

Props desrosj, swisspidy, huzaifaalmesbah, afragen, dd32, azaozz, costdev.
Fixes #60461. See #60457, #60491.
Built from https://develop.svn.wordpress.org/trunk@57592


git-svn-id: http://core.svn.wordpress.org/trunk@57093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 12:33:10 +00:00
costdev
c309be74be Filesystem API: Fix typo in ftp_base::restore().
The `ftp_base::restore()` method contained a typo internally: "resore" should be "restore".

Follow-up to [7126].

Props benniledl, hellofromTonya, audrasjb.
Fixes #60497.
Built from https://develop.svn.wordpress.org/trunk@57591


git-svn-id: http://core.svn.wordpress.org/trunk@57092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 12:07:10 +00:00
gziolo
48da229fa5 Blocks: Allow reading the script handle from asset files
In the [documentation for WPDefinedAsset definition](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#wpdefinedasset) for block metadata there is a note about the handle. That was missing in WordPress core.

Props gziolo, jsnajdr, youknowriad.
Fixes #60485.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 11:42:11 +00:00
audrasjb
59f2266979 Twenty Twenty: Scope .privacy-policy styles to the footer only.
This changeset fixes an issue where the `.privacy-policy` styles were applied to other locations than the footer only, like the `privacy-policy` page itself.

Props mnydigital, sabernhardt, huzaifaalmesbah, shailu25, poena.
Fixes #60469.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 11:33:05 +00:00
audrasjb
ddd8354888 Twenty Twenty-Four: Add missing translation functions to text strings.
This changeset updates some text labels in `footer.php` to make them translatable.

Props wildworks, sabernhardt, poena, onemaggie, luminuu, mukesh27.
Fixes #60298.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 11:09:08 +00:00
audrasjb
db98f7f8b2 Twenty Twenty: Fix Table block default and custom border colors.
On the front end, this changeset restores the theme's default border color when (and only when) the block's text color is the default.
In the editor, these styles repurpose the user-selected color for the border, to match the front.

Props nidhidhandhukiya, sabernhardt, pooja1210, pouicpouic, poena, shailu25, ugyensupport, wasiur195, rajinsharwar, wasiur195, jivygraphics, huzaifaalmesbah, harshgajipara, nicolefurlan, sumitbagthariya16.
Fixes #58022.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 10:48:12 +00:00
Pascal Birchler
cb4b56dfda Plugins: Store plugin deletion results in temporary option.
Storing the data in a non-autoloaded rather than a transient ensures it cannot be accidentally removed due to a cache flush.

Props: kkmuffme, mukesh27.
Fixes #59433.
Built from https://develop.svn.wordpress.org/trunk@57586


git-svn-id: http://core.svn.wordpress.org/trunk@57087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 09:37:08 +00:00
youknowriad
42abc00010 Editor: Update pattern overrides attribute format.
Updates the pattern block's overrides attribute data structure and renames it to content.
This new format should prove more flexible for the future.

Props talldanwp, gziolo.
Fixes #60456.
Built from https://develop.svn.wordpress.org/trunk@57585


git-svn-id: http://core.svn.wordpress.org/trunk@57086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-12 08:49:12 +00:00
joedolson
9a3c2cc58b General: Remove ableist language from code comments.
Remove a handful of occurrences of ableist terms in code comments; omits external libraries.

Props dartiss, upadalavipul, SergeyBiryukov, shailu25, jorbin, dmsnell, joedolson, manfcarlo.
Fixes #60247.
Built from https://develop.svn.wordpress.org/trunk@57584


git-svn-id: http://core.svn.wordpress.org/trunk@57085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-11 19:14:19 +00:00
Sergey Biryukov
23d24eefc2 Tests: Adjust the meta key time in wp_scheduled_delete() tests.
Occasionally, the tests verifying that old trashed posts or comments are not deleted if not old enough can take longer than expected, leading to false positives when comparing the timestamp in `wp_scheduled_delete()`, and resulting in subsequent test failures.

This commit aims to resolve the race condition.

Follow-up to [57224], [57237].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-11 17:04:22 +00:00
dmsnell
fd1cbd8980 HTML API: Add subclassed has_bookmark() and fix seek()
The WP_HTML_Processor::has_bookmark() method has not correctly reported bookmarks
which have been set, because it wraps the given bookmark names when setting them.
Additionally, WP_HTML_Processor::seek() does not seek to correct location if HTML
has been updated because it wasn't flushing enqueued updates to the document.

In this patch both problems are resolved and added tests guard these behaviors
against future regressions.

Developed in https://github.com/WordPress/wordpress-develop/pull/6039
Discussed in https://core.trac.wordpress.org/ticket/60474

Follow-up to [56274].
Props dmsnell, jonsurrell.
Fixes #60474.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-10 22:54:13 +00:00
Sergey Biryukov
82b97a677f Twenty Fifteen: Add top margin to the File block button styles.
This ensures that there is some spacing between the Cover and File blocks.

Props mukesh27, mayur8991, panchalhimani711, sabernhardt, itpathsolutions, thakordarshil, ankit-k-gupta, ugyensupport, pooja1210, shailu25, harshgajipara, darshitrajyaguru97, poena.
Fixes #58498.
Built from https://develop.svn.wordpress.org/trunk@57581


git-svn-id: http://core.svn.wordpress.org/trunk@57082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-10 17:18:14 +00:00
joedolson
5940784180 Quick/Bulk Edit: Pre-fill category fields with their status.
Pre-fill category fields in the Quick/Bulk Edit form with their current status.

When bulk editing, if only some of the selected items are in a given category, the category's checkbox will display a line to indicate an indeterminate status.

Originally committed in [56172], but reverted due to a bug that removed all categories. Updated commit fixes the bug, adds unit tests, and improves the accessibility of the indeterminate state checkboxes.

Props pavelevap, scribu, chasedsiedu, helen, joshcanhelp, ubernaut, Cyberchicken, laumindproductscomau, SergeyBiryukov, Marcoevich, tomybyte, thinkluke, virtality-marketing-solutions, Michalooki, dmsnell, itecrs, pannelars, WHSajid, samba45, Mte90, johnbillion, tomluckies, soulseekah, francina, oglekler, ajmcfadyen, mukesh27, costdev, hellofromTonya, peterwilsoncc, joedolson, pbiron, oglekler, webcommsat, jorbin, ajmcfadyen, huzaifaalmesbah.
Fixes #11302.
Built from https://develop.svn.wordpress.org/trunk@57580


git-svn-id: http://core.svn.wordpress.org/trunk@57081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 19:50:14 +00:00
Sergey Biryukov
ae0b8ee134 Twenty Nineteen: Add border-radius to avatar images in the editor.
This ensures that avatars design in the Post Author or Avatar blocks in the editor matches the front end.

Props pitamdey, shailu25, poena, sabernhardt, balub, sarath.ar, nicolefurlan, harshgajipara, pooja1210.
Fixes #59285.
Built from https://develop.svn.wordpress.org/trunk@57579


git-svn-id: http://core.svn.wordpress.org/trunk@57080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 18:25:04 +00:00
youknowriad
f7c63b630c Editor: Update the WordPress packages to Gutenberg 17.7RC1.
This brings the latest and greatest from Gutenberg.
The full changelog is available here 
https://github.com/WordPress/gutenberg/releases/tag/v17.7.0-rc.1

Props youknowriad, get_dave.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57578


git-svn-id: http://core.svn.wordpress.org/trunk@57079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 18:22:22 +00:00
Sergey Biryukov
336be7695c Twenty Sixteen: Add border-radius to avatar images in the editor.
This ensures that avatars design in the Post Author or Avatar blocks in the editor matches the front end.

Props pitamdey, sabernhardt, poena, shailu25.
Fixes #59253.
Built from https://develop.svn.wordpress.org/trunk@57577


git-svn-id: http://core.svn.wordpress.org/trunk@57078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 17:57:13 +00:00
youknowriad
21e68fe56e Editor: Expand Block Bindings for button block.
Add block bindings support for the linkTarget and rel button block attributes.
This allows using custom fiends or pattern overrides for these attributes.

Props glendaviesnz.
Fixes #60481.
Built from https://develop.svn.wordpress.org/trunk@57576


git-svn-id: http://core.svn.wordpress.org/trunk@57077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 15:10:13 +00:00
gziolo
66badc5b0d Editor: Add wakeup magic method to the block bindings registry
See #60282.
Follow-up [57373].
Props dmsnell, mukesh27, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 10:54:11 +00:00
gziolo
9cd17860ba Editor: Refactor block binding processing and attribute computation
Refactors the processing of block bindings into steps:
- Gets the value for each "bound" attribute from the respective source.
- Returns the computer attributes with values from the sources.
- The computed attributes get injected into block's content.
- The `render_callback` gets the updated list of attributes and processeded block content.

Fixes #60282.
Props czapla, gziolo, andraganescu, santosguillamot.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 10:40:15 +00:00
isabel_brison
1739bae7a8 Themes: update add_theme_support docblock.
Adds missing features to the list for the `$feature` parameter in `add_theme_support()`.

Props up1512001, mukesh27, swissspidy, isabel_brison.
Fixes #60221.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-09 04:17:13 +00:00
joedolson
962f2a1508 Users: Replace table tags for color palettes in profiles.
Replace the `table` element used to present color palette selection in the user profile screen with generic elements. The extra semantics of a table are at best unhelpful and have some potential to great extraneous verbosity for screen readers.

Props sabernhardt, desrosj.
Fixes #53157.
Built from https://develop.svn.wordpress.org/trunk@57572


git-svn-id: http://core.svn.wordpress.org/trunk@57073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 23:31:16 +00:00
Aaron Jorbin
27ba6d5b6b I18N: Add Translator comments for Planet URLs.
Props oglekler, zodiac1978, audrasjb, jorbin.
Fixes #58010.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 20:36:14 +00:00
desrosj
fd9c831f38 Build/Test Tools: Generate a human-readable HTML coverage report.
This updates the test coverage GitHub Actions workflow to generate a human-readable HTML report in addition to the current machine readable one submitted to Codecov.

Props jorbin.
Fixes #60476.
Built from https://develop.svn.wordpress.org/trunk@57570


git-svn-id: http://core.svn.wordpress.org/trunk@57071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 19:33:25 +00:00
Sergey Biryukov
0ed990c294 Twenty Twenty-Two: Prefix the pages block pattern category name.
If a plugin also registers the category name `pages` in an `init` hook that runs after the theme's, it can override the label and description unintentionally.

With a prefix, extenders can still override it, but it would be intentional.

Props poena, swissspidy, shailu25.
Fixes #59839.
Built from https://develop.svn.wordpress.org/trunk@57569


git-svn-id: http://core.svn.wordpress.org/trunk@57070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 19:32:15 +00:00
desrosj
c9522a53b6 Build/Test Tools: Fix bug pulling local environment containers on Apple silicone.
The MySQL Docker containers for versions 5.7 and below do not support recent Apple silicone chips. Previously this was fixed by including `amd64/` as a prefix to the image name in the `docker-compose.yml` file (see [54096]). However, this stopped working after recent updates to Docker Desktop.

This changeset removes the `amd64/` prefix for the image used as the database container and raises the default version of MySQL in the local development environment to the current LTS version (8.0). Because this version is still maintained, there are `arm64` containers available to use.

This also documents a new workaround for contributors looking to run the local Docker environment using MySQL 5.7 or earlier, which entails creating a small `docker-compose.override.yml`.

Props bernhard-reiter, johnbillion, afragen, huzaifaalmesbah.
Fixes #59930.
Built from https://develop.svn.wordpress.org/trunk@57568


git-svn-id: http://core.svn.wordpress.org/trunk@57069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 19:12:14 +00:00
hellofromTonya
f098e2525f Coding Standards: Replace alias join() in WP_Font_Utils.
Replaces the alias `join()` with its canonical `implode()`.

Using the canonical function name for PHP functions is strongly recommended, as aliases may be deprecated or removed without (much) warning.

Follow-up to [57539], [49193].

Props davidbinda.
Fixes #60473.
Built from https://develop.svn.wordpress.org/trunk@57567


git-svn-id: http://core.svn.wordpress.org/trunk@57068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 16:02:14 +00:00
desrosj
17f02c1c02 Build/Test Tools: Unpin PHP 7.4 from the test coverage workflow.
Since being introduced, the GitHub Actions workflow responsible for generating and submitting a test coverage report has used PHP 7.4. At the time, there were some issues with running the test suite on PHP 8.0+ which could have resulted in inaccurate reporting.

The test suite and WordPress in general are much more stable on 8.x now. The test coverage report should now be generated using the Docker container tagged `latest` (currently 8.2).

This will result in a very small decrease in the percentage of lines covered by test (-0.05%), but a slight increase in the percentage of functions and methods covered (+0.08%).

Props johnbillion.
See #59647.
Built from https://develop.svn.wordpress.org/trunk@57566


git-svn-id: http://core.svn.wordpress.org/trunk@57067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 15:37:13 +00:00
gziolo
f31040bcdb Editor: Add viewScriptModule handling to block.json metadata
Syncing changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/57437.

Scripts and styles can be registered for blocks via `block.json` metadata. There is now a Modules API, but was no way to register or associate module assets with blocks via `block.json`.

Fixes #60233.
Props jonsurrell, gziolo, cbravobernal, luisherranz, youknowriad.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 10:41:13 +00:00
gziolo
f3db86148e Interactivity API: Remove empty file
Missed that when applying patch from GitHub.

Follow-up [57563].
See #60356.
Props: swissspidy.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 09:26:11 +00:00
gziolo
802c251971 Interactivity API: Integrate Server Directive Processing
The Interactivity API enables WordPress developers to create dynamic and interactive web experiences with ease using a set of special HTML attributes called directives. Please refer to the [Interactivity API proposal](https://make.wordpress.org/core/2023/03/30/proposal-the-interactivity-api-a-better-developer-experience-in-building-interactive-blocks/) for further details. 

It syncs the changes from the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/58066.

Fixes #60356.
Props luisherranz, jonsurrell, swissspidy, westonruter, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 09:13:09 +00:00
gziolo
b19e148a07 Editor: Introduce WP_Block_Bindings_Source class
Abstracts the block bindings source array into a well-defined object.

Fixes #60447.
See #60282.
Follow-up [57373].
Props czapla, santosguillamot, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 08:57:07 +00:00
gziolo
b89d86bde8 Editor: Avoid double escaping on value passed for attribute in HTML tag processor
Fix for the Block Bindings processing.
See https://github.com/WordPress/wordpress-develop/pull/5888#discussion_r1476793062.

Props: czapla, dmsnell, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 08:42:07 +00:00
gziolo
0d374ffc6b Editor: Improve code documentation for block bindings
Follow-up [57514].
See #60282.
Props czapla, gziolo, retrofox.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 08:37:09 +00:00
gziolo
3791772c2d Editor: Make asset file optional for block scripts
It is no longer a hard requirement that a *.asset.php file is present to register a script for block. 

Fixes #57234.
Props joefusco, gziolo, spacedmonkey, colorful-tones. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@57060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-02-08 08:18:10 +00:00