Commit Graph

34892 Commits

Author SHA1 Message Date
isabel_brison
b4a8c95238 Editor: use layout.wideSize as max viewport width.
Use the value of `layout.wideSize` as the maximum viewport width for fluid font size calculations.

Props ramonopoly.

Fixes #58522.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-20 05:28:25 +00:00
isabel_brison
ae884fdc62 General: fix overridden typos.
Fixes two typos in `class-wp-theme-json`.

Props Aristath, nihar007, kapilpaul, oandregal, krupalpanchal.
Fixes #58464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-20 04:59:18 +00:00
Peter Wilson
7f4337121a KSES: Add support for CSS repeat() function.
Introduces support for the CSS `repeat()` function to support complex grid layouts.

Props isabel_brison, azaozz.
Fixes #58551.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-20 02:31:18 +00:00
Peter Wilson
b5da380334 Media: Redirect deprecated wp-admin/media.php file.
Redirect users visiting the `wp-admin/media.php` file to the media library, `wp-admin/upload.php`. An user facing warning is displayed when the media library is reached via a deprecated link.

Follow up to [55647].

Props jorbin, audrasjb, azaozz, NekoJonez, kebbet, costdev.
Fixes #57612.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 23:20:21 +00:00
John Blackbourn
acc6e5d685 General: Replace some instances of "blog" with "site" in documentation, translator comments, and user-facing text strings.
This is not an exhaustive change, but it gets us closer to using "site" in place of "blog" in as many places as possible.

Props NekoJonez, audrasjb, oglekler

Fixes #58117

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


git-svn-id: http://core.svn.wordpress.org/trunk@55454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 18:27:27 +00:00
spacedmonkey
48f5508fc9 Themes: Change the order of path check in is_block_theme method.
Change check to see if the current theme is a block theme, to check the path `/templates/index.html` first over the deprecated path `/block-templates/index.html`. 
As this path was deprecated in WP 5.9, it is more likely the block theme would use the current path. This saves a file_exists call which improves performance. 

Props nihar007, spacedmonkey.
Fixes #58520.
Built from https://develop.svn.wordpress.org/trunk@55941


git-svn-id: http://core.svn.wordpress.org/trunk@55453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 16:04:22 +00:00
Sergey Biryukov
9d44526db8 Cache API: Remove unused usermeta global cache group.
The `usermeta` group was introduced in WP 2.0, but was never actually used in WordPress core.

The `user_meta` group is used instead.

Follow-up to [3011], [15482], [16562], [53823], [53832], [54940].

Props ignatggeorgiev, peterwilsoncc, oglekler, pamprn09, spacedmonkey, SergeyBiryukov.
Fixes #58175.
Built from https://develop.svn.wordpress.org/trunk@55940


git-svn-id: http://core.svn.wordpress.org/trunk@55452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 11:44:22 +00:00
spacedmonkey
dac560b77d Themes: Fix caching issue in get_post_templates method in WP_Theme.
Fix an edge case caching issue, where if a developer use the  `wp_cache_themes_persistently` filter and is running the site in multisite configuration, it meant block template are incorrectly cached. Block templates are stored in the posts table. But in a multisite configuration, different sites on the multisite could have different block templates stored in there post table. As themes cache group is a global group, it resulted in incorrect values being cached.

Props maniu, spacedmonkey, hellofromTonya, oglekler, mukesh27, joemcgill.
Fixes #57886.
Built from https://develop.svn.wordpress.org/trunk@55939


git-svn-id: http://core.svn.wordpress.org/trunk@55451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 10:33:23 +00:00
Peter Wilson
3d94d17402 Filesystem API: Attempt to create directory in copy_dir().
Adds a check to the start of `copy_dir()` that the destination directory exists and attempts to create it if it does not.

An error is returned if the directory can not be created, either due to a permissions error or the parent directory not existing.

Props caraffande, costdev, zunaid321.
Fixes #41855.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-19 02:00:19 +00:00
joedolson
2d2791b5be Formatting: Support aria content attributes.
Add `aria-controls`, `aria-expanded`, and `aria-current` to allowed attributes in KSES.

Props crs1138, rsiddharth, mukesh27, SergeyBiryukov, joedolson, ryokuhi, peterwilsoncc, audrasjb, nataliat2004.
Fixes #55370.
Built from https://develop.svn.wordpress.org/trunk@55937


git-svn-id: http://core.svn.wordpress.org/trunk@55449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-18 16:41:20 +00:00
joedolson
888f082871 Media: Remove duplicate div containers.
Follow-up to [55919]. Remove two hidden divs accidentally duplicated in patch refreshing.

Props azaozz.
Fixes #50523.
Built from https://develop.svn.wordpress.org/trunk@55936


git-svn-id: http://core.svn.wordpress.org/trunk@55448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-18 16:11:18 +00:00
Andrew Ozz
5c10f75f9e Media: Deprecate the 'edit_custom_thumbnail_sizes' filter and disable the "Apply changes to [Thumbnail|All|All except thumbnail]" UI in the image editor. Add a (boolean) filter to reenable that UI.
Props peterwilsoncc, costdev, azaozz.
See: #57685.
Built from https://develop.svn.wordpress.org/trunk@55935


git-svn-id: http://core.svn.wordpress.org/trunk@55447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-18 14:24:20 +00:00
Sergey Biryukov
7eac6728cf Coding Standards: Use strict comparison in wp-includes/pomo/streams.php.
Follow-up to [10584], [11626], [12174].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55934


git-svn-id: http://core.svn.wordpress.org/trunk@55446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-18 12:55:21 +00:00
joedolson
07fa311aff Upgrade/Install: Log in link should look like a link.
Change the log in link that appears after completing installation so that it does not use the button styling. Links should look like links.

Props xavortm, menakas, afercia, rianrietveld, johnbillion, drw158, joedolson.
Fixes #40470.
Built from https://develop.svn.wordpress.org/trunk@55933


git-svn-id: http://core.svn.wordpress.org/trunk@55445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-17 21:47:24 +00:00
joedolson
f50eccbe85 Bundled Themes: Fix Twenty Fourteen button block line-height.
Change the button block in Twenty Fourteen to use relative instead of fixed line-height. Prevent visual errors with larger font sizes on the front-end.

Props nidhidhandhukiya, algorithmsunlocks, mayur8991, sabernhardt.
Fixes #58444.
Built from https://develop.svn.wordpress.org/trunk@55932


git-svn-id: http://core.svn.wordpress.org/trunk@55444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-17 21:37:34 +00:00
Sergey Biryukov
df4c8c8497 Coding Standards: Use strict comparison in wp-includes/pomo/mo.php.
Follow-up to [10584], [12174].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55931


git-svn-id: http://core.svn.wordpress.org/trunk@55443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-17 10:28:25 +00:00
spacedmonkey
8b93938860 Themes: Inline render blocking CSS `classic-themes.css'
Since [54358], a new CSS file classic-themes.css is enqueued on all pages on the front end of themes without `theme.json`. This is a blocking http request, the impact on performance will be affected by network conditions. Inlining this style, stops this blocking request. By adding style data of path to the registered style, the function `wp_maybe_inline_styles` will automatically inline the style for us. 

Props spacedmonkey, adamsilverstein.
Fixes #58480.
Built from https://develop.svn.wordpress.org/trunk@55930


git-svn-id: http://core.svn.wordpress.org/trunk@55442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-16 13:28:21 +00:00
Pascal Birchler
985c726ff3 Bundled Themes: Remove load_theme_textdomain() calls from default themes.
Since WordPress 4.6 introduced just-in-time translation loading, themes and plugins no longer need to manually call `load_theme_textdomain`/`load_plugin_textdomain`, unless they are on a version prior to 4.6.

This change removes the `load_theme_textdomain()` call from Twenty Seventeen and up, since these themes all require at least WordPress 4.7.
On older default themes, `load_theme_textdomain()` is called conditionally depending on the WordPress version.

Props piyushtekwani.
Fixes #58318.
Built from https://develop.svn.wordpress.org/trunk@55929


git-svn-id: http://core.svn.wordpress.org/trunk@55441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-16 13:04:21 +00:00
Pascal Birchler
c251d2f8bf I18N: Allow to short-circuit load_textdomain().
Introduces a new `pre_load_textdomain` filter, which is useful for plugins to develop and test alternative loading/caching strategies for translations. This brings consistency with the existing `pre_load_script_translations` filter for JavaScript translations.

Props ocean90, swissspidy.
Fixes #58035.
Built from https://develop.svn.wordpress.org/trunk@55928


git-svn-id: http://core.svn.wordpress.org/trunk@55440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-16 12:58:24 +00:00
Sergey Biryukov
d3dc1cd671 Coding Standards: Use strict comparison in wp-includes/pomo/entry.php.
Follow-up to [18528].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55927


git-svn-id: http://core.svn.wordpress.org/trunk@55439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-16 11:23:22 +00:00
oandregal
43c3e172e0 Themes: add wp_get_remote_theme_patterns function.
Adds a new public function, `wp_get_remote_theme_patterns` to query the `patterns` datum from `theme.json` and substitutes current usage of private APIs.

Props ntsekouras, poena, audrasjb.
Fixes #58460


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


git-svn-id: http://core.svn.wordpress.org/trunk@55438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-16 08:08:23 +00:00
Peter Wilson
9bb36a1453 Tests/Build tools: Various term related test improvements.
Modifies the tests for `get_tag_link()`, `get_term()` and `get_term_field()` to:

- use shared fixtures as possible
- improves variable names
- add `@covers` annotation as required

Props peterwilsoncc, costdev.
See #57841.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-15 03:25:21 +00:00
Sergey Biryukov
c965fefd6e Posts, Post Types: Introduce item_trashed post type label.
This allows the block editor to announce the correct message when an entity is moved to the Trash.

Original issue from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/issues/19144 #19144 Wrong notification message shown when an entity is moved to trash]

Props james-roberts, ntsekouras, nrqsnchz, afercia, swissspidy, joedolson, talldanwp, SergeyBiryukov.
Fixes #51387.
Built from https://develop.svn.wordpress.org/trunk@55923


git-svn-id: http://core.svn.wordpress.org/trunk@55435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-15 01:39:20 +00:00
Peter Wilson
bf7d51c86d Tests/Build tools: Add @covers annotation to wp_set_object_terms() tests.
Props @costdev.
See #57841.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-15 00:02:17 +00:00
Peter Wilson
256272e534 Taxonomy: Prevent deprecation notices clearing terms.
Prevents `wp_set_object_terms()` throwing a deprecation notice in PHP 8.1+ when passing an empty value as the second parameter to clear the terms.

Props audrasjb, chouby, costdev, jrf, peterwilsoncc, prashantbhivsane, sergeybiryukov.
Fixes #57923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 23:51:22 +00:00
joedolson
a3398d1cc4 Build/Test Tools: Revert accidental change to .env
Follow-up to [55919] to restore .env state.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 20:46:21 +00:00
joedolson
9b15db20d3 Media: Update admin image editor design.
Significant restructure of the admin image editor interface, but no new functionality. Reorganize editing buttons into a common region at the top of the editor. Move image rotation tools into a pop-out menu. Add 180 degree rotation option. Add scale button to control group. Move sidebar tools next to the editing canvas to improve visual proximity between action and result. Enlarge editing canvas and crop handles. Separate activating crop functions from applying crop. Add numeric inputs for crop & scale values. 

A long term goal is to move undo/redo and cancel/save into the modal title bar, but that is not feasible without significant updates to the modal framework.

Props afercia, karmatosed, nrqsnchz, antpb, chaion07, costdev, peterwilsoncc, antpb, sabernhardt, prashantbhivsane, joedolson.
Fixes #50523.
Built from https://develop.svn.wordpress.org/trunk@55919


git-svn-id: http://core.svn.wordpress.org/trunk@55431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 20:42:27 +00:00
audrasjb
7f247349b6 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Follow-up to [55911], [55916], [55917].

Props costdev.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 14:11:16 +00:00
audrasjb
9ffee539ab Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Follow-up to [55911], [55916].

Props costdev.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 14:08:18 +00:00
audrasjb
3ce7c7e435 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Follow-up to [55911].

Props costdev, audrasjb.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55428 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 12:57:20 +00:00
oandregal
ddc2c454be Fix lint issues in WP_Theme_JSON::sanitize method.
Add @since tag and indent the parameter properly.

Props mukesh27.
Fixes #58462.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 10:46:19 +00:00
Sergey Biryukov
be88348a16 Coding Standards: Use strict comparison in wp-includes/class-wp-oembed.php.
Follow-up to [13996].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55914


git-svn-id: http://core.svn.wordpress.org/trunk@55426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 10:35:18 +00:00
audrasjb
e0cc963a40 Twenty Seventeen: Improve Grid View variation rendering in the editor for the Post List block.
This changeset updates Twenty Seventeen's block editor stylesheet to remove an unwanted `disc` list style on the "Grid" variation of the Post List block.

Props nkeller15, sabernhardt.
Fixes #58531.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 10:04:20 +00:00
oandregal
86bad3cdf6 Ignore unregistered block style variations from theme.json.
This PR makes sure unregistered block style variations declared via `theme.json` are ignored. It fixes an issue by style variations don't work in the editor and CSS rules without a selector are output to the front-end.

Props isabel_brison.
Fixes #58462.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 07:42:19 +00:00
audrasjb
5be9311067 Docs: Use third-person singular verbs in various function descriptions, as per docblocks standards.
Props costdev, audrasjb.
See #57840.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-14 06:34:27 +00:00
spacedmonkey
68f97dcb83 Editor: Skip file_exist check for core blocks.
In `register_block_type_from_metadata` function, skip calling `file_exists` on core blocks. Core blocks are part of the codebase and will never not exist. Not calling this function is better for performance, as the file lookup can be expensive. 

Props spacedmonkey, joemcgill.
Fixes #58385.
Built from https://develop.svn.wordpress.org/trunk@55910


git-svn-id: http://core.svn.wordpress.org/trunk@55422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-13 11:46:27 +00:00
spacedmonkey
c5f2ee51d9 Script Loader: Add a check to see in style is registered in wp_maybe_inline_styles.
Add a check in `wp_maybe_inline_styles` to check that style is registered before processing items in queue. It is possible that developers may have called `wp_deregister_style`, unregistering style but the style still be in the queue to be processed. Without this check, typing to access the `src` property would result in a notice error. 

Follow on from [55888]. 

Props spacedmonkey, flixos90, dd32, kebbet.
See #58394.
Built from https://develop.svn.wordpress.org/trunk@55909


git-svn-id: http://core.svn.wordpress.org/trunk@55421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-13 09:53:23 +00:00
Sergey Biryukov
e2f7452084 Coding Standards: Use strict comparison in wp-includes/class-wp-list-util.php.
Follow-up to [18606], [38928], [48413].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55908


git-svn-id: http://core.svn.wordpress.org/trunk@55420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-13 04:46:23 +00:00
spacedmonkey
a56a09c4ba Editor: Improve the append_to_selector method.
Improve `append_to_selector` method in `WP_Theme_JSON` by checking to see if string contains a common before imploding / exploding string, which improves performance. 

Originally developed and tested in [WordPress/gutenberg#47833 Gutenberg PR 47833].

Props spacedmonkey, flixos90, mukesh27, joemcgill, wildworks, oandregal, mamaduka.
Fixes #58231.
Built from https://develop.svn.wordpress.org/trunk@55907


git-svn-id: http://core.svn.wordpress.org/trunk@55419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-12 11:22:23 +00:00
Sergey Biryukov
f8cd908be2 Coding Standards: Use strict comparison in wp-includes/class-walker-page.php.
Follow-up to [3704], [9299], [9485], [16100], [44416].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55906


git-svn-id: http://core.svn.wordpress.org/trunk@55418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-12 06:12:24 +00:00
Sergey Biryukov
9c217ce1e5 Coding Standards: Use strict comparison in wp-includes/class-walker-page-dropdown.php.
Follow-up to [3704], [16100].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55905


git-svn-id: http://core.svn.wordpress.org/trunk@55417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-11 09:27:18 +00:00
Sergey Biryukov
39c2cef0c9 Coding Standards: Use strict comparison in wp-admin/options-writing.php.
Follow-up to [4326], [19304].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55904


git-svn-id: http://core.svn.wordpress.org/trunk@55416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-10 07:03:18 +00:00
audrasjb
116d5d03c3 Plugins: Display Auto-updates filters when the current view is "Must Use" or "Drop-in".
This changeset fixes a bug where the "Auto-updates Enabled/Disabled" filters were not showing when the current view is "Must Use" or "Drop-in".

Props NekoJonez, pbiron, costdev, audrasjb.
Fixes #54309.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-10 05:30:22 +00:00
audrasjb
d9faf17705 Login and Registration: Grammar improvement on Sign-up user-facing strings.
Props NekoJonez, audrasjb.
Fixes #58115.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-09 15:08:24 +00:00
audrasjb
41396a44f5 XML-RPC: Update RSD specification URL in XMLRPC library.
This changeset updates the RSD specification URL to avoid extra redirection.

Props utsav72640.
Fixes #58503.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-09 14:00:25 +00:00
Sergey Biryukov
889bf8403a External Libraries: Update jQuery Migrate to version 3.4.1.
Reference:
* [https://github.com/jquery/jquery-migrate/compare/3.4.0...3.4.1 Full list of changes in jQuery Migrate 3.4.1]

Follow-up to [49101], [49338], [49615], [49649], [55237].

Props sstoqnov, hareesh-pillai, mgol.
Fixes #58451.
Built from https://develop.svn.wordpress.org/trunk@55900


git-svn-id: http://core.svn.wordpress.org/trunk@55412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-09 05:49:24 +00:00
audrasjb
b05a629f8b Upgrade/Install: Improve WP_Upgrader strings rendering on small screens.
This changeset adds a `pre` class to "Downloading update from…" user facing strings located in `Core_Upgrader`, `Language_Pack_Upgrader`, `Plugin_Upgrader` and 
`Theme_Upgrader` classes.

Follow-up to [11295].

Props sumitsingh, costdev.
Fixes #58477.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 14:18:21 +00:00
Sergey Biryukov
e1ada2ac21 Twenty Twenty-Three: Remove redundant px unit in a few inline styles.
Follow-up to [54312], [54629].

Props ankitmaru.
Fixes #58485.
Built from https://develop.svn.wordpress.org/trunk@55898


git-svn-id: http://core.svn.wordpress.org/trunk@55410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 14:00:20 +00:00
Pascal Birchler
3077d883cf Embeds: Add support for TikTok creator profiles.
Follow-up to initial support in [47216] / #49083.

Props mukesh27, anveshika, Ankit K Gupta.
Fixes #55784.
Built from https://develop.svn.wordpress.org/trunk@55897


git-svn-id: http://core.svn.wordpress.org/trunk@55409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 13:28:20 +00:00
joedolson
5bb4f1dcd7 Media: Fix CSS layout issues in Replace media dialog.
Make focus outline fully visible at all media query breakpoints, prevent the date filter from becoming hidden, and match the heading styles to other screens.

Props sabernhardt, hareesh-pillai, alvitazwar052.
Fixes #54395.
Built from https://develop.svn.wordpress.org/trunk@55896


git-svn-id: http://core.svn.wordpress.org/trunk@55408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 11:16:18 +00:00
Dominik Schilling
dbf0e1bf9e Query: Allow queries by wp_dashboard_recent_posts() to be cached.
Set the `cache_results` argument to `true` for `WP_Query` to ensure the posts queries on the dashboard can also be cached.

Props benjgrolleau.
Fixes #57055.
Built from https://develop.svn.wordpress.org/trunk@55895


git-svn-id: http://core.svn.wordpress.org/trunk@55407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 10:02:24 +00:00
Aaron Jorbin
1031b96997 Multisite: Require a site title when a site is created
The UI for adding a site says that title is required, however the actual code wasn't requiring it.

Props ideag.
Fixes #54012.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 09:07:20 +00:00
audrasjb
759544181d Docs: Mark apply_filters() third parameter $args as optional.
The `$args` parameter of `apply_filters()` is optional. This changeset updates the related Docblock description accordingly so the parameter is not marked as 
`required` on DevHub.

Props gaeldenysiak, audrasjb, gilles66.
Fixes #58481.
See #57840.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-08 07:54:22 +00:00
audrasjb
f6ee7d285f Users: Use type="hidden" for hidden input on User edit administration panel.
This hidden field added in [24552] to fix an issue with Chrome that was ignoring `autocomplete="off"` in `<input>`, by using a hidden, non-named, non-empty 
input right before the password field. However this input was only hidden via CSS and didn't have any label, which is considered as an accessibility issue. 
This changeset replaces `class="hidden"` with `type="hidden"` to properly indicate to user agents that it is an hidden field.

Follow-up to [24552].

Props smit08, audrasjb, sabernhardt, ryokuhi, tushar284, ashikurwp, siddhantwadhwani, pavanpatil1.
Fixes #56776.
 --Cette ligne, et les suivantes 
ci-dessous, seront ignorées--

M    trunk/src/wp-admin/user-edit.php
M    trunk/src/wp-admin/user-new.php

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


git-svn-id: http://core.svn.wordpress.org/trunk@55404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 21:25:18 +00:00
danielbachhuber
f08039702e Bootstrap/Load: Revert [55890].
As it turns out, WP-CLI *also* doesn't `define( 'WP_USE_THEMES', true );`, which means an active theme's `functions.php` isn't loaded by default and causes a backwards compatibility break.

See #57928.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 20:29:19 +00:00
danielbachhuber
88461977b1 Load: Avoid loading a theme's functions.php when ! wp_using_themes().
Updates `wp_get_active_and_valid_themes()` to return early when `wp_using_themes()` returns `false`. This prevents a theme's `functions.php` from being loaded erroneously when the site isn't using themes.

Also adds `define( 'WP_USE_THEMES', true );` to the test suite bootstrap. Some tests randomly break without it because they were dependent on the previous buggy behavior.

Props bpayton, costdev, danielbachhuber, hellofromtonya, sergeybiryukov, spacedmonkey.
Fixes #57928.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 20:09:23 +00:00
audrasjb
2d5927cb92 Administration: Improve alignment in the Activity dashboard widget.
This changeset sets column layout to posts listed in the Activity dashboard widget to prevent alignement issues on line breaks.

Props sumitsingh, dhrumilk, chiragrathod103, kebbet, audrasjb, pooja1210.
Fixes #58114.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 07:09:19 +00:00
spacedmonkey
abee3f00a1 Script Loader: Improve performance of wp_maybe_inline_styles function.
The `wp_maybe_inline_styles` function is called twice on the average page load. On it's second run however, it did not check to see if the style had already been processed on the first run. This resulted in calling `filesize` and `get_file_contents` unnecessarily, which was bad for performance. Now, the loop around the queued styles, checks to see if the source is set to false, meaning it has already been processed. This change also replaces calls to `filesize` with the core function `wp_filesize`, which improves extensibility. 

Props spacedmonkey, flixos90, peterwilsoncc, joemcgill.
Fixes #58394.
Built from https://develop.svn.wordpress.org/trunk@55888


git-svn-id: http://core.svn.wordpress.org/trunk@55400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 06:56:19 +00:00
audrasjb
b62f326588 Docs: Improve various docblock in WP_Query class, as per docblock standards.
See #57840.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 06:53:19 +00:00
Sergey Biryukov
d3d5fbbfc7 Coding Standards: Use strict comparison in wp-includes/class-wp-http-streams.php.
Follow-up to [12424], [25224], [25303], [29852], [45667], [47808], [51825].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55886


git-svn-id: http://core.svn.wordpress.org/trunk@55398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-07 06:40:20 +00:00
spacedmonkey
8a18492160 Themes: Replace file_exists checks with call to is_block_theme method in WP_Theme class.
In `WP_Theme` class, replace two calls to `file_exists` with a call to the method `is_block_theme`. This method `is_block_theme` does the same file exists check, but it then caches the result for improved performance. 

Props nihar007, spacedmonkey, mukesh27, costdev, juzar.
Fixes #58405.
Built from https://develop.svn.wordpress.org/trunk@55885


git-svn-id: http://core.svn.wordpress.org/trunk@55397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-06 16:19:19 +00:00
audrasjb
c613855594 Docs: Fix a few more typos in Docblocks.
Follow-up to [6779], [10565], [12023], [25224], [27533], [32806], [34777], [45262], [46594], [55823], [55824], [55827].

Props nazmulhudadev, mukesh27.
Fixes #58338.
See #57840.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-06 15:09:28 +00:00
Sergey Biryukov
02009f6df2 Coding Standards: Use strict comparison in wp-includes/class-walker-category.php.
Follow-up to [3033], [3704], [4576], [4580], [5530], [15847], [36008].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55883


git-svn-id: http://core.svn.wordpress.org/trunk@55395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-06 00:30:20 +00:00
audrasjb
8c533a8442 Docs: Various docblock improvements in Custom Header Image related functions, as per docblocks standards.
See #57840.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 21:35:20 +00:00
audrasjb
6279dc749b I18N: Provide gettext context to disambiguate various translation strings.
This changeset adds context to various strings:
- `'Background'` string when referring to Custom Background appearance screens
- `'Header'` string when referring to Custom Header appearance screens
- `'General'`, `'Header'` and `'Footer'` strings when referring to template part areas

Props gonzomir, SergeyBiryukov, mukesh27, costdev, ankitmaru.
Fixes #58424.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 21:05:22 +00:00
Sergey Biryukov
fa14ed343d Coding Standards: Use strict comparison in wp-includes/category.php.
Follow-up to [3511], [4173], [5525].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55880


git-svn-id: http://core.svn.wordpress.org/trunk@55392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 11:16:18 +00:00
spacedmonkey
1634a10025 Editor: Use register_block_type_from_metadata in register_core_block_types_from_metadata.
Use `register_block_type_from_metadata` in `register_core_block_types_from_metadata` function instead of `register_block_type`. This saves an unnecessary call to `file_exists` in `register_block_type` as core block files will always exist. 

Props nihar007, spacedmonkey, mukesh27, gziolo, sudipatel007.
Fixes #58342.
Built from https://develop.svn.wordpress.org/trunk@55879


git-svn-id: http://core.svn.wordpress.org/trunk@55391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-05 09:31:23 +00:00
Sergey Biryukov
5a35e1a831 Coding Standards: Use strict comparison in wp-admin/users.php.
Includes minor code layout fixes for better readability.

Follow-up to [3061], [31941], [47848], [55622], [55623].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55878


git-svn-id: http://core.svn.wordpress.org/trunk@55390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-04 02:35:19 +00:00
Sergey Biryukov
8e22eaa87c Coding Standards: Use strict comparison in wp-admin/network/users.php.
Follow-up to [12603], [18562].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55877


git-svn-id: http://core.svn.wordpress.org/trunk@55389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-03 16:18:21 +00:00
Sergey Biryukov
01121c3440 Coding Standards: Use strict comparison in wp-admin/network/sites.php.
Follow-up to [12603], [18562], [55676].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55876


git-svn-id: http://core.svn.wordpress.org/trunk@55388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-02 12:40:22 +00:00
Weston Ruter
a04d9a32b3 Emoji: Remove extraneous sprintf() from _print_emoji_detection_script().
The `sprintf()` is not being passed any values, and there is no placeholder to replace.
This originated in r52132 in which I erroneously included this `sprintf()` in
two places. I fixed one of the cases in r52151 but I missed the other.

Follow-up to [52132], [52151].

Fixes #58436.
See #44632.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-01 18:09:18 +00:00
Sergey Biryukov
eaafce587e Coding Standards: Use strict comparison in wp-admin/includes/update.php.
Includes minor code layout fixes for better readability.

Follow-up to [9441], [25540].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55874


git-svn-id: http://core.svn.wordpress.org/trunk@55386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-01 15:14:27 +00:00
Sergey Biryukov
3d1140c898 Coding Standards: Use strict comparison in wp-admin/includes/menu.php.
Includes minor code layout fixes for better readability.

Follow-up to [3536], [4093], [9578], [11092], [18034].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55873


git-svn-id: http://core.svn.wordpress.org/trunk@55385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-31 14:53:26 +00:00
John Blackbourn
f3b93e6b3a Media: Correct the fallback value passed to the $mimes parameter of wp_check_filetype_and_ext() from _wp_handle_upload(), and update corresponding documentation.
Previously when the `mimes` element was not specified in the overrides array passed to `_wp_handle_upload()` it resulted in boolean false being passed to this parameter, which is incorrect. The fallback value should be `null`.

Props platonkristinin, pkbhatt

Fixes #58349

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


git-svn-id: http://core.svn.wordpress.org/trunk@55384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 19:46:22 +00:00
John Blackbourn
ffd2a5bb95 Cron API: Attempt to raise the PHP memory limit for cron event processing.
Since cron events often consume extra memory by nature, it makes sense to give them the full amount available by default. In practice this means the memory will be increased to `WP_MAX_MEMORY_LIMIT` (which is 256MB by default) during cron event processing if the default memory limit is lower than this value.

The new `cron_memory_limit` filter can be used to adjust this value if necessary.

Note that this change will not by default affect external means of processing cron events, such as the `wp cron` command in WP-CLI, server-level crontab events, or any other cron event processing mechanism that bypasses `wp-cron.php`.

Props iandunn, thakkarhardik

Fixes #56628

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


git-svn-id: http://core.svn.wordpress.org/trunk@55383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 18:48:19 +00:00
John Blackbourn
bb9b9d17f4 Docs: Miscellaneous corrections and improvements to docblocks.
See #57840

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


git-svn-id: http://core.svn.wordpress.org/trunk@55382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 17:45:21 +00:00
Sergey Biryukov
37e599fb3e Upgrade/Install: Avoid an extra database query in populate_network().
This moves the query for user ID of the new network's administrator closer to where the value is actually used.

Includes removing unnecessary `get_userdata()` call, as user ID is the only data needed here.

Follow-up to [12756], [35575], [43628].

Props nihar007, sakibmd, mukesh27, costdev, SergeyBiryukov.
Fixes #58423.
Built from https://develop.svn.wordpress.org/trunk@55869


git-svn-id: http://core.svn.wordpress.org/trunk@55381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 14:34:22 +00:00
Sergey Biryukov
6d16bbc088 Docs: Add a @since tag for the pre_wp_setup_nav_menu_item filter.
Includes moving the unit test next to the other `wp_setup_nav_menu_item()` tests and using the `MockAction` class to confirm that the filter runs.

Follow-up to [55867].

Props TobiasBg.
Fixes #56577.
Built from https://develop.svn.wordpress.org/trunk@55868


git-svn-id: http://core.svn.wordpress.org/trunk@55380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 14:13:22 +00:00
Andrew Ozz
91b653f5cd Menus: Add a short-circuit filter to wp_setup_nav_menu_item().
Props: davidbinda, ironprogrammer, andizer.
Fixes: #56577.
Built from https://develop.svn.wordpress.org/trunk@55867


git-svn-id: http://core.svn.wordpress.org/trunk@55379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-30 11:21:26 +00:00
Sergey Biryukov
f4b232f74c Coding Standards: Use strict comparison in wp-admin/includes/schema.php.
Follow-up to [12756], [12862], [12880], [13070], [14485], [17928], [18899], [41348], [43628].

Props faisalahammad, aristath, poena, afercia, SergeyBiryukov.
Fixes #58042, #58047. See #57839.
Built from https://develop.svn.wordpress.org/trunk@55866


git-svn-id: http://core.svn.wordpress.org/trunk@55378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-29 16:26:22 +00:00
Pascal Birchler
30593b01b4 I18N: Improve _load_textdomain_just_in_time() logic when there are no translation files.
Fixes a performance issue where the JIT logic is invoked for every translation call if the there are no translations in the current locale. With this change, the information is cached by adding `Noop_Translations` instances to the global `$l10n` array. This way, `get_translations_for_domain()` returns earlier, thus avoiding subsequent `_load_textdomain_just_in_time()` calls.

Props swissspidy, johnbillion, ocean90.
Fixes #58321.
Built from https://develop.svn.wordpress.org/trunk@55865


git-svn-id: http://core.svn.wordpress.org/trunk@55377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-29 08:36:23 +00:00
Sergey Biryukov
4581452e2b Users: Make sure bulk actions are only executed with the Apply button, not Change.
The Change button is supposed to perform the “Change role to...” action only, but could unintentionally be used for other bulk actions if the role was not selected.

This commit removes an extra check and ensures the correct error message is displayed in that case:

 Sorry, you are not allowed to give users that role.

Follow-up to [6990], [8691], [9028], [15576], [15642], [34636], [49944].

Props haritpanchal, costdev, ankit-k-gupta, SergeyBiryukov.
Fixes #57952.
Built from https://develop.svn.wordpress.org/trunk@55864


git-svn-id: http://core.svn.wordpress.org/trunk@55376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-28 11:46:24 +00:00
Sergey Biryukov
ac66d2f01e Themes: Use correct escaping function for aria-label in _navigation_markup().
Follow-up to [46236].

Props sabernhardt, costdev, mukesh27.
Fixes #58387.
Built from https://develop.svn.wordpress.org/trunk@55863


git-svn-id: http://core.svn.wordpress.org/trunk@55375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-27 09:53:25 +00:00
Pascal Birchler
afd88c4ac7 I18N: Refactor determine_locale() for performance and readability.
Refactors the function to avoid unnecessary `get_locale()` calls and slightly improve performance, while keeping it readable.

Adds tests.

Props Cybr, spacedmonkey, swissspidy.
Fixes #58317.
Built from https://develop.svn.wordpress.org/trunk@55862


git-svn-id: http://core.svn.wordpress.org/trunk@55374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-26 17:57:23 +00:00
Weston Ruter
4e30de26c6 Bundled Themes: Remove/disable obsolete IE-specific skip-link-focus-fix.
* Removes script from the `wp_print_footer_scripts` action in Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One.
* Switches enqueue functions to just register the scripts in Twenty Fifteen, Twenty Sixteen, and Twenty Seventeen.
* Rearranges Twenty Seventeen's scripts to connect `twentyseventeenScreenReaderText` with the global script instead of the unused skip link fix.
* Updates scripts in Twenty Fifteen and Twenty Sixteen with code from Twenty Seventeen _to run on Internet Explorer only_. Twenty Sixteen needed to keep an adjustment that offsets the toolbar and border.
* Removes the script from JS files in Twenty Thirteen and Twenty Fourteen and edits their modified dates.

Props sabernhardt, westonruter, joedolson, flixos90, mukesh27.
Fixes #54421.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-26 17:25:23 +00:00
Sergey Biryukov
9296612464 External Libraries: Update jQuery to version 3.7.0.
This release includes bug fixes, a new `.uniqueSort()` method, and a performance improvement for some use cases when using manipulation methods like `.append()`.

References:
* [https://blog.jquery.com/2023/05/11/jquery-3-7-0-released-staying-in-order/ jQuery 3.7.0 release notes]
* [https://github.com/jquery/jquery/compare/3.6.4...3.7.0 Full list of changes in jQuery 3.7.0]

Follow-up to [49101], [50445], [50520], [54202], [55012], [55491].

Props mgol, jorbin, hbhalodia, desrosj, TobiasBg, audrasjb, mukesh27, naeemhaque, nuhel, SergeyBiryukov.
Fixes #58083.
Built from https://develop.svn.wordpress.org/trunk@55860


git-svn-id: http://core.svn.wordpress.org/trunk@55372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-26 11:33:35 +00:00
antpb
d4c39df308 Media: Prevent scaling up of images in the Image Editor.
Previously, when scaling an image larger than the source size in the image edit states the image would silently fail the scaling action. This patch provides an error when someone attempts to scale an image larger than the source size while also disabling the button to initiate the action. 

Props brookedot, joedolson, markoheijnen, mikeschroder, desrosj, Mista-Flo, costdev.
Fixes #26381.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 15:17:19 +00:00
audrasjb
1dc049b06c Formatting: Add support for schwa in remove_accents().
This changeset adds support for schwa character. Ə (U+018F) and ə (U+0259) are part of Latin Extended-B and used in 
several languages like Azerbaijani or also in gender neutral Italian.

Props suleymankenar, audrasjb, przemekhernik.
Fixes #57609.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 13:14:20 +00:00
Sergey Biryukov
956be813b6 Coding Standards: Improve formatting of some SQL queries for better readability.
This corrects the placement of double quotes around the query and makes sure the alignment is consistent.

Props umeshmcakadi, mukesh27, krupalpanchal, dhrumilk, SergeyBiryukov.
Fixes #58372.
Built from https://develop.svn.wordpress.org/trunk@55857


git-svn-id: http://core.svn.wordpress.org/trunk@55369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 12:55:19 +00:00
spacedmonkey
d8c4000c53 Comments: Move wp_queue_comments_for_comment_meta_lazyload function to the correct file.
As of [55855] wp_queue_comments_for_comment_meta_lazyload was deprecated. But deprecate to wp-admin/deprecated.php and not wp-includes/deprecated.php.This is incorrect, as this is a public function and not an admin function. 

Props SergeyBiryukov, spacedmonkey.
See #58301.
Built from https://develop.svn.wordpress.org/trunk@55856


git-svn-id: http://core.svn.wordpress.org/trunk@55368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 10:55:19 +00:00
spacedmonkey
3c5d179fc9 Comments: Deprecate wp_queue_comments_for_comment_meta_lazyload function.
As of [55749] wp_queue_comments_for_comment_meta_lazyload is no longer used in core. This commit, deprecates this function. Update docs and tests accordingly.

Props sh4lin, spacedmonkey, costdev, peterwilsoncc.
Fixes #58301.
Built from https://develop.svn.wordpress.org/trunk@55855


git-svn-id: http://core.svn.wordpress.org/trunk@55367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-25 10:31:23 +00:00
spacedmonkey
2cd27b2349 Options, Meta APIs: Change the option can_compress_scripts to be autoloaded.
Ensure that the option `can_compress_scripts` is autoloaded on single sites, as this option is used in all requests. This change saves one database query per page request. 

Props RavanH, spacedmonkey, costdev, azaozz, flixos90.
Fixes #55270.
Built from https://develop.svn.wordpress.org/trunk@55854


git-svn-id: http://core.svn.wordpress.org/trunk@55366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-24 17:35:18 +00:00
Sergey Biryukov
f93e6ec4e8 Help/About: Reverse the order of conditionals for displaying the "Go to Updates" link.
`isset()` is faster than `current_user_can()`, so should be checked first.

Includes updating code layout for better readability.

Follow-up to [19442], [19524], [28477], [33466], [55848].

See #57839.
Built from https://develop.svn.wordpress.org/trunk@55853


git-svn-id: http://core.svn.wordpress.org/trunk@55365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-24 10:15:20 +00:00
oandregal
7311e69b59 Loading assets for the editor: Revert [55695].
The changeset [55695] introduced a regression in the order of styles for the editor, causing the styles registered for the block (both editor and front) to be loaded after any other styles enqueued using the `enqueue_block_editor_assets` hook.

Since the original behavior was introduced in WordPress 5.0 changing it breaks the expectations of the ecosystem.

Props ellatrix.
Fixes #58208.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-24 09:24:23 +00:00
Sergey Biryukov
0ecaf73f34 General: Improve performance of the _wp_array_get() function.
When using a block theme, `_wp_array_get()` is the most called function on the front end of a site.

This commit makes a few minor performance optimizations, which add up to a noticeable improvement.

Follow-up to [49135], [49143], [49580].

Props aristath, jrf, afercia, costdev, swissspidy, flixos90, spacedmonkey, mukesh27, samiamnot, SergeyBiryukov.
Fixes #58376.
Built from https://develop.svn.wordpress.org/trunk@55851


git-svn-id: http://core.svn.wordpress.org/trunk@55363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-23 22:00:21 +00:00
Felix Arntz
8f8114fb06 Media: Fix lazy-loading bug by avoiding to modify content images when creating an excerpt.
The `wp_filter_content_tags()` function, which modifies image tags for example to optimize performance, is hooked into the `the_content` filter by default. When rendering an excerpt for a post that doesn't have a manually provided excerpt, the post content is used to generate the excerpt, handled by the `wp_trim_excerpt()` function.

Prior to this changeset, this led to `wp_filter_content_tags()` being called on the content when generating the excerpt, which is wasteful as all tags are stripped from the excerpt, and it furthermore could result in a lazy-loading bug when the post content contained images, as those images were being counted even though they would never be rendered as part of the excerpt.

This changeset fixes the bug and slightly improves performance for generating an excerpt by temporarily unhooking the `wp_filter_content_tags()` function from the `the_content` filter when using it to generate the excerpt.

Props costdev, flixos90, joemcgill, mukesh27, salvoaranzulla, spacedmonkey, thekt12, westonruter.
Fixes #56588.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-23 18:25:19 +00:00
Sergey Biryukov
03436e6d3a Coding Standards: Use strict comparison in wp-includes/theme-compat/comments.php.
Follow-up to [31941], [41285], [55420].

Props sarequl.
See #57839.
Built from https://develop.svn.wordpress.org/trunk@55849


git-svn-id: http://core.svn.wordpress.org/trunk@55361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-23 15:25:24 +00:00
audrasjb
6c9c6cd6ef Help/About: Remove unwanted space in a link located on about.php.
This fixes a small interface glitch in the `Go to Updates` link located on 
the the About screen.

Props NekoJonez, mukesh27, sumitbagthariya16, ahsannayem.
Fixes #58373.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-22 20:04:22 +00:00
Felix Arntz
c6f9238b77 Media: Conditionally skip lazy-loading on images before the loop to improve LCP performance.
When the logic to exclude images that likely appear above the fold from being lazy-loaded was introduced in WordPress 5.9, initially only images that appear within the main query loop were being considered. However, there is a good chance that images above the fold are rendered before the loop starts, for example in the header template part.

It is particularly common for a theme to display the featured image for a single post in the header. Based on HTTP Archive data from February 2023, the majority of LCP images that are still being lazy-loaded on WordPress sites use the `wp-post-image` class, i.e. are featured images.

This changeset enhances the logic in `wp_get_loading_attr_default()` to not lazy-load images that appear within or after the header template part and before the query loop, using a new `WP_Query::$before_loop` property.

For block themes, this was for the most part already addressed in [55318], however this enhancement implements the solution in a more generally applicable way that brings the improvement to classic themes as well.

Props thekt12, flixos90, spacedmonkey, costdev, zunaid321, mukesh27.
Fixes #58211.
See #53675, #56930.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-22 19:13:21 +00:00
Sergey Biryukov
e182459c6d Administration: Add missing escaping for CSS classes on the body tag in the admin.
Follow-up to [5892], [10823], [10868], [18882], [21014], [22000], [48060].

Propos rafiem, costdev, dd32, audrasjb, westonruter, SergeyBiryukov.
Fixes #58336.
Built from https://develop.svn.wordpress.org/trunk@55846


git-svn-id: http://core.svn.wordpress.org/trunk@55358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-05-22 14:16:19 +00:00