48207 Commits

Author SHA1 Message Date
Pascal Birchler
b447190e4c Build/Test Tools: Compare results in performance measurement workflow.
This extends the performance test workflow added in [55459] to also run tests against the target branch (if running on a pull request) or the previous commit (if running on trunk).

Those results are then compared with the ones from the current commit, and the difference is displayed as a GitHub Actions workflow summary for convenience.

Props mukesh27, flixos90, desrosj, joemcgill, swissspidy.
Fixes #58358, #58359.
See #56150.

git-svn-id: https://develop.svn.wordpress.org/trunk@56506 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-01 17:24:56 +00:00
Sergey Biryukov
36fe58a8c6 Upgrade/Install: Remove unused globals in core_upgrade_preamble().
Follow-up to [49638].

Props upadalavipul.
See #59254.

git-svn-id: https://develop.svn.wordpress.org/trunk@56505 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-01 11:05:32 +00:00
Sergey Biryukov
9f3b57d473 Media: Remove unused $is_IE and $is_opera globals in media_upload_form().
Follow-up to [27316].

Props upadalavipul.
See #59254.

git-svn-id: https://develop.svn.wordpress.org/trunk@56504 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-01 11:01:24 +00:00
Isabel Brison
0b40c80d0d Editor: Don't use fluid layout value in typography.
Changes fluid typography calculation to use fallback value if layout wide size is a fluid value.

Props ramonopoly, mukesh27, jastos, aurooba.
See #58754.


git-svn-id: https://develop.svn.wordpress.org/trunk@56503 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-01 04:01:23 +00:00
Isabel Brison
3c98d25402 Editor: Preserve block style variations when securing theme.
Adds the ability to process block style variations to the `remove_insecure_properties` function of theme json class.

Props dsas, ramonopoly.
Fixes #59108.


git-svn-id: https://develop.svn.wordpress.org/trunk@56502 602fd350-edb4-49c9-b593-d223f7449a82
2023-09-01 02:51:55 +00:00
Tonya Mork
13531cc3bd Tests: Remove webfonts tests.
Removes the test file and `webfonts` directory for the stopgap code that was deprecated by [56500].

Follow-up to [56500], [53282].

Fixes #59165.

git-svn-id: https://develop.svn.wordpress.org/trunk@56501 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-31 22:16:05 +00:00
Tonya Mork
c29b095e76 Introduce font-face styles generator and printer.
Introducing Font Face, a server-side `@font-face` styles generator and printer. 

tl;dr:
* Introduces Font Face.
* Deprecates `_wp_theme_json_webfonts_handler()`.

**Introduce Font Face**

From an array of fonts (i.e. each font-family and its font variations to be processed), it:

1. Validates each `font-face` declaration, i.e. the CSS property and value pairing. If validation fails, processing stops with no font-face styles printed.
3. Generates the `@font-face` CSS for each font-family.
4. Prints the CSS within a `<style id="wp-fonts-local">` element.

The entry point into Font Face is through a new global function called `wp_print_font_faces()`, which is automatically called:

* when the `'wp_head'` hook runs (for the front-end).
* when the `'admin_print_styles'` hook runs (for the back-end).
* when `_wp_get_iframed_editor_assets()` runs to inject the `@font-face` styles into the iframed editor.

Once called, it gets the fonts from Theme_JSON merged data layer, which includes theme defined fonts and user activated fonts (once the Font Library #59166 is introduced into Core).

For classic sites, themes and plugins can directly call `wp_print_font_faces()` and pass their fonts array to it for processing.

**Deprecates `_wp_theme_json_webfonts_handler()`.**

As Font Face is a direct replacement, the stopgap code in `_wp_theme_json_webfonts_handler()` (introduced in 6.0.0 via [53282]) is deprecated and unused in Core.

**Props note:**
There's a long multiple year history baked into Font Face, which dates back to the early versions of a web font API (see #46370 and [https://github.com/WordPress/gutenberg/issues/41479 roadmap]. The props list includes those who contributed from those early versions up to this commit.

**References:**
* #46370 original (Web)Fonts API proposal for registering and enqueuing web fonts.
* [https://github.com/WordPress/gutenberg/issues/41479 Gutenberg tracking issue] which includes the evolution from Webfonts API to Fonts API to Font Face.
* [53282] / #55567 Added the stopgap code `_wp_theme_json_webfonts_handler()` in 6.0.
* [https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face @font-face on mdn web docs]
* #59166 Font Library: Font manager for WordPress

Follow-up to [53282].

Props aristath, jonoaldersonwp, hellofromTonya, andraganescu, annezazu, antonvlasenko, arena, askdesign, azaozz, bph, bradley2083, colorful-tones, costdev, davidbaumwald, desrosj, dingo_d, djcowan, domainsupport, dryanpress, elmastudio, flixos90, francina, garrett-eclipse, gigitux, grantmkin, grapplerulrich, gziolo, ironprogrammer, jb510, jeffpaul, jeremyyip, jffng, joostdevalk, jorgefilipecosta, juanmaguitar, mamaduka, matveb, mburridge, mitogh, ndiego, ntsekouras, oandregal, ocean90, oglekler, paaljoachim, pagelab, peterwilsoncc, poena, priethor, scruffian, SergeyBiryukov, shiloey, simison, skorasaurus, soean, westonruter, wildworks, zaguiini.
Fixes #59165.

git-svn-id: https://develop.svn.wordpress.org/trunk@56500 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-31 21:47:40 +00:00
Jb Audras
54a177910a Coding Standards: Remove unused global variables in various /wp-admin/includes/ files.
Props upadalavipul.
Fixes #59254.





git-svn-id: https://develop.svn.wordpress.org/trunk@56499 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-31 14:43:36 +00:00
Sergey Biryukov
9879434020 Build/Test Tools: Enable running the tests on PHP 8.3.
PHP 8.3 is expected to be released at the end of November 2023.

Enabling the tests to run in CI on PHP 8.3 allows WordPress core to start getting ready.

Note: Xdebug-related tests will not be run on PHP 8.3 at this time as the Docker image for PHP 8.3 does not contain Xdebug yet. Once a stable release of Xdebug 3.3.0 is available, it can be added to the Docker image and the test step can then be enabled for PHP 8.3.

Follow-up to [53922], [56492], [56495].

Props jrf, costdev.
See #59231.

git-svn-id: https://develop.svn.wordpress.org/trunk@56498 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-31 10:15:42 +00:00
Jb Audras
a023fbce18 Upload: Add a MIME type exception for .docx generated by Google Docs.
This changeset adds an exception to prevent permission issues on `.docx` generated by Google Docs. This is a temporary fix for an upstream bug on the `finfo_file()` 
PHP function which returns a redundant MIME type for these documents.

Props winterstreet, jakariaistauk, mujuonly, mi5t4n, annashopina, audrasjb, azaozz, mikeschroder, oglekler.
Fixes #57898.





git-svn-id: https://develop.svn.wordpress.org/trunk@56497 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-30 22:30:06 +00:00
Jb Audras
39db9a6775 Editor: Add relative time strings for the wp-date inline script output.
This changeset updates `wp_default_packages_inline_scripts()` to add relative time strings to the `wp-date` inline script, so the JS version of `human_time_diff` 
can output translated strings.

Props ramonopoly, oandregal, swissspidy, manzoorwanijk, adrianduffell, Presskopp.
Fixes #59219, #47373.





git-svn-id: https://develop.svn.wordpress.org/trunk@56496 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-30 22:09:20 +00:00
Jb Audras
98284ae792 HTTP API: Update WP_Http class to avoid PHP deprecation warnings.
This changeset prevents a PHP 8.3 deprecation shown when enabling debug and calling `get_class()` without arguments.

For more info about this deprecation, see https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#get_class_and_get_parent_class.

Props ipajen, rajinsharwar, SergeyBiryukov, jrf.
Fixes #58876.





git-svn-id: https://develop.svn.wordpress.org/trunk@56495 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-30 22:07:13 +00:00
Colin Stewart
bc92bb0cba General: Replace two esc_url_raw() calls in core with sanitize_url().
This aims to improve performance by calling `sanitize_url()` directly, instead of the `esc_url_raw()` wrapper. As of WordPress 6.1, `sanitize_url()` is the recommended function for sanitizing a URL for database or redirect usage.

This replaces the two remaining instances of `esc_url_raw()` with `sanitize_url()` in WordPress core.

Follow-up to [53455], [53933], [54522].

Props rajinsharwar, SergeyBiryukov.
Fixes #59247.

git-svn-id: https://develop.svn.wordpress.org/trunk@56494 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-30 20:23:18 +00:00
Bernie Reiter
973b4565ee HTML API: Stop processing HTML when encountering unsupported markup.
It was a design goal of the HTML Processor to abort processing its input document when encountering unsupported markup. Unfortunately there was no test for this and so-far, the HTML Processor has paused, but continued processing in these situations.

In this patch a new test ensures that the HTML Processor stops and refuses to move forward after encountering any unsupported markup. It also ensures that it doesn't report any current tag names since unsupported markup could imply that the read tag name is different than the parsed tag name.

Props dmsnell.
Fixes #59167.

git-svn-id: https://develop.svn.wordpress.org/trunk@56493 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-30 15:37:33 +00:00
Sergey Biryukov
c6088bb590 Tests: Correct uses of ReflectionProperty::setValue() for static properties.
The single parameter signature, which was used for setting the value on a static property, is deprecated since PHP 8.3. A cross-version solution is to pass `null` as the first parameter.

This commit updates all the instances that use the deprecated signature in WordPress core.

Reference: [https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue PHP RFC: Deprecate functions with overloaded signatures: ReflectionProperty::setValue()].

Follow-up to [53152], [54493], [54799].

Props jrf, costdev, Tests: Correct uses of `ReflectionProperty::setValue()` for static properties.

The single parameter signature, which was used for setting the value on a static property, is deprecated since PHP 8.3. A cross-version solution is to pass `null` as the first parameter.

This commit updates all the instances that use the deprecated signature in WordPress core.

Reference: [https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue PHP RFC: Deprecate functions with overloaded signatures: ReflectionProperty::setValue()].

Follow-up to [53152], [54493], [54799].

Props jrf, costdev, sc0ttkclark.
See #59231.

git-svn-id: https://develop.svn.wordpress.org/trunk@56492 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-30 10:49:27 +00:00
Joe McGill
e278fe3fcf Posts, Post Types: Avoid redundant SQL query in get_pages().
This avoids an additional query by passing the query args directly to the `WP_Query::query()` method, rather than to the constructor and calling get_posts(), following [55569].

Props david.binda, azaozz, spacedmonkey, mukesh27, flixos90, SergeyBiryukov, joemcgill.
Fixes #59224.


git-svn-id: https://develop.svn.wordpress.org/trunk@56491 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-29 22:11:22 +00:00
Joe McGill
3d2f4d5a88 Posts, Post Types: Reinstate missing sort_column options in get_pages().
This fixes an issue introduced in [55569] that broke sort ordering by `post_modified_gmt` or `modified_gmt`.

Props david.binda, azaozz, spacedmonkey, flixos90, joemcgill.
Fixes #59226.


git-svn-id: https://develop.svn.wordpress.org/trunk@56490 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-29 22:03:25 +00:00
Pascal Birchler
ab5fd4d56a Site Health: fix check name used for REST API permission checks.
Updates the calls to permission validation calls for the `directory-sizes` and `page-cache` routes to actually match the route names.

Follow-up to r54043 and r49154.

Props szepeviktor.
Fixes #59236

git-svn-id: https://develop.svn.wordpress.org/trunk@56489 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-29 15:39:13 +00:00
Pascal Birchler
ec94944ae4 Media: Prevent warning if [caption] shortcode is used without attributes.
Props maltfield, aslamdoctor.
Fixes #59206.

git-svn-id: https://develop.svn.wordpress.org/trunk@56488 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-29 15:33:43 +00:00
Sergey Biryukov
61cd1a5210 External Libraries: Upgrade PHPMailer to version 6.8.1.
This is a minor maintenance release.

Note: WordPress core does not include PHPMailer's DSN class, as it is not particularly relevant for WP.

References:
* [https://github.com/PHPMailer/PHPMailer/releases/tag/v6.8.1 PHPMailer 6.8.1 release notes]
* [https://github.com/PHPMailer/PHPMailer/compare/v6.8.0...v6.8.1 Full list of changes in PHPMailer 6.8.1]

Follow-up to [50628], [50799], [51169], [51634], [51635], [52252], [52749], [52811], [53500], [53535], [53917], [54427], [54937], [55557].

Props jrf, Synchro.
Fixes #59238.

git-svn-id: https://develop.svn.wordpress.org/trunk@56484 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-29 13:44:54 +00:00
John Blackbourn
7c254c5510 Privacy: Improve docblocks for hooks and functions related to personal data export and erasure.
See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56482 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-28 21:51:44 +00:00
Aaron Jorbin
03290de92d External Libraries: Update jQuery to version 3.7.1.
This release fixes a regression from jQuery 3.6.0 that resulted in rounded dimensions for `<tr />` elements in Chrome and Safari. Also, a (mostly) internal Sizzle method, `jQuery.find.tokenize` that was on the jQuery object was accidentally removed when they removed Sizzle in jQuery 3.7.0. That method has been restored.

References:
- https://blog.jquery.com/2023/08/28/jquery-3-7-1-released-reliable-table-row-dimensions/
- https://github.com/jquery/jquery/compare/3.7.0...3.7.1

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

Props TobiasBg, jorbin.
Fixes #59227.



git-svn-id: https://develop.svn.wordpress.org/trunk@56481 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-28 17:12:46 +00:00
Sergey Biryukov
7cf05166a6 XML-RPC: Remove unused wpdb global in wp_xmlrpc_server::mw_newMediaObject().
Follow-up to [2676], [4961], [5008], [24716], [34578].

Props upadalavipul.
See #59185.

git-svn-id: https://develop.svn.wordpress.org/trunk@56480 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-28 14:35:50 +00:00
John Blackbourn
13becfa68b Editor: Replace some accidental double setting up of tests with proper tearing down.
See #55505, #58955


git-svn-id: https://develop.svn.wordpress.org/trunk@56479 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-27 20:32:16 +00:00
John Blackbourn
28cb706629 Users: Call add_user_meta() instead of update_user_meta() when adding metadata to a new user.
This improves the performance of inserting users as it removes one unnecessary `SELECT` query for every row of metadata inserted.

Props swissspidy, spacedmonkey, johnbillion

Fixes #59212


git-svn-id: https://develop.svn.wordpress.org/trunk@56478 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-27 12:21:33 +00:00
Sergey Biryukov
29c2f0154c Users: Remove unused wpdb global in check_password_reset_key().
Follow-up to [45716].

Props upadalavipul.
See #59185.

git-svn-id: https://develop.svn.wordpress.org/trunk@56477 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-27 04:47:47 +00:00
John Blackbourn
49f61a73d6 Database: Improve the documentation for various methods in the wpdb class.
See #58833


git-svn-id: https://develop.svn.wordpress.org/trunk@56476 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-26 18:09:07 +00:00
John Blackbourn
f71140438b Database: Remove support for the mysql extension.
The `mysql` extension is no longer used in PHP 7 or above. There's a good amount of conditional code in `wpdb` and the health checks that can be removed now that only the `mysqli` functions are used.

Fixes #59118


git-svn-id: https://develop.svn.wordpress.org/trunk@56475 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-26 13:01:05 +00:00
Sergey Biryukov
7ed2467c3a Docs: Fix typo in a translator comment in _deprecated_class().
Includes a few other formatting adjustments for consistency.

Follow-up to [48327], [56467], [56471].

See #58833.

git-svn-id: https://develop.svn.wordpress.org/trunk@56474 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-26 04:47:09 +00:00
Jb Audras
7f38f687c4 Upgrade/Install: Add missing escaping function for get_option( 'home' ) in upgrade.php.
Props dilipbheda.
Fixes #59199.




git-svn-id: https://develop.svn.wordpress.org/trunk@56473 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 05:42:43 +00:00
Jb Audras
e0e36e63fe Docs: Improve PHPCS comments general consistency.
Props nekojonez.
See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56472 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 05:09:09 +00:00
Jb Audras
73f7ecce4c Docs: Docblock improvements in _deprecated_class() function, as per docblocks standards.
Follow-up to [56467].

See #58833.




git-svn-id: https://develop.svn.wordpress.org/trunk@56471 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 05:02:53 +00:00
Drew Jaynes
2f76410f8b Fix coding standards for Tests_Admin_wpUserSearch
See #41125.


git-svn-id: https://develop.svn.wordpress.org/trunk@56470 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 03:42:48 +00:00
Drew Jaynes
8fd9604f14 Properly deprecate both constructors in WP_User_Search.
- `__construct()` gets the new `_deprecated_class()` function
- `WP_User_Search` PHP4 style constructor is changed from `_deprecated_function()` to `_deprecated_constructor()`

Adds a test to confirm `WP_User_Search` class is testable as deprecated.

Props jrf, DrewAPicture.
Fixes #41125.


git-svn-id: https://develop.svn.wordpress.org/trunk@56469 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 03:35:59 +00:00
Drew Jaynes
515634ffff Fix coding standards for translatable _deprecated_class() message strings
See #41125


git-svn-id: https://develop.svn.wordpress.org/trunk@56468 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 03:33:25 +00:00
Drew Jaynes
4ef1036e69 Introduce a _deprecated_class() function.
Similar to other function in the `_deprecated_*` series, `_deprecated_class()` comes with two new hooks: `deprecated_class_run` and `deprecated_class_trigger_error`.

Support has also been added for setting class deprecation expectations in tests.

Props jrf, wvega, ohryan.
See #41125.


git-svn-id: https://develop.svn.wordpress.org/trunk@56467 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 03:24:00 +00:00
Sergey Biryukov
a5e6100443 Coding Standards: Use strict comparison in wp-includes/class-wp-widget.php.
Follow-up to [10764], [10912], [11427].

Props aristath, poena, afercia, SergeyBiryukov.
See #58831.

git-svn-id: https://develop.svn.wordpress.org/trunk@56466 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-25 01:26:01 +00:00
Jonathan Desrosiers
a8a0bf0cc8 Build/Test Tools: Ensure database containers are prepared for commands.
By default, Docker waits for a container to be started before considering it “ready”. But this does not necessarily mean that it’s ready to receive commands.

This adds a check that ensures the database container is ready to receive commands before proceeding with running commands.

Follow up to [56439], [56440], [56443].

Props rmccue, desrosj.
See #30462, #58867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56464 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 21:02:47 +00:00
Peter Wilson
218fbd91ab Block Editor: Update SVN props to ignore new asset files.
Update svn props to ignore additional CSS files added to WordPress 6.3.

Fixes #59197.



git-svn-id: https://develop.svn.wordpress.org/trunk@56463 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 21:00:06 +00:00
Adam Silverstein
a84270a1b0 Customizer: use the correct X-Robots-Tag header.
Fix an issue where the `X-Robots` header was used instead of the `X-Robots-Tag` header.  Using `X-Robots-Tag` yields the correct behavior that the original code intended to add. `X-Robots` is left in place for backward compatibility.

Props michelleblanchette, dhruvishah2203, rajinsharwar, jorbin, hztyfoon, elrae. 

Fixes #58865.



git-svn-id: https://develop.svn.wordpress.org/trunk@56462 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 20:48:40 +00:00
Weston Ruter
f085426605 Build Tools: Avoid doing copy:dynamic when running grunt watch when using --dev option.
This prevents erroneously copying a file from source onto itself in source.

Props westonruter, jorbin.
Fixes #59196.


git-svn-id: https://develop.svn.wordpress.org/trunk@56461 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 20:40:24 +00:00
Joe Dolson
dfda67a587 Help/About: Match icon and text in Help for bulk edit button.
Change the 'x' in the Help message that instructs a user how to remove an item from a group of bulk edit items to use the dashicon and text equivalent that matches the visual and accessible control name.

Props Presskopp, costdev, sabernhardt, matthewfarlymn, bvreeman22.
Fixes #58785.

git-svn-id: https://develop.svn.wordpress.org/trunk@56460 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 20:25:36 +00:00
K. Adam White
e82474c536 REST API: Remove misleading comment in WP_REST_Blocks_Controller->get_item_schema.
In r56093 schema caching was added above a comment instructing developers not to cache that controller's schema. However, there is no obvious penalty for re-caching schema that is partially derived from a parent.

Caching schema in the same way in every controller is beneficial consistency, and discussion at WCUS2023 contributor day concluded we could remove this comment.

Props ahardyjpl, davidbinda, johnjamesjacoby, TimothyBlynJacobs.

Fixes #59193. See #58657.


git-svn-id: https://develop.svn.wordpress.org/trunk@56459 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 20:21:35 +00:00
Timothy Jacobs
1f66a067d9 General: Use regular core button styles for page header actions.
Props emailjoey, melchoyce, afercia, michaelarestad, danieltj, helen.
Fixes #41986.


git-svn-id: https://develop.svn.wordpress.org/trunk@56458 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 20:14:04 +00:00
David Baumwald
095617ed94 Editor: Optimize wp_get_block_css_selector to remove array_merge calls for better performance.
Some block themes like TT3 use `wp_get_block_css_selector` to determine a CSS selector based on block type and other parameters.  However, recent performance profiling indicated a bottleneck in `wp_get_block_css_selector`, particularly sections that utilize `array_merge`.  By slightly refactoring these sections, `array_merge` calls can be avoided which increases performance.

Props mukesh27, joemcgill, daxelrod, tabrisrp.
Fixes #59178.

git-svn-id: https://develop.svn.wordpress.org/trunk@56457 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 19:57:15 +00:00
Peter Wilson
b1f5563e31 Administration: Escape post type output as field attribute.
Props viralsampat.
Fixes #59190.



git-svn-id: https://develop.svn.wordpress.org/trunk@56456 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 19:41:16 +00:00
Anthony Burchell
0c82e15d72 Performance: Add fallback for $script_uri to prevent firing plugins_url() unnecessarily.
Previously, in `register_block_script_handle()` the `$script_uri` variable initialized with a `plugins_url()` call that was reported to invoke four times. In this patch the var is initialized as a blank string with a fallback to use the `plugins_url()` if the other intended conditions are not met.

Props mukesh27, daxelrod, adamsilverstein, davidbaumwald.
Fixes #59181.


git-svn-id: https://develop.svn.wordpress.org/trunk@56455 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 19:36:16 +00:00
Aaron Jorbin
1fc1e9c888 Login and Registration: Improve test coverage for sign on related functions
Adds new tests to ensure that `wp_authenticate_email_password`, `wp_authenticate_username_password`, and `wp_authenticate_cookie` are better tested. This also unsets cookies properly between tests.

Props JordanPak, johnregan3.
Fixes #36476.


git-svn-id: https://develop.svn.wordpress.org/trunk@56454 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 19:12:33 +00:00
Joe Dolson
0d04972be6 Build/Test: Revert unintentional .env change in [56449].
Also committed a change to .env. Sigh.

Unprops joedolson.
See #56594.

git-svn-id: https://develop.svn.wordpress.org/trunk@56453 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 17:33:04 +00:00
John Blackbourn
f435b0d272 Media: Add a filter to the get_available_post_mime_types() function to allow overriding its database query.
This introduces the `get_available_post_mime_types` filter so this query can be skipped or cached by plugins.

Props maciejmackowiak, archon810, rcorrales

Fixes #52759


git-svn-id: https://develop.svn.wordpress.org/trunk@56452 602fd350-edb4-49c9-b593-d223f7449a82
2023-08-24 16:53:15 +00:00