Commit Graph

48526 Commits

Author SHA1 Message Date
Felix Arntz
d39daa2b28 Themes: Skip wrapping block template for singular content with a main query loop when the template was injected from outside the current theme.
As a follow up to [56507], this fixes a bug that could occur for instance when plugins hijack the block template detection process to inject their own block template with entirely custom logic.

Props afragen, hellofromTonya, costdev, mukesh27, huzaifaalmesbah, flixos90.
Merges [57019] to the 6.4 branch.
Fixes #59736.
See #58154.

Built from https://develop.svn.wordpress.org/branches/6.4@57020


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-27 18:36:22 +00:00
Peter Wilson
ead01cff58 Options, Meta APIs: Rename option cache priming functions.
Rename the option cache priming functions to more closely follow the naming convention used by other cache priming functions.

* `wp_load_options()` becomes `wp_prime_option_caches()`
* `wp_load_options_by_group()` becomes `wp_prime_option_caches_by_group()`

The unit test files and classes are renamed accordingly.

Unlike the existing cache priming functions, these functions were introduced with the intention of being public so use the `wp_` prefix rather than the `_` prefix used by the functions initially introduced as private functions but since made public.

Follow up to [56445],[56990].

Props flixos90, peterwilsoncc, joemcgill, SergeyBiryukov, desrosj.
Reviewed by flixos90.
Merges [57013] to the 6.4 branch.
Fixes #58962.


Built from https://develop.svn.wordpress.org/branches/6.4@57016


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-27 00:02:20 +00:00
Aaron Jorbin
64bd43c885 REST API: Move rest_pre_serve_request filter to after no cache headers are sent.
Merges [57012] to 6.4 branch.

[56834] adjusted the order of activity inside the rest server responses. This lead to the rest_pre_serve_request filter potentially blocking the sending of the no cache headers. This moves that action back to being after the sending of no cache headers has finished to restore the pre 6.3.2 order of these two actions.

Props perrelet, SergeyBiryukov, peterwilsoncc, hellofromTonya.
Fixes #59722.

Built from https://develop.svn.wordpress.org/branches/6.4@57014


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-26 23:16:21 +00:00
Felix Arntz
2277da5029 Themes: Fix block theme supports being added too early, leading to Customizer live preview bugs in 6.4.
The Customizer live preview broke because of [56635], however the root cause for the bug was a lower-level problem that had been present since WordPress 5.8: The block theme specific functions `_add_default_theme_supports()` and `wp_enable_block_templates()` were being hooked into the `setup_theme` action, which fires too early to initialize theme features. Because of that, theme functionality would be initialized before the current theme setup being completed. In the case of the Customizer, that includes overriding which theme is the current theme entirely, thus leading to an inconsistent experience.

This changeset fixes the bug by moving those two callbacks to the `after_setup_theme` action, which is the appropriate action to initialize theme features.

Props karl94, hellofromTonya, joemcgill, flixos90.
Merges [57009] to the 6.4 branch.
Fixes #59732.
See #18298, #53397, #54597.

Built from https://develop.svn.wordpress.org/branches/6.4@57010


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-26 18:47:20 +00:00
Tammie Lister
6110953300 Post WordPress 6.4 RC2 version bump.
Built from https://develop.svn.wordpress.org/branches/6.4@57007


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 16:43:19 +00:00
Tammie Lister
391597df86 WordPress 6.4 RC2.
Built from https://develop.svn.wordpress.org/branches/6.4@57006


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 16:24:22 +00:00
desrosj
59e523d54d Twenty Twenty-Four: Bug fixes for 6.4 RC2.
This update includes updates to patterns to correct color issues and some code quality fixes.

Follow-up to [56951], [56813], [56764], [56716].

Props luminuu, richtabor, onemaggie, kafleg, swissspidy, huzaifaalmesbah, neilorangepeel, shailu25, lada7042, mukesh27, nilovelez, jorbin.
Merges [56999] and [57003] to the 6.4 branch.
Fixes #59711.
Built from https://develop.svn.wordpress.org/branches/6.4@57005


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 15:24:21 +00:00
Felix Arntz
04e82f9f08 Options, Meta APIs: Rename prime_options() to wp_load_options().
This clearly separates these functions which are intended to be used by external developers from the existing `_prime_*_caches()` functions which are primarily intended for internal usage. The term "load" is additionally more accessible than "prime".

This changeset renames the above function, as well as the wrapper function `prime_options_by_group()` to `wp_load_options_by_group()`.

Props peterwilsoncc, joemcgill, hellofromTonya, poran766, flixos90.
Merges [56990] to the 6.4 branch.
Fixes #58962.

Built from https://develop.svn.wordpress.org/branches/6.4@57004


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 14:37:16 +00:00
desrosj
f49b05f8f2 Build/Test Tools: Revert [57000] and [57001].
These commits accidentally reverted intended changes.

Unprops desrosj.
Built from https://develop.svn.wordpress.org/branches/6.4@57002


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 14:24:20 +00:00
desrosj
ed4c779e9f Build/Test Tools: Test Twenty Twenty-Four.
This adds Twenty Twenty-Four to the Default Theme test workflow in GitHub Actions.

Follow up to [56764], [56726], [56721], [56716].

Merges [56770] to the 6.4 branch.
See #59447.
Built from https://develop.svn.wordpress.org/branches/6.4@57001


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 14:16:17 +00:00
desrosj
b0a7f76cd2 Build/Test Tools: Simplify some logic in GitHub Action workflows.
This simplifies the logic within the `slack-notifications` and `failed-workflow` steps in GitHub Action workflows to use the `contains()` function and object filtering.

This makes it simpler to perform the needed checks by removing the need to list out every single dependent job defined in `needs`.

Merges [56660] to the 6.4 branch.
See #58867.
Built from https://develop.svn.wordpress.org/branches/6.4@57000


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 14:14:23 +00:00
hellofromTonya
edf4aaef14 Editor: Fix render_duotone_support() to be compatible with enhanced pagination.
Some blocks do not have content. For duotone support, blocks without content still need to run through the `render_duotone_support()` to render their duotone CSS.

This fix makes the duotone compatible with the enhanced pagination (introduced in 6.4.0) by making sure that the CSS is always on the page, even when the posts have no featured image. It also prevents the duotone from interfering with other blocks using `wp_unique_id()`.

References:
* [https://github.com/WordPress/gutenberg/pull/55415 Gutenberg PR 55415]

Follow-up to [56226].

Props cbravobernal, luisherranz, hellofromTonya, isabel_brison, jorbin.
Reviewed by costdev.
Merges [56991] and [56996] to the 6.4 branch.
Fixes #59694.
Built from https://develop.svn.wordpress.org/branches/6.4@56997


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 11:08:25 +00:00
Bernhard Reiter
f2d2f9fee6 Blocks: Fix layout support to be compatible with enhanced pagination.
Make layout support compatible with enhanced pagination by ensuring that generated class names are stable across pagination, even when the number of rendered posts is different.

With the previous implementation of enhanced pagination, the CSS corresponding to each block was not detected. Therefore, for enhanced pagination to work correctly, the CSS of the blocks present in the Post Template must be stable on all pages.

The number of posts rendered by the Query block is always the same, except in the last page, where it can be only a fraction. If any of the blocks rendered by the Post Template used the `wp_unique_id` function, the ID (which is incremental) would have been different than in the previous pages and the class names would have varied.

This is remediated by this changeset by replacing the usage of `wp_unique_id` in the layout support (which is used by the Query block) with an implementation that uses IDs that are incremental only for that block. That way, the generated class names are never affected by the number of times `wp_unique_id` runs.

Props luisherranz, andrewserong, isabel_brison, costdev, mukesh27, cbravobernal, hellofromTonya, jorbin.
Merges [56994] to the 6.4 branch.
Fixes #59681.
Built from https://develop.svn.wordpress.org/branches/6.4@56995


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 09:04:22 +00:00
Peter Wilson
c3e80e1e05 Build/Test tools: Introduce partial unit tests for WP_Upgrader.
Props jipmoors, karlijnbk, chaion07, cu121, martin.krcho, costdev, mukesh27, hellofromTonya, SergeyBiryukov, audrasjb, jrf.
Merges [56992] to the 6.4 branch.
Fixes #54245.

Built from https://develop.svn.wordpress.org/branches/6.4@56993


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-24 01:42:18 +00:00
Aaron Jorbin
f4c1afcf63 Docs: Improve documentation for meta revision functions.
Backports [56984] to 6.4 branch.

Includes:
- Correcting the position of @since 6.4.0 in a few places.
- Adding missing @return documentation.
- Adjusting parameter spacing.
- Follow-up to [56714].

Props jeremyfelt, mukesh27, SergeyBiryukov.
Fixes #59666.

Built from https://develop.svn.wordpress.org/branches/6.4@56989


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 19:56:20 +00:00
Tammie Lister
47351ffaf7 Update editor related npm packages for 6.4 RC2.
The npm packages needed update for 6.4 RC2.

Props siobhyb, cbravobernal, DAreRodz, luisherranz, artemiosans, afercia, jameskoster, czapla, alexstine, SantosGuillamot, ramonopoly, isabel_brison, andrewserong, jeryj, joedolson.

Merges [56987] to the 6.4 branch
See #59411.

Built from https://develop.svn.wordpress.org/branches/6.4@56988


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 18:46:33 +00:00
Felix Arntz
96b75a53c3 Multisite: Ensure that switching sites resets the current theme directory globals.
The globals introduced in [56635] to cache the current theme directories in memory were not considering switching sites in a multisite network. This changeset addresses the bug including test coverage.

Props codex-m, jeremyfelt, costdev, joemcgill.
Merges [56974] to the 6.4 branch.
Fixes #59677.
See #18298.

Built from https://develop.svn.wordpress.org/branches/6.4@56986


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-23 16:04:21 +00:00
Joe McGill
51111edbeb Themes: Make caches for block patterns clearable.
In [56765], theme block pattern files were cached to a transient as a performance enhancement. However, transients are not easily clearable when caches are flushed on environments not using a persistent cache, which can lead to errors if the theme files are renamed, edited, or moved.

This changes the caching mechanism to use `wp_cache_set()` instead, and caches these values to the global group so they are still persistent on environments using an object cache, and will be cleared by a cache flush.

In addition, the helper `_wp_get_block_patterns` has been moved `WP_Theme::get_block_patterns` for consistency with other block related theme methods and cache helpers for these values, `WP_Theme::get_pattern_cache` and `WP_Theme::set_pattern_cache`, have been made private.

Relevant unit tests updated.

Props afercia, flixos90, mukesh27, joemcgill.
Merges [56978] to the 6.4 branch.
Fixes #59633. See #59591, #59490.

Built from https://develop.svn.wordpress.org/branches/6.4@56979


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-20 19:36:01 +00:00
hellofromTonya
ddc3c030cb Branch 6.4
Built from https://develop.svn.wordpress.org/branches/6.4@56965


git-svn-id: http://core.svn.wordpress.org/branches/6.4@56476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 18:32:20 +00:00
hellofromTonya
bfe933241e Post WordPress 6.4 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@56964


git-svn-id: http://core.svn.wordpress.org/trunk@56475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 17:46:44 +00:00
hellofromTonya
77df68f144 WordPress 6.4 RC1 - capitalize RC in version.
Capitalize RC in the version, i.e. just in case the build requires it.

Unprops hellofromTonya.
Built from https://develop.svn.wordpress.org/trunk@56963


git-svn-id: http://core.svn.wordpress.org/trunk@56474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 17:27:20 +00:00
hellofromTonya
fc3d3cf491 WordPress 6.4 RC1.
Built from https://develop.svn.wordpress.org/trunk@56962


git-svn-id: http://core.svn.wordpress.org/trunk@56473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 17:19:23 +00:00
hellofromTonya
e395ce0cf6 Editor: Bugfixes npm packages updates for 6.4 RC1.
Updates for needed bugfixes in RC1:

* [https://github.com/WordPress/gutenberg/pull/55212 Image: Reimplement lightbox trigger as a minimal button in corner of image]

* [https://github.com/WordPress/gutenberg/pull/55403 [Edit Widgets] Only suppress admin notices when JS enabled.]

Follow-up to [56849], [56818], [56816].

Props artemiosans, jameskoster, SantosGuillamot, aristath, czapla, joen, afercia, richtabor, peterwilsoncc, andraganescu, hellofromTonya, siobhyb.
See #59411.
Built from https://develop.svn.wordpress.org/trunk@56961


git-svn-id: http://core.svn.wordpress.org/trunk@56472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 16:08:23 +00:00
Bernhard Reiter
c054eef096 Patterns, Templates: Inject theme attr into Template Part blocks.
It was found that Template Part blocks were broken in the Site Editor, showing the `Template part has been deleted or is unavailable` message, due to a missing `theme` attribute.

This bug seems to have been introduced by [56896], whose goal was to only inject that attribute into the markup returned by the templates and patterns REST API endpoints but not on the frontend, in order to improve performance. It has been demonstrated locally that reverting that changeset fixes the bug.

Reverts [56896].
Props mmcalister, swisspidy, thelovelist, hellofromTonya, pbiron, Pauthake015, richtabor, nicolefurlan, huzaifaalmesbah, annezazu, kafleg, aegkr, sunitarai, shresthaaman, andraganescu, onemaggie, gziolo.
Fixes #59629.
Built from https://develop.svn.wordpress.org/trunk@56960


git-svn-id: http://core.svn.wordpress.org/trunk@56471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 15:48:23 +00:00
hellofromTonya
3d5cf30808 Bundled Themes: Revert 56451.
Reverts [56451] to avoid the following issues:

* missing the default `font-size` for anyone who does not use the size control.
* unintentional reduction in citation's `line-height` down to the `--pullquote--line-height` value (1.3 instead of 1.6).

With 6.4 RC1 happening shortly, this revert is necessary to avoid shipping this issues in the release, while giving the time needed to resolve in the next cycle.

Follow-up to [56451].

Props sabernhardt, nicolefurlan.
See #57854.
Built from https://develop.svn.wordpress.org/trunk@56959


git-svn-id: http://core.svn.wordpress.org/trunk@56470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:50:21 +00:00
zieladam
5dc3f83a07 Build/Test Tools: Store WordPress.zip for every GitHub Pull Request as a GitHub artifact.
Storing build files enables reusing them in WordPress Playground and ultimately implementing a Pull Request.

Props desrosj, bernhard-reiter
See #59416.


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


git-svn-id: http://core.svn.wordpress.org/trunk@56469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:42:19 +00:00
desrosj
ceb29562f3 Build/Test Tools: Update build related dependencies.
This updates the following development dependencies to their latest versions:
- `postcss`
- `qunit`
- `sass`
- `webpack`

Additionally, `npm audit fix` has been run.

Fixes #58863.
Built from https://develop.svn.wordpress.org/trunk@56957


git-svn-id: http://core.svn.wordpress.org/trunk@56468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:34:27 +00:00
desrosj
4ce3b9978e Build/Test Tools: Update the caniuse-lite database.
This updates the data for the `caniuse-lite` package and runs `grunt precommit:css`.

Fixes #58869.
Built from https://develop.svn.wordpress.org/trunk@56956


git-svn-id: http://core.svn.wordpress.org/trunk@56467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 13:20:23 +00:00
desrosj
ee64273620 Build/Test Tools: Add environment variable for current release.
This adds a global environment variable to the Test old branches workflow to make the supported version more clear and easier to update in the future. This will also make it easier to reference in more places as this workflow grows.

See #58867.
Built from https://develop.svn.wordpress.org/trunk@56955


git-svn-id: http://core.svn.wordpress.org/trunk@56466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 12:44:25 +00:00
Pascal Birchler
9f39b4ea0f Build/Test Tools: Reinstate PUPPETEER_SKIP_DOWNLOAD for most CI workflows.
The `PUPPETEER_SKIP_DOWNLOAD` environment variable is used to prevent Puppeteer from automatically downloading browser binaries.
It was removed in [56926] due to the migration to Playwright. However, because of the QUnit tests, Puppeteer is actually still a dependency.

Until those tests change, we have to keep this environment variable to prevent unnecessary downloads on CI.

Props SergeyBiryukov.
Fixes #59517.
Built from https://develop.svn.wordpress.org/trunk@56954


git-svn-id: http://core.svn.wordpress.org/trunk@56465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 11:29:27 +00:00
Sergey Biryukov
fe3efe9810 HTML API: Scan to end of tag when getting updated HTML output.
When applying updates to HTML, one step was left out in [56941] which updated the position of the end of the current tag. This made it possible to create bookmarks with null or earlier end positions than their start position. This in turn broke the Directive Processor in Gutenberg during the backport of changes from Core into Gutenberg.

In this commit, after applying updates, the HTML document is now scanned fully to the end of the current tag, updating the internal pointer to its end, so that nothing else will be broken or misaligned.

Follow-up to [56941].

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


git-svn-id: http://core.svn.wordpress.org/trunk@56464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 10:39:27 +00:00
Sergey Biryukov
41a5f69fde Twenty Nineteen: Correct the required WordPress version in theme headers.
The required version was previously set to two different values:
* 4.7 in the theme's `functions.php` file.
* 4.9.6 in theme headers, because of the `the_privacy_policy_link()` function usage in `footer.php`.

However, as `the_privacy_policy_link()` call is wrapped in a `function_exists()` check, it does not affect the requirements in practice.

This commit aims to correct the discrepancy by updating theme headers to match the actual required WP version.

Follow-up to [43808], [43892].

Props poena, kafleg, felipeelia, audrasjb, huzaifaalmesbah, shailu25, nicolefurlan, oglekler.
Fixes #59557.
Built from https://develop.svn.wordpress.org/trunk@56952


git-svn-id: http://core.svn.wordpress.org/trunk@56463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 09:54:23 +00:00
hellofromTonya
244f676c59 Twenty Twenty-Four: Bugfixes for 6.4 RC1.
Resyncing changes for TT4 into Core.

Changes include:
* Reformatted all the patterns for readability.
* Bugfixes in the markup and improvements on the string translation functions.
* Renaming of some patterns, making them consistent with the content they show and whether they are simple patterns, full-page patterns or patterns meant to replace templates.

Follow-up to [56813], [56764], [56716].

Props richtabor, onemaggie, luminuu, shailu25, dunhakdis, shivashankerbhatta, dajeema, enodekciw, kafleg, viralsampat, glendaviesnz, beafialho, webmandesign, huzaifaalmesbah, gregfuller, benharri.
Fixes #59640.
Built from https://develop.svn.wordpress.org/trunk@56951


git-svn-id: http://core.svn.wordpress.org/trunk@56462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 02:14:24 +00:00
Aaron Jorbin
223c80ef92 Help/About: Update the About page for 6.4.
Also includes updates to the contribute, credits, freedom and privacy pages.

Props luminuu, rmartinezduque, estelaris, jorbin, mukesh27, cbringmann, richtabor, annezazu, nudge, ohia, acirujano, elmastudio, cathibosco1, sereedmedia, markoserb, joen. (Also someone named Allison who I am going to guess is Taylor Alison Swift but has no avatar so I will never know)

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


git-svn-id: http://core.svn.wordpress.org/trunk@56461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-17 02:02:24 +00:00
Peter Wilson
6876d19129 Options, Meta APIs: Prevent saving of invalid timezones.
Prevent the saving of invalid timezone string in to the database on the options pages. If an invalid timezone is submitted it is ignored and the setting remains unchanged.

This prevents a warning or fatal (depending on the PHP version) from being thrown by an invalid timezone setting on the Settings > General page.

Props ankit-k-gupta, costdev, huzaifaalmesbah, mrinal013, nicolefurlan, oglekler.
Fixes #58814.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 23:51:24 +00:00
Aaron Jorbin
86be091aba CSS: Run grunt precommit:css to update CSS.
See: #58869.
Props peterwilsoncc.



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


git-svn-id: http://core.svn.wordpress.org/trunk@56459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 21:48:24 +00:00
Joe McGill
807517a992 Options, Meta APIs: Delete leftover unit tests.
This is a followup to [56946] to commit the deletion of a leftover PHP Unit file.

See #22192.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 20:41:19 +00:00
Joe McGill
9a810ff5bc Options, Meta APIs: Revert update_option changes.
This reverts changes from [56648], [56681], [56717], [56762], [56788], [56797], and [56814] to restore the behavior for `update_option()` and `update_network_option()` to their prior state as of 6.3.X due to the discovery of various backwards compatibility issues found late in the 6.4 release cycle.

Props mukesh27, costdev, flixos90, spacedmonkey, snicco, jrf, joemcgill.
See #22192, #59360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 20:37:23 +00:00
Tammie Lister
8325d334f6 Update editor related npm packages for 6.4 RC1.
The npm packages needed a second part to the update for 6.4 RC1.

Props isabel_brison, andrewserong, jsnajdr, wildworks, joen, mciampini, tyxla, youknowriad, ramonopoly, spacedmonkey, dmsnell, mikachan, kishanjasani, czapla, siobhyb, darerodz, luisherranz

See #59411.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 19:17:19 +00:00
desrosj
aa29f65a28 Build/Test Tools: Downgrade grunt-contrib-qunit dependency.
`grunt-contrib-qunit` was upgraded from version `7.0.1` to `8.0.1` in [56647]. However, this update causes a strange failure when running the build script for the Gutenberg plugin when checked out within a `wordpress-develop` checkout.

This reverts the related change in [56647] and downgrades the dependency back to `7.0.1` until the exact reason for the failure is narrowed down.

Props afercia, kevin940726, antonvlasenko, desrosj.
See #59634, #58863.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 16:05:27 +00:00
Felix Arntz
41cf4f1521 General: Remove discouraged @return void annotations.
Such `@return void` annotations must not be used in WordPress core's PHP code, except bundled themes, third-party libraries, and PHP compatibility shims.

Props isabel_brison, swissspidy.
Fixes #59619.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 15:17:23 +00:00
Pascal Birchler
a69a0dfcb0 Build/Test Tools: Ensure the failed workflow tasks run last for e2e tests.
This is a follow-up to [56926], where this logic has been reintroduced after it was originally removed in [56198].

Props desrosj.
See #59517.
Built from https://develop.svn.wordpress.org/trunk@56942


git-svn-id: http://core.svn.wordpress.org/trunk@56453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 14:34:21 +00:00
Sergey Biryukov
89a5bbb997 HTML API: Avoid calling subclass method while internally scanning in Tag Processor.
After modifying tags in the HTML API, the Tag Processor backs up to before the tag being modified and then re-parses its attributes. This saves on the code complexity involved in applying updates, which have already been transformed to “lexical updates” by the time they are applied.

In order to do that, `::get_updated_html()` called `::next_tag()` to reuse its logic. However, as a public method, subclasses may change the behavior of that method, and the HTML Processor does just this. It maintains an HTML stack of open elements and when the Tag Processor calls this method to re-scan a tag and its attributes, it leads to a broken stack.

This commit replaces the call to `::next_tag()` with a more appropriate reapplication of its internal parsing logic to rescan the tag name and its attributes. Given the limited nature of what's occurring in `::get_updated_html()`, this should bring with it certain guarantees that no HTML structure is being changed (that structure will only be changed by subclasses like the HTML Processor).

Follow-up to [56274], [56702].

Props dmsnell, zieladam, nicolefurlan.
Fixes #59607.
Built from https://develop.svn.wordpress.org/trunk@56941


git-svn-id: http://core.svn.wordpress.org/trunk@56452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 14:01:27 +00:00
Peter Wilson
09554030d4 Twenty Thirteen, Twenty Sixteen: Use default display for summary element.
Within the details block, style the `summary` element using the default display, `list-item`, this ensures the toggle icon appears indicating the summary can be expanded or contracted.

Props ankit-k-gupta, nicolefurlan, poena, sabernhardt.
Fixes #58915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@56451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 04:43:22 +00:00
costdev
13854cd7f5 Posts, Post Types: Don't force trailing slash in get_pagenum_link().
Previously, a trailing slash was appended to the link returned from `get_pagenum_link()`. If the permalink structure didn't contain a trailing slash, this link could fail.

This change removes trailing slashes and only appends one if the site is set for adding trailing slashes.

This adds a new test file for the accompanying tests, `tests/phpunit/tests/link/getPagenumLink.php`, and moves an existing test for `get_pagenum_link()` to the same file.

Props davemad-davenet, darkfate, Nazgul, scribu, nacin, obenland, chriscct7, jesin, matthewppelsheimer, audrasjb, petitphp, mukesh27, oglekler, mai21, webtechpooja, tejwanihemant, nicolefurlan, hellofromTonya, costdev.
Fixes #2877.
Built from https://develop.svn.wordpress.org/trunk@56939


git-svn-id: http://core.svn.wordpress.org/trunk@56450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-16 00:07:26 +00:00
hellofromTonya
464868a475 Code Modernization: Declare dynamic properties on WP_Text_Diff_Renderer_Table.
Core uses 3 known, named, dynamic properties on the `WP_Text_Diff_Renderer_Table` class:

* `_title`
* `_title_left`
* `_title_right`

When reviewing revisions (within the admin UI), `wp_text_diff()` passes the arguments (without the leading `_`) to a new instance, which raised deprecation notices (see [56354]).

Note: the parent class adds the leading `_` to each of these properties (see [7747]).

The deprecation notices are resolved by declaring each of these known, named, dynamic properties on the class, per the #56034 mitigation strategy. These new properties are not initialized to retain their previous `null` behavior.

Follow-up to [56354], [23506], [7747].

Props wildworks, antonvlasenko, hellofromTonya, ironprogrammer, kafleg, mukesh27, nicolefurlan, presskopp, sabernhardt.
Fixes #59431.
See #58898, #56034.
Built from https://develop.svn.wordpress.org/trunk@56938


git-svn-id: http://core.svn.wordpress.org/trunk@56449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-15 14:55:23 +00:00
hellofromTonya
23ac8fbfe6 Users: Show "Password reset link sent" message only when finished.
When an admin sends a password reset link to a user (from the Users UI screen), the "finished" UI message:

>Password reset link sent.

is displayed on "finished" and no longer displayed on error.

**What is the change?**

Previously, the conditional (for incrementing the reset counter) checked for a truthy return from `retrieve_password()`. But `retrieve_password()` always returns a truthy state: `true` (meaning "finished") or an instance of `WP_Error`. Thus, checking for a truthy meant the "finished" message was sent on both "finished" and error/failed.

This fix checks for `retrieve_password()` returning `true` to indicate "finished".

**What is displayed on error?**

If `retrieve_password()` returns an instance of `WP_Error`, the following UI message is shown:

>Password reset links sent to 0 users.

The UI messages were not modified by this changeset.

Follow-up to [50129].

Props letraceursnork, prashantbhivsane, audrasjb, costdev, dilipbheda, hareesh-pillai, hellofromTonya, ironprogrammer, huzaifaalmesbah, marybaum, nicolefurlan, oglekler, petitphp, SergeyBiryukov.
Fixes #58407.
Built from https://develop.svn.wordpress.org/trunk@56937


git-svn-id: http://core.svn.wordpress.org/trunk@56448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-15 14:04:23 +00:00
Sergey Biryukov
d80a03fa4f Tests: Reset the current user before performing assertions in some comment tests.
This aims to avoid affecting other tests in case of failure.

Follow-up to [54527].

See #58955.
Built from https://develop.svn.wordpress.org/trunk@56936


git-svn-id: http://core.svn.wordpress.org/trunk@56447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-15 08:09:27 +00:00
Sergey Biryukov
00cabf08ae Twenty Nineteen: Correctly display default color names in the color palette.
Instead of displaying the color names, two of the default colors displayed the color code, which was only intended to show when the user has enabled the custom color option in the Customizer.

The reason is that the default value for the option is `false`, and this value is changed to the string `'custom'` if the color option is enabled, and the string `'default'` if the custom color is enabled and then reset to default colors.

This commit adjusts the logic for displaying the color name, to make sure that the string value `'default'` is not compared with `false`, by adding the default value as a parameter to `get_theme_mod( 'primary_color' )`.

Follow-up to [45964].

Props poena, mukesh27, ugyensupport, shailu25, anveshika, harshgajipara, nicolefurlan, syamraj24, balub, vivekawsm.
Fixes #59566.
Built from https://develop.svn.wordpress.org/trunk@56935


git-svn-id: http://core.svn.wordpress.org/trunk@56446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-14 12:22:27 +00:00
Pascal Birchler
7a3a97592d Build/Test Tools: Do not round percentages when comparing performance test results.
Props joemcgill.
See #59517.
Built from https://develop.svn.wordpress.org/trunk@56934


git-svn-id: http://core.svn.wordpress.org/trunk@56445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-10-13 20:05:23 +00:00