Commit Graph

48709 Commits

Author SHA1 Message Date
Sergey Biryukov
5eef2bbb2a Tests: Add unit tests for wp_checkdate().
Follow-up to [21922].

Props pbearne, ironprogrammer, antonvlasenko, SergeyBiryukov.
Fixes #59825.

git-svn-id: https://develop.svn.wordpress.org/trunk@57184 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-12 12:19:38 +00:00
Sergey Biryukov
8e8adbb7c9 Docs: Consistently document the $body_id global as a string.
Includes declaring the global at the beginning of `wp_iframe()` and `iframe_header()`.

Follow-up to [32642], [32643].

Props mukesh27, upadalavipul.
Fixes #60032.

git-svn-id: https://develop.svn.wordpress.org/trunk@57181 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-11 12:09:42 +00:00
Jonathan Desrosiers
8df517867d Build/Test Tools: Group GitHub Action Dependabot updates.
This updates the Dependabot configuration file to make use of `groups`, configuring all third-party GitHub Action updates available into a single pull request to help reduce noise.

Props bradparbs.
See #59805.

git-svn-id: https://develop.svn.wordpress.org/trunk@57180 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-11 11:48:39 +00:00
zieladam
ac4f768222 HTML API: Track spans of text with (offset, length) instead of (start, end).
Updates the internal representation of the text span coordinates. The mixture of (offset, length) and (start, end) coordinates becomes confusing, this commit replaces it with a (offset, length) pair. There should be no functional or behavioral changes in this patch. For the internal helper classes this patch introduces breaking changes, but those classes are marked private and should not be used outside of the HTML API itself.

Props dmsnell.
Fixes #59993.



git-svn-id: https://develop.svn.wordpress.org/trunk@57179 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-10 13:17:29 +00:00
zieladam
1850589256 Build/Test Tools: Fix the workflow that posts a preview link on every Pull Request
Fixes a 403 error in the pull-request-comments.yml job by switching from a custom workflow dispatch call to the pull_request_target trigger.

Follow up to [57124], [57174].
Props ockham.
See #59416.



git-svn-id: https://develop.svn.wordpress.org/trunk@57178 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-10 10:34:12 +00:00
Sergey Biryukov
13e055c90b Docs: Correct the order of steps in the WordPress Core build process workflow.
Follow up to [57124], [57174].

Props swissspidy.
See #59416.

git-svn-id: https://develop.svn.wordpress.org/trunk@57177 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-10 00:19:14 +00:00
Sergey Biryukov
9bfb30462a REST API: Pass correct number of arguments to the comment_text filter.
This ensures that `WP_REST_Comments_Controller::prepare_item_for_response()` passes three arguments to the `comment_text` filter, for consistency with all the other instances in core.

Follow-up to [15957], [16357], [25555], [38832], [40664].

Props sjregan, SergeyBiryukov.
Fixes #58238.

git-svn-id: https://develop.svn.wordpress.org/trunk@57176 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-09 22:11:45 +00:00
Sergey Biryukov
1325c63a0a Upload: Add missing escaping in upload_space_setting().
Follow-up to [https://mu.trac.wordpress.org/changeset/1088 mu:1088], [https://mu.trac.wordpress.org/changeset/1095 mu:1095], [12603].

Props utsav72640.
Fixes #58514.

git-svn-id: https://develop.svn.wordpress.org/trunk@57175 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-08 21:24:26 +00:00
zieladam
be491e2e61 Build/Test Tools: Zip WordPress files before npm run clean
Fixes a problem in WordPress artifact upload pipeline. The callable-test-core-build-process.yml used to zip the WordPress dist directory after npm run grunt clean runs, producing an empty zip file. This commit moves the zip before the cleanup task.

Follow up to [57124].

Props ockham, dmsnell.
See #59416.





git-svn-id: https://develop.svn.wordpress.org/trunk@57174 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-08 16:05:31 +00:00
Jonathan Desrosiers
e1265a3732 Database: Raise the minimum required version of MySQL.
This raises the minimum version of MySQL required to run WordPress from 5.0 to 5.5.5.

MySQL 5.0 and 5.1 have long been unsupported and both reached end of life over 10 years ago. Combined usage for both versions sits at 0.4% of all WordPress sites.

Because 5.5 sits at just under 15% usage, 5.5 cannot be trimmed off at this time.

Of all sites running 5.5.x, 85% are running 5.5.5, and 100% are running 5.5.5 or higher. This makes it the logical landing spot.

Props johnbillion, sergeybiryukov, jorbin.
Fixes #60036.

git-svn-id: https://develop.svn.wordpress.org/trunk@57173 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-08 14:11:11 +00:00
bernhard-reiter
d1f73cd80f Block Hooks: Fix @ticket references in tests, add missing ones.
Some tests that were added in [57157] erroneously set their `@ticket` reference to #59646, rather than #60008.
This changeset rectifies that mistake.

Additionally, it adds ticket references to #60008 to tests that were modified by [57157].

Follow-up to [57157].

See #60008.

git-svn-id: https://develop.svn.wordpress.org/trunk@57172 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-08 11:44:54 +00:00
Isabel Brison
525cd532bf Themes: fix documentation link.
Removes a period from an inline comment of `wp_block_theme_activate_nonce` that broke a link in the comment.

Props stevenlinx, mukesh27.
Fixes #60034.


git-svn-id: https://develop.svn.wordpress.org/trunk@57171 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-08 06:30:02 +00:00
Felix Arntz
d859cbe790 General: Avoid early initialization of variable in get_bloginfo().
This is a very minor, yet simple performance optimization in a commonly called function, avoiding unnecessary initialization of the `$url` variable when it may not be needed. The conditional is simple enough to not use a variable altogether.

Props Cybr, swissspidy.
Fixes #59450.


git-svn-id: https://develop.svn.wordpress.org/trunk@57170 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-07 22:55:28 +00:00
Sergey Biryukov
8035bdaec0 Docs: Improve documentation for Custom_Image_Header and Custom_Background constructors.
Follow-up to [4673], [8656], [12890], [13041].

Props faisalahammad, cadic.
Fixes #58049.

git-svn-id: https://develop.svn.wordpress.org/trunk@57169 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-07 15:12:25 +00:00
Joe McGill
52854e2796 HTML-API: Prevent unintended behavior when WP_HTML_Token is unserialized.
Props dmsnell, peterwilsoncc, dd32, xknown, rawrly, johnbillion, barry, jeffpaul, vortfu, isabel_brison, mikeschroder, jorbin.


git-svn-id: https://develop.svn.wordpress.org/trunk@57163 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-06 16:03:48 +00:00
Sergey Biryukov
0300f8869e Docs: Fix typo in Gettext_Translations::parenthesize_plural_exression() description.
Follow-up to [10584], [12079], [41722], [57161].

Props tohincoderex.
See #59347.

git-svn-id: https://develop.svn.wordpress.org/trunk@57162 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-06 11:52:35 +00:00
Sergey Biryukov
68ded6f3aa I18N: Deprecate Gettext_Translations::parenthesize_plural_exression().
Aside from having a typo in the name, the method is unused by core as of WordPress 4.9.

Follow-up to [10584], [12079], [41722].

Props tohincoderex, jrf.
Fixes #59347.

git-svn-id: https://develop.svn.wordpress.org/trunk@57161 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-06 11:48:04 +00:00
Sergey Biryukov
ee461f010a Administration: Don't unnecessarily escape none or div in the admin menu.
This matches a similar conditional in `wp-admin/menu-header.php`, where these values are handled as special cases and don't output the default menu image so that an icon could be added to `div.wp-menu-image` as CSS background. 

Follow-up to [9578], [21877], [26664].

Props andrewleap, ironprogrammer, azaozz.
Fixes #58361.

git-svn-id: https://develop.svn.wordpress.org/trunk@57159 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-05 13:37:52 +00:00
Sergey Biryukov
7f0b94069d Coding Standards: Add missing escaping in wp-activate.php.
Follow-up to [13884].

Props dilipbheda, mukesh27, pitamdey, nareshbheda.
Fixes #59200.

git-svn-id: https://develop.svn.wordpress.org/trunk@57158 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-04 22:05:51 +00:00
bernhard-reiter
c44432b338 Block Hooks: Store ignored hooked blocks metadata in anchor block.
The biggest tradeoff that was made in the implementation of Block Hooks was that they were limited to layouts (i.e. templates, template parts, and patterns) that ''didn't have any user modifications'' (see #59313 for the reason). This changeset is a preparatory step to remove this limitation, so they’ll eventually also work with user-modified layouts.

The crucial problem to solve is how to acknowledge that a user has opted to remove or persist a hooked block, so that the auto-insertion mechanism won't run again and inject an extraneous hooked block on the frontend when none is solicited.

This is achieved by storing all known blocks hooked to a given anchor block in the `metadata` attribute on that anchor block; specifically in a field called `ignoredHookedBlocks` inside of the `metadata`. Hooked blocks are only rendered on the frontend if they're absent from that field; OTOH, they're injected into that field (via the REST API) when first loaded in the editor.

This simple logic guarantees that once a user modifies a given layout, those changes are respected on the frontend; yet if a plugin that includes a hooked block is activated after those modifications have taken place, the hooked block will be rendered on the frontend. This new technique supplants the one previously used (i.e. rendering hooked blocks on the frontend only if a layout doesn't have any modifications) in a rather direct way.

Note that this changeset only introduces the new metadata field and relevant logic; it does not yet enable hooked block insertion into modified layouts. That will be done in a subsequent step (see #59646).

Props gziolo.
Closes #60008.

git-svn-id: https://develop.svn.wordpress.org/trunk@57157 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-04 20:24:33 +00:00
Felix Arntz
57a5164cbd Themes: Clean up inactive themes' theme mods from being autoloaded as part of upcoming 6.5 upgrade routine.
Alongside [57153], this reduces unnecessarily autoloaded data from inactive themes, which can contribute to slow database performance as part of excessive autoloading. This changeset specifically resolves the issue for existing sites.

Props mukesh27, joemcgill, swissspidy, westonruter, flixos90.
Fixes #59975.
See #39537.


git-svn-id: https://develop.svn.wordpress.org/trunk@57155 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-04 19:49:18 +00:00
Felix Arntz
7ce1281349 Themes: Avoid autoloading the previous theme's theme mods when switching to another theme.
This reduces unnecessarily autoloaded data from inactive themes, which can contribute to slow database performance as part of excessive autoloading.

Props mukesh27, rajinsharwar, igmoweb, joemcgill, swissspidy, westonruter, flixos90.
Fixes #59537.
See #59975.


git-svn-id: https://develop.svn.wordpress.org/trunk@57153 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-04 19:36:27 +00:00
Jonathan Desrosiers
b38a6cf976 Build/Test Tools: Update the MariaDB test strategy matrix.
This updates the test strategy matrix in the PHPUnit test GitHub Actions workflow to include the most recent MariaDB release, 11.2.

While 11.0 and 11.1 are still maintained, all three are short-term stable releases, which see support dropped after 1 year.

Until a larger discussion around how the project supports database software releases with shorter support windows takes place (short-term in MariaDB or “innovation” releases in MySQL), testing only against the latest short-term release should be sufficient.

Props johnbillion, l1nuxjedi.
See #59806.

git-svn-id: https://develop.svn.wordpress.org/trunk@57152 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-04 18:51:01 +00:00
Aaron Jorbin
f3236c2c93 Help/About: Change CSS align-item for full browser support.
The values of `start` and `end` are not fully supported by Opera Mini which has 1.01% usage. There is no material change in functionality with this change.

Props kebbet, NekoJonez, luminuu, hellofromTonya.
Fixes #59819.



git-svn-id: https://develop.svn.wordpress.org/trunk@57151 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-04 18:05:08 +00:00
Sergey Biryukov
96a589bf0d Docs: Add missing argument type for supports in register_post_type().
If set to `false`, no feature support is registered for the post type.

Follow-up to [12751], [20734], [29091], [37883].

Props jeremyfelt, swissspidy.
Fixes #59690.

git-svn-id: https://develop.svn.wordpress.org/trunk@57150 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-03 19:59:10 +00:00
Sergey Biryukov
76ab1b8891 Build/Test Tools: Allow overriding the WP_UnitTestCase_Base::factory() method.
This allows third-party plugins to write their own factory extending `WP_UnitTest_Factory` for testing purposes, as well as benefit from `WP_UnitTestCase_Base` features.

Follow-up to [35186], [35225], [35242].

Props hugod.
Fixes #59999.

git-svn-id: https://develop.svn.wordpress.org/trunk@57149 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-02 11:56:31 +00:00
Sergey Biryukov
0ce733c78f Upgrade/Install: Add port number to target origin when decrementing update counts.
This ensures that the update counter bubble in the admin menu is properly decreased after a successful plugin or theme update from within the update iframe when the site uses a non-standard port number.

Follow-up to [27280], [29357].

Props TobiasBg.
Fixes #59987.

git-svn-id: https://develop.svn.wordpress.org/trunk@57148 602fd350-edb4-49c9-b593-d223f7449a82
2023-12-01 01:33:40 +00:00
Tonya Mork
4d19f6c23f REST API: Restore site logo and icon in index.
Restores setting the site's logo, icon, and wp-admin's back button image (which defaults to W).

Prior to [56566], the site logo and icon were unconditionally added to the index. [56566] changed this by conditionally adding them if either the `_links` or `_embedded` fields were included. However, these fields are not included when using the Site Logo block, as it uses the `site_logo`, `site_icon`, and `site_icon_url` fields instead.

This changeset restores the functionality by checking specifically for the `site_*` fields when neither of the `_links` or `_embedded` fields are present.

Follow up to [56566].

Props antonvlasenko, hellofromTonya, ironprogrammer, priethor, wildworks.
Fixes #59935.

git-svn-id: https://develop.svn.wordpress.org/trunk@57147 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-30 14:52:52 +00:00
Sergey Biryukov
36a7c6ca40 Tests: Update _wp_timezone_choice_usort_callback() tests for consistency.
* Use the same `@group` annotation as the other tests.
* Use `assertSame()` to verify the type of the result.
* Use `data_` prefix for the data provider.
* Use named data set in the data provider. This makes the output when using the `--testdox` option more descriptive and is helpful when trying to debug which data set from a data provider failed the test.
* Other minor corrections.

Reference: [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#repetitive-tests Core Handbook: Writing PHP Tests: Repetitive Tests].

Follow-up to [57145].

See #59953, #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57146 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-30 11:15:34 +00:00
Aaron Jorbin
4cee935825 Add automated tests for _wp_timezone_choice_usort_callback
Props pbearne.
Fixes #59953.


git-svn-id: https://develop.svn.wordpress.org/trunk@57145 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-29 17:31:44 +00:00
Tonya Mork
2dc568464e Plugins: Fix Add Plugin search button pos when JS off.
When JavaScript is disabled, the Add Plugins screen's search button position was too high in comparison to the search text field. This fix reuses the CSS declaration to keep field and button aligned.

By targeting the `.no-js` class, the CSS specificity is not impacted when JavaScript is enabled.

Follow up to [48281], [30830].

Props devmuhib, sabernhardt, huzaifaalmesbah, hellofromTonya.
Fixes #59967.

git-svn-id: https://develop.svn.wordpress.org/trunk@57144 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-29 16:43:15 +00:00
Pascal Birchler
fdec267246 Test: Run database upgrades between performance test steps.
Prevents pending upgrades from blocking tests when checking out previous builds.

Props mukesh27.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@57143 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-29 11:52:36 +00:00
Sergey Biryukov
96339bda23 Login and Registration: Use correct variable to display a single error message.
When the `wp_login_errors` filter is used to add an error message followed by an instructional message, the former was not displayed and the latter was errouneously displayed twice above the login form.

This commit ensures that the error message is displayed as expected.

Follow-up to [56654].

Props mapumba.
Fixes #59983.

git-svn-id: https://develop.svn.wordpress.org/trunk@57142 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-29 09:32:58 +00:00
Sergey Biryukov
a21f5a3cc0 Site Health: Remove unused $wpdb global in utf8mb4 support test.
Follow-up to [44984], [56475].

Props upadalavipul, mukesh27.
Fixes #59977.

git-svn-id: https://develop.svn.wordpress.org/trunk@57141 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-28 20:22:26 +00:00
John Blackbourn
5f2f5f60ee Docs: Correct the documented type for the block_hooks argument when registering a block type.
This argument is an associative array of strings, not an array of arrays.

See #59313, 59651


git-svn-id: https://develop.svn.wordpress.org/trunk@57140 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-27 20:18:39 +00:00
Sergey Biryukov
6a891c7365 Coding Standards: Reorder conditionals in is_random_header_image().
This aims to slightly improve performance by checking the faster `empty()` language construct first and potentially avoiding an unnecessary function call. Additionally, this better matches a similar conditional a few lines below.

Follow-up to [17757], [17770].

Props Cybr.
See #59650.

git-svn-id: https://develop.svn.wordpress.org/trunk@57139 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-27 09:15:56 +00:00
Sergey Biryukov
8f40982c31 Twenty Twenty-One: Add "blog" and "portfolio" subject tags.
Follow-up to [49216], [49574].

Props sumisubedi, sabernhardt.
Fixes #59495.

git-svn-id: https://develop.svn.wordpress.org/trunk@57138 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-27 08:44:06 +00:00
Sergey Biryukov
653b6448f5 External Libraries: Upgrade PHPMailer to version 6.9.1.
This is a maintenance and feature release, adding support for the official release of PHP 8.3, methods for removing and replacing custom headers, XCLIENT support, and links to a new way of implementing XOAUTH2 authentication.

The only change likely to have any impact on existing code is that PHPMailer previously attempted to use opportunistic STARTTLS encryption when connecting to `localhost`, which was unlikely to work. The workaround required setting `SMTPAutoTLS = false`, but that's no longer required. You may still need to use this setting when connecting to literal IPs.

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

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

Props jrf, Synchro.
Fixes #59966.

git-svn-id: https://develop.svn.wordpress.org/trunk@57137 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-26 19:25:50 +00:00
Pascal Birchler
bc4eb46b55 I18N: Improve translator comments for strings containing date formats.
Adds translator comments where absent and changes code style so that
comments are attached to the right strings during string extraction.

Props NekoJonez.
Fixes #59947

git-svn-id: https://develop.svn.wordpress.org/trunk@57136 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-26 16:41:34 +00:00
Sergey Biryukov
cd5cf79e54 I18N: Move code out of translatable strings in a few error messages.
Follow-up to [54272], [56101].

Props rabmalin, Presskopp.
Fixes #59563.

git-svn-id: https://develop.svn.wordpress.org/trunk@57135 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-25 21:17:28 +00:00
Sergey Biryukov
5ff4794ef1 Build/Test Tools: Add a readme note on passing parameters into the PHPUnit tests.
Follow-up to [45745], [47743].

Props pbearne, costdev.
Fixes #59624.

git-svn-id: https://develop.svn.wordpress.org/trunk@57134 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-24 14:07:00 +00:00
Sergey Biryukov
09a2050fca Tests: Avoid an infinite loop in Spy_REST_Server if a non-existing method is called.
Follow-up to [34928].

Props xknown, joemcgill.
Fixes #59601.

git-svn-id: https://develop.svn.wordpress.org/trunk@57133 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-23 14:39:16 +00:00
Jonathan Desrosiers
9099d9789b Build/Test Tools: Run unit tests using new MySQL versions.
The MySQL project has introduced a new versioning strategy with two types of releases: innovation and long-term support. While long-term support is a familiar concept, it’s not clear how innovation releases should be supported in various WordPress versions for a number of reasons.

Mainly, innovation releases are very short-lived. Each one is only supported until the next innovation version is released with a goal of one per quarter. Even though these versions will have a short lifespan they are described as producton-grade and generally available.

More discussion is needed to determine exactly how each WordPress release should support these new innovation releases. But while the parameters for proper support are determined, the PHPUnit tests can be run against these innovation releases to detect any potential problems or incompatibilities.

This change adds the `8.1` and `8.2` innovation releases to the testing matrix for the PHPUnit test worfklow.

Props johnbillion, jorbin.
See #59779.

git-svn-id: https://develop.svn.wordpress.org/trunk@57132 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-22 19:38:09 +00:00
Sergey Biryukov
647d59302d Text Changes: Update mentions of “web site” to “website” for consistency.
While “web site” was the original spelling, this variant has become rarely used, and “website” is now the standard spelling, already used throughout most of the WordPress core.

Reference: [https://en.wikipedia.org/wiki/Website Wikipedia: Website].

Props LiamMcArthur, cafenoirdesign, sabbirshouvo, sabernhardt, ironprogrammer, mukesh27.
Fixes #59853, #54276.

git-svn-id: https://develop.svn.wordpress.org/trunk@57131 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-22 17:42:11 +00:00
Sergey Biryukov
2452701c32 General: Rename wp_json_encode() parameters for parity with PHP Core.
`wp_json_encode()` is a wrapper for the PHP native `json_encode()` function with some extra safety checks.

This commit renames the `$data` parameter in the `wp_json_encode()` function and associated functions to `$value`, and the `$options` parameter to `$flags` for parity with the parameter names used in PHP Core.

Reference: [https://www.php.net/manual/en/function.json-encode.php PHP Manual: json_encode()].

Follow-up to [30055].

Props jrf, hellofromTonya.
Fixes #59630.

git-svn-id: https://develop.svn.wordpress.org/trunk@57130 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-21 00:23:01 +00:00
Joe McGill
b6bf3553d9 Themes: Remove memoization from stylesheet and theme directories.
This fixes bugs introduced in [56635] whereby the template or stylesheet path could be memoized incorrectly if `get_template_directory()` or `get_stylesheet_directory()` were called before the theme has been fully initialized.

Props partyfrikadelle, coreyw, kdowns, rebasaurus, meta4, flixos90, mukesh27, joemcgill.
Fixes #59847.


git-svn-id: https://develop.svn.wordpress.org/trunk@57129 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-20 22:27:17 +00:00
Sergey Biryukov
30954f7ac0 Administration: Standardize default values in submit_button().
This commit updates the `submit_button()` function to standardize the default values of `$text` and `$other_attributes` parameters. Previously set to `null`, these defaults have now been changed to an empty string (`''`), bringing consistency with the `get_submit_button()` function, which `submit_button()` wraps.

The change maintains backward compatibility, as `get_submit_button()` does not perform strict type-checking on these parameters. This update aligns with the ongoing effort to standardize function parameters across the WordPress codebase, improving the readability and predictability of the core functions.

Follow-up to [31446].

Props andbalashov.
Fixes #59921.

git-svn-id: https://develop.svn.wordpress.org/trunk@57128 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-20 00:06:08 +00:00
Sergey Biryukov
2a0d8fcd64 Twenty Twenty-Four: Add missing textdomain in pattern category description.
Follow-up to [56951].

Props gavande1, acosmin, afercia, huzaifaalmesbah, ironprogrammer.
Fixes #59840.

git-svn-id: https://develop.svn.wordpress.org/trunk@57127 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-19 11:35:09 +00:00
Sergey Biryukov
1427d25716 Code Modernization: Use str_starts_with() in WP_REST_Server::serve_request().
Follow-up to [55703], [56834].

See #59650.

git-svn-id: https://develop.svn.wordpress.org/trunk@57126 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-18 20:44:32 +00:00
Jonathan Desrosiers
f72f1893d6 Build/Test Tools: Allow the playground-comment job to fail.
When this job fails, it should not fail the entire workflow. The next update to the pull request will attempt to dispatch the commenting workflow.

Follow up to [57124].

Props johnbillion.
See #59416.

git-svn-id: https://develop.svn.wordpress.org/trunk@57125 602fd350-edb4-49c9-b593-d223f7449a82
2023-11-17 20:09:51 +00:00