Commit Graph

48018 Commits

Author SHA1 Message Date
hellofromTonya
50274fbc2b Code Modernization: Deprecate dynamic properties in WP_List_Table magic methods.
The unknown use of unknown dynamic property within the `WP_List_Table` property magic methods is now deprecated. A descriptive deprecation notice is provided to alert developers to declare the property on the child class extending `WP_List_Table`.

Changes in this commit:
* Adds a deprecation notice to the `__get()`, `__set()`, `__isset()`, `__unset()` magic methods, i.e. to alert and inform developers when attempting to get/set/isset/unset a dynamic property.
* Fixes `__get()` to explicitly returns `null` when attempting to get a dynamic property.
* Removes returning the value when setting a declared property, as (a) unnecessary and (b) `__set()` should return `void` [https://www.php.net/manual/en/language.oop5.overloading.php#object.set per the PHP handbook].
* Adds unit tests for happy and unhappy paths.

For backward compatibility, no changes are made to the internal declared properties listed in `$compat_fields` and accessed through the magic methods. 

For example:
A child class uses a property named `$data` that is not declared / defined as a property on the child class. When getting its value, e.g. `$list_table->data`, the `WP_List_Table::__get()` magic method is invoked, the following deprecation notice thrown, and `null` returned:

>The property `data` is not defined. Setting a dynamic (undefined) property is deprecated since version 6.4.0! Instead, define the property on the class.

=== Why not remove the magic methods, remove the `$compat_fields` property, and restore the properties `public`?

tl;dr Backward compatibility.

Several plugins, one of which has over 5M installs, add a property to the `$compat_fields` array. Removing the property would cause an `Undefined property` `Warning` (PHP 8) | `Notice` (PHP 7) to be thrown. Removing the associated code would change the functionality.

=== Why not limit the deprecation for PHP versions >= 8.2?

tl;dr original design intent and inform

The magic methods and `$compat_fields` property were added for one purpose: to continue providing external access to internal properties declared on `WP_List_Table`. They were not intended to be used for dynamic properties.

Deprecating that unintended usage both alerts developers a change is needed in their child class and informs them what to change.

References: 
* Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.
* A [https://www.youtube.com/live/vDZWepDQQVE?feature=share&t=10097 live open public working session] where these changes were discussed and agreed to.
* [https://wiki.php.net/rfc/deprecate_dynamic_properties PHP RFC: Deprecate dynamic properties.]

Related to #14579, #22234, #30891.

Follow-up to [15491], [28493], [28521], [28524], [31146].

Props antonvlasenko, jrf, markjaquith, hellofromTonya, SergeyBiryukov, desrosj, peterwilsoncc, audrasjb, costdev, oglekler, jeffpaul.
Fixes #58896.
See #56034.
Built from https://develop.svn.wordpress.org/trunk@56349


git-svn-id: http://core.svn.wordpress.org/trunk@55861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-02 18:37:21 +00:00
hellofromTonya
d0e63ca7d2 Tests: Fix leakage in WP_List_Table tests.
Fixes `WP_List_table` tests leaking into other tests by:

* Restores the original `$hook_suffix` global value.
Rather than modifying the global for all tests, it now restores the original value between tests. Why? To ensure each test starts at a known state.

* Uses a new instance of `WP_List_Table` for each test.
A test may modify the `$list_table` object. If it does, it could impact tests yet to run. By instantiating a new instance in the `set_up()` test fixture, each test is isolated from the others.

Follow-up to [53868], [54215].

Props hellofromTonya, antonvlasenko.
See #58955, #58896.
Built from https://develop.svn.wordpress.org/trunk@56348


git-svn-id: http://core.svn.wordpress.org/trunk@55860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-02 18:00:22 +00:00
Felix Arntz
6cd7404aa3 Media: Simplify logic in wp_get_loading_optimization_attributes().
While the `wp_get_loading_optimization_attributes()` function was only recently introduced in 6.3, its code was mostly ported over from the now deprecated `wp_get_loading_attr_default()` function introduced in 5.5.

That function started out in a simple way, but over time was expanded with more and more conditionals on when to avoid lazy-loading, which ended up making the logic extremely complex and hard to follow.

This changeset refactors the logic to simplify it, in a way that allows to follow it more sequentially, and without making any functional changes, ensuring that the extensive existing unit test coverage still passes. This will facilitate future enhancements to the function to be less error-prone and make it more accessible to new contributors.

Props flixos90, joemcgill.
Fixes #58891.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-02 17:58:26 +00:00
Sergey Biryukov
9dc13e98d7 Site Health: Use PHP_SAPI constant instead of the php_sapi_name() function.
This is a micro-optimization that removes an unnecessary function call.

Follow-up to [44986], [45156].

Props ayeshrajans, jrf, mukesh27, rmccue.
Fixes #58942.
Built from https://develop.svn.wordpress.org/trunk@56346


git-svn-id: http://core.svn.wordpress.org/trunk@55858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-02 10:59:25 +00:00
Felix Arntz
e80768e045 Themes: Use isset instead of array_key_exists in WP_Theme_JSON class.
With the minimum PHP version requirement raised to 7.0, we can now use `isset` on constants that are arrays. Since `isset` is slightly faster than `array_key_exists` (and the different handling of `null` values is irrelevant for the updates here), remaining instances of `array_key_exists` in the `WP_Theme_JSON` class are replaced in this changeset.

Props soean.
Fixes #57067.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 20:31:25 +00:00
Sergey Biryukov
1364db92bb Upgrade/Install: Pass stored credentials to WP_Filesystem() where appropriate.
With the introduction of temporary backups of plugins and themes before updating, a new Site Health test was added to verify that plugin and theme temporary backup directories are writable or can be created.

When using a non-direct filesystem, the Site Health test did not include the required credentials, leading to a fatal error as the connection was not initialized properly.

This commit attemps to use the stored credentials if available, and displays a message otherwise.

Includes a similar fix in a function that performs a cleanup of the temporary backup directory.

Follow-up to [55720].

Props utsav72640, rajinsharwar, costdev, mukesh27, peterwilsoncc, audrasjb, SergeyBiryukov.
See #58940.
Built from https://develop.svn.wordpress.org/trunk@56341


git-svn-id: http://core.svn.wordpress.org/trunk@55853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 16:07:25 +00:00
ryelle
4a6971f99c Help/About: Add images to About page, match header style to images.
Props richtabor, markoserb, audrasjb, peterwilsoncc, mukesh27.
See #58067.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 15:04:22 +00:00
audrasjb
ed408e3731 Help/About: Escape "Contribute" links, for better consistency.
Props SergeyBiryukov, peterwilsoncc.
See #23348.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 12:58:22 +00:00
audrasjb
41dabe68ee Help/About: Remove target="_blank" from the Contribute link.
Props davidbaumwald.
See #23348.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 12:50:27 +00:00
Sergey Biryukov
7d34c9b149 Coding Standards: Use strict comparison in wp-includes/option.php.
Follow-up to [8784], [25109].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 11:01:28 +00:00
isabel_brison
3e103142ab Editor: second update of npm packages for 6.3 RC3.
Includes bug fixes for footnotes, patterns, command palette, top toolbar and other small regressions.

Props andrewserong, spacedmonkey.
See #58926.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 08:01:54 +00:00
Bernhard Reiter
8fa9aad5e6 HTML API: Add support for SPAN element.
In this patch we're introducing support for the SPAN element, which is the first
in the class of "any other tag" in the "in body" insertion mode.

This patch introduces the mechanisms required to handle that class of tags but
only introduces SPAN to keep the change focused. With the tests and mechanisms
in place it will be possible to follow-up and add another limited set of tags.

It's important that this not use the default catch-all in the switch handling
`step_in_body` because that would catch tags that have specific rules in previous
case statements that aren't yet added. For example, we don't want to treat the
`TABLE` element as "any other tag".

Props dmsnell.
Fixes #58907.
Built from https://develop.svn.wordpress.org/trunk@56331


git-svn-id: http://core.svn.wordpress.org/trunk@55843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 07:56:23 +00:00
isabel_brison
6359762e66 Editor: fix duplication in templates list.
Excludes parent template when a child template is defined during template retrieval.

Props oandregal, mukesh27, flixos90, bgardner.
See #57756.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-01 02:12:24 +00:00
audrasjb
29d0198455 Help/About: Make Contribute links translatable.
Follow-up to [17877], [26354], [35898], [43032], [56220], [56312].

Props sereedmedia, tobifjellner, oglekler, ryelle, fierevere, davidbaumwald, audrasjb.
See #23348.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-31 20:23:21 +00:00
Sergey Biryukov
6035d50bab Coding Standards: Use strict comparison in wp-includes/functions.php.
Follow-up to [5999], [6342], [7406], [8369], [10322], [11288], [11332], [11597], [12405], [13569], [14649], [15806], [19773], [26449], [26926], [39831], [40124].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-31 13:33:24 +00:00
Sergey Biryukov
8aa8b5883a Coding Standards: Use strict comparison in wp-includes/formatting.php.
Follow-up to [1345], [4112], [6974], [24214], [25055], [28831], [32863].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-30 08:53:25 +00:00
Sergey Biryukov
18ca91327a Coding Standards: Use strict comparison in wp-includes/feed-atom-comments.php.
Follow-up to [9818].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-29 00:31:35 +00:00
Weston Ruter
ee1baf955c Script Loader: Delay loading comment-reply script with async loading strategy.
Props westonruter, flixos90, joemcgill, sergiomdgomes.
See #12009.
Fixes #58870.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-28 17:17:24 +00:00
Sergey Biryukov
dcc82c39cc Coding Standards: Use strict comparison in wp-includes/class-wp-roles.php.
Follow-up to [25695], [41625].

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


git-svn-id: http://core.svn.wordpress.org/trunk@55833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-28 11:37:25 +00:00
isabel_brison
bae8871465 Editor: initial update of npm packages for 6.3 RC3.
Includes bug fixes for patterns, command palette and several minor regressions.

Props ramonopoly.
See #58926.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-28 07:40:16 +00:00
Sergey Biryukov
29c16a48ec Coding Standards: Use correct case for class name in WP_Http tests.
Follow-up to [8516], [54968].

Props jrf.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56319


git-svn-id: http://core.svn.wordpress.org/trunk@55831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-27 14:47:20 +00:00
audrasjb
f510e6e9f4 Editor: Revert [56316].
This reverts [56316] as it needs to be fixed by updating npm packages.

Unprops audrasjb.
Props swissspidy.
See #58920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-27 10:10:24 +00:00
audrasjb
82bac32754 Editor: Prevent PHP warning when accessing icon by area.
This changeset prevents an attempt to access an array via a key that doesn't exist.
See https://github.com/WordPress/gutenberg/pull/52961.

Props aaronrobertshaw, glendaviesnz, mukesh27.
Fixes #58920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-27 09:18:21 +00:00
audrasjb
c54adf1d22 Bundled Themes: Bump version numbers for WordPress 6.3.
In coordination with the release of 6.3, a new version of each bundled theme will also be released. This bumps the version of each theme to the following:

- Twenty Ten: 3.9
- Twenty Eleven: 4.4
- Twenty Twelve: 4.0
- Twenty Thirteen: 3.9
- Twenty Fourteen: 3.7
- Twenty Fifteen: 3.5
- Twenty Sixteen: 3.0
- Twenty Seventeen: 3.3
- Twenty Nineteen: 2.6
- Twenty Twenty: 2.3
- Twenty Twenty-One: 1.9
- Twenty Twenty-Two: 1.5
- Twenty Twenty-Three: 1.2

Props mukesh27, hareesh-pillai, audrasjb, jakariaistauk, kafleg, sabernhardt, spacedmonkey.
Fixes #57857.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-26 22:09:22 +00:00
Joe McGill
55a90c82d5 Script Loader: Add support for font-display: optional.
This adds `optional` to the list of valid `font-display` values that can be used when validating webfonts.

Props merel1988, asafm7, mukesh27.
Fixes #58454.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-26 19:23:21 +00:00
Joe McGill
859cf639a6 Build/Test Tools: Run performance tests using production env vars.
This sets the following environment variables when running automated performance tests to avoid side effects that can skew performance data when the default development environment variables are used:

* `SAVEQUERIES`: `false`
* `SCRIPT_DEBUG`: `false`
* `WP_DEBUG`: `false`
* `WP_DEVELOPMENT_MODE`: `''`

Props rajinsharwar, desrosj, mukesh27, joemcgill.
Fixes #58825.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-26 19:13:23 +00:00
Sergey Biryukov
d50b1048f3 Help/About: Update “Get involved in WordPress” link on the Credits tab.
This commit updates the link URL to send contributors to an orientation tool for a short survey on what team they may be interested in joining. This coincides with the Get Involved tab.

Follow-up to [17877], [26354], [35898], [43032], [56220].

Props courane01, audrasjb.
See #23348.
Built from https://develop.svn.wordpress.org/trunk@56311


git-svn-id: http://core.svn.wordpress.org/trunk@55823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-26 11:51:25 +00:00
audrasjb
99366f31d2 Help/About: Fix the Get Involved tab on Network Admin.
This changeset adds a `wp-admin/network/contribute.php` file to allow the Get Involved tab to work on Network Admin.

Props courane01, ryelle, audrasjb.
See #23348.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 21:34:27 +00:00
desrosj
1afe1d9f5e Build/Test Tools: Restore automatically retrying failed E2E tests once.
This restores the GitHub Actions job responsible for automatically retrying a failed workflow once within the E2E testing workflow.

[56198] disabled Slack notifications for this workflow because of the increased number of timeout errors occurring after recent changes until they could be further investigated. Even though the signal-to-noise ration was way too high, there’s still benefit in retrying the workflow once to see if the timeout can be resolved without human intervention. The one retry attempt will not result in any Slack notifications.

Follow up to [56198].
See #58779.
Built from https://develop.svn.wordpress.org/trunk@56308


git-svn-id: http://core.svn.wordpress.org/trunk@55820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 18:19:31 +00:00
audrasjb
888e60a012 Editor: Fix conditionals in Template Editing Mode.
Previously, Site Editor client-side routing started using only the path query argument for loading non-editor views. The router removed the `postType` query 
argument, which caused an error message to be displayed when the template parts list page was reloaded.

This changeset fixes the issue as it was affecting hybrid themes.

Props Mamaduka, isabel_brison, ramonopoly.
Fixes #58889.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 14:33:23 +00:00
Sergey Biryukov
80e5ebb0cc Coding Standards: Always declare visibility for class methods.
This adds a missing `public` keyword for `WP_HTML_Tag_Processor::get_attribute_names_with_prefix()`.

Follow-up to [55203].

Props jrf.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56301


git-svn-id: http://core.svn.wordpress.org/trunk@55813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 13:16:21 +00:00
audrasjb
577b07285e Twenty Twenty-One: Enable Dark Mode in the block editor iframe.
This changeset replaces `add_action( 'enqueue_block_editor_assets' )`, with `add_action( 'enqueue_block_assets' )`, in class `Twenty_Twenty_One_Dark_Mode` and class 
`Twenty_Twenty_One_Custom_Colors`. This fixes an issue when activating dark mode in Twenty Twenty-One, where dark mode was not enabled in the block editor.

Props poena, mikinc860, huzaifaalmesbah, hasanuzzamanshamim, Ankit-K-Gupta.
Fixes #58835.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 12:31:21 +00:00
Bernhard Reiter
1612d711dd HTML API: Change wp infix in test classes to Wp.
In order to comply with the test class naming scheme set forth in #56846, rename the test classes covering the HTML API by changing the `wp` infix to `Wp`.

Props dmsnell, costdev.
Fixes #58899. See #56846.
Built from https://develop.svn.wordpress.org/trunk@56299


git-svn-id: http://core.svn.wordpress.org/trunk@55811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 12:19:27 +00:00
isabel_brison
baf1c9d87a Editor: update npm packages with bug fixes for 6.3 RC2.
Includes miscellaneous bug fixes for 6.3 RC12.

Props ramonopoly, audrasjb, swissspidy, peterwilsoncc, joemcgill.
Fixes #58804.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 08:40:23 +00:00
isabel_brison
119459806f Editor: load title on navigation fallback.
Adds raw title property when loading the navigation fallback with an embed context.

Props ramonopoly, get_dave, scruffian, mukesh27, audrasjb.
Fixes #58557.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-25 06:30:20 +00:00
ryelle
b88762dd6e Help/About: Updates to About page.
Update the headers, icons, and avatar style to match the designs. Fix the version strings on embedded images. Remove the tagline on main About page. Update "ctrl" to the correct capitalization, "Ctrl".

Follow-up to [56263].
Props richtabor, markoserb, audrasjb, nekojonez.
See #58067.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 23:39:22 +00:00
ryelle
f5730be053 Administration: Update dashboard welcome panel for 6.3.
Update the background image and styles for the Welcome Panel. This iteration does not use different colors on the admin color schemes, so the CSS for that has been removed. This also adds back in a working "Edit styles" link, which was removed in 6.2 because the link was broken.

Props richtabor, markoserb.
Fixes #58545.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 23:15:23 +00:00
ryelle
0d4890d568 Help/About: Add illustrations to the Get Involved tab
Follow-up to [56220], [56227], [56233], [56234], [56259].
Props richtabor, markoserb.
Fixes #23348.


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


git-svn-id: http://core.svn.wordpress.org/trunk@55802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 22:52:21 +00:00
audrasjb
96d3c045bc Editor: Fix abbreviations of "Example" in block-template-utils.php.
This changeset improves the consistency of the use of "e.g." in template descriptions.

Props jordesign, audrasjb, joedolson.
Fixes #58879.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 20:54:24 +00:00
Sergey Biryukov
2eb4c43a4d Coding Standards: Remove trailing tabs in wp-admin/about.php.
This resolves a WPCS warning:
{{{
Found precision alignment of 2 spaces.
}}}

Follow-up to [56263].

Props jrf.
See #58831, #58067.
Built from https://develop.svn.wordpress.org/trunk@56285


git-svn-id: http://core.svn.wordpress.org/trunk@55797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 13:05:26 +00:00
isabel_brison
d6fac66a83 Editor: fix popover positioning.
Pins the floating-ui package versions to avoid breaking changes when they update.

Props ramonopoly, spacedmonkey, bhrugesh12, huzaifaalmesbah, audrasjb, azaozz.
See #58847.

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


git-svn-id: http://core.svn.wordpress.org/trunk@55796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-24 00:52:23 +00:00
Sergey Biryukov
ffa1d288f3 Coding Standards: Correct alignment in wp-includes/media.php.
This resolves a WPCS warning:
{{{
Found precision alignment of 1 space.
}}}

Follow-up to [55988].

Props jrf.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56283


git-svn-id: http://core.svn.wordpress.org/trunk@55795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-23 16:00:26 +00:00
joedolson
a194e4b762 Media: Fix Image rotation button overflow in translations.
Fix CSS to cover the image rotation button action text being longer than the Image Rotation menu toggle. Prevent the button text from overflowing the button. Follow-up to [56239].

Props kebbet.
Fixes #58877.
Built from https://develop.svn.wordpress.org/trunk@56282


git-svn-id: http://core.svn.wordpress.org/trunk@55794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-22 19:23:25 +00:00
Sergey Biryukov
88ae6ae84f Coding Standards: Always use parentheses for class instantiation.
This addresses a `new stdClass()` instance in `_get_non_cached_ids()` tests.

Follow-up to [55543].

Props jrf.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56281


git-svn-id: http://core.svn.wordpress.org/trunk@55793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-22 12:37:24 +00:00
desrosj
bc4dbee940 General: Commit changes after running precommit:css.
The `{min|max}-device-pixel-ratio` syntax as a a non-standard CSS media feature that was used as an alternative to the now standard `resolution`. Prior to Safari 16.0, `-webkit-{min|max}-device-pixel-ratio` was needed to correctly support it.

This change is a result of the `caniuse-lite` update that was applied recently in [56065]. Though there were no changes to target browsers as a result of this update, it seems an upstream change identified these as unnecessary.

See #57856, #58869.
Props desrosj, joemcgill, isabel_brison.
Built from https://develop.svn.wordpress.org/trunk@56279


git-svn-id: http://core.svn.wordpress.org/trunk@55791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-21 18:06:28 +00:00
joedolson
c619a3d450 Media: Fix height max value in image scaling.
Set the `max` attribute in the height input for image scaling to reference the image height, instead of the width. Follow up to [55919].

Props costdev, joedolson, joemcgill.
Fixes #50523.
Built from https://develop.svn.wordpress.org/trunk@56277


git-svn-id: http://core.svn.wordpress.org/trunk@55789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-21 14:33:22 +00:00
Sergey Biryukov
55ab72cf12 I18N: Add missing translator comment in WP_Upgrader::generic_strings().
This resolves a WPCS warning:
> A gettext call containing placeholders was found, but was not accompanied by a "translators:" comment on the line above to clarify the meaning of the placeholders.

Includes moving `wp-content` out of the translatable string in a similar message in `_wp_delete_all_temp_backups()`.

Follow-up to [55720], [56117].

Props jrf.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56276


git-svn-id: http://core.svn.wordpress.org/trunk@55788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-21 13:33:27 +00:00
Bernhard Reiter
44629e6286 HTML-API: Introduce minimal HTML Processor.
This patch introduces the //first// of //many// iterations on the evolution of the HTML API, the HTML Processor, which is built in order to understand HTML structure including nesting, misnesting, and complicated semantic rules.

In the first iteration, the HTML Processor is arbitrarily limited to a minimal subset of functionality so that we can review it, ship it, test it, and collect feedback before moving forward. This means that this patch is more or less an extension to the Tag Processor query language, providing the ability not only to scan for a tag of a given name, but also to find an HTML element in a specific nesting path.

The HTML Processor also aborts any time it encounters:
 - a tag that isn't a `P`, `DIV`, `FIGURE`, `FIGCAPTION`, `IMG`, `STRONG`, `B`, `EM`, `I`, `A`, `BIG`, `CODE`, `FONT`, `SMALL`, `STRIKE`, `TT`, or `U` tag. this limit exists because many HTML elements require specific rules and we are trying to limit the number of rules introduced at once. this work is targeted at existing work in places like the image block.
 - certain misnesting constructs that evoke complicated resolution inside the HTML spec. where possible and where simple to do reliably, certain parse errors are handled. in most cases the HTML Processor aborts.

The structure of the HTML Processor is established in this patch. Further spec-compliance comes through filling out //more of the same// kind and nature of code as is found in this patch. Certain critical HTML algorithms are partially supported, and where support requires more than is present, the HTML Processor acknowledges this and refuses to operate.

In this patch are explorations for how to verify that new HTML support is fully added (instead of allowing for partial updates that leave some code paths non-compliant). Performance is hard to measure since support is so limited at the current time, but it should generally follow the performance of the Tag Processor somewhat close as the overhead is minimized as much as practical.

Props dmsnell, zieladam, costdev.
Fixes #58517.
Built from https://develop.svn.wordpress.org/trunk@56274


git-svn-id: http://core.svn.wordpress.org/trunk@55786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-20 13:43:25 +00:00
Sergey Biryukov
3a065bfb2c Coding Standards: Correct equals sign alignment in various files.
This resolves a few WPCS warnings:
{{{
Equals sign not aligned with surrounding statements
}}}
so that the output of `composer format` is clean.

Follow-up to [55971], [56033], [56056], [56143], [56214].

Props jrf.
See #58831.
Built from https://develop.svn.wordpress.org/trunk@56273


git-svn-id: http://core.svn.wordpress.org/trunk@55785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-20 00:06:21 +00:00
audrasjb
e992dabb1a Docs: Fix indentation issue in WP_REST_Global_Styles_Revisions_Controller class.
Follow-up to [56082].

See #57840, #58524.



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


git-svn-id: http://core.svn.wordpress.org/trunk@55784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-19 22:53:23 +00:00