48632 Commits

Author SHA1 Message Date
Pascal Birchler
0ad0726617 Sitemaps: add lastmod for individual posts and the homepage.
When the XML sitemaps feature was originally introduced, the `lastmod` field was omitted because guidance at the time indicated it was less important for search engines, plus for some entities it was computationally expensive to add. Now that the guidance has slightly changed, we are revisiting this and adding `lastmod` where easily possible.

- Adds `lastmod` to all individual post objects (of any post type) in the sitemap
- Adds `lastmod` to the homepage sitemap entry if the homepage is set to display the latest posts.

No `lastmod` is added for the individual sitemap pages in the sitemap index, nor for term archives or user archives. Those enhancements require additional changes, such as storing the modified date for a taxonomy term when something is added to that term. They can be revisited in separate follow-up tickets.

Props swissspidy, joemcgill.
Fixes #52099

git-svn-id: https://develop.svn.wordpress.org/trunk@56985 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-23 15:40:44 +00:00
Sergey Biryukov
219dbc651f Docs: Improve documentation for meta revision functions.
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.
Fixes #59666.

git-svn-id: https://develop.svn.wordpress.org/trunk@56984 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-23 13:15:17 +00:00
Greg Ziółkowski
482843ae0e Tests: Improve code coverage for _build_block_template_result_from_file
Props costdev, bernhard-reiter.
See #54335, #59325.
Follow-up for [56562].



git-svn-id: https://develop.svn.wordpress.org/trunk@56983 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-23 05:36:50 +00:00
Sergey Biryukov
f597832f53 General: Bump the recommended MySQL version in readme.html.
MySQL 5.7 reaches EOL (“End of Life”) in October 2023. The recommended minimum is bumped to 8.0 for now.

References:
* [https://www.mysql.com/support/ MySQL Support Policies]
* [https://make.wordpress.org/hosting/handbook/server-environment/#database Hosting team handbook: Server Environment: Database]

Follow-up to [31291], [33946], [35759], [52420], [52421], [54069].

Props swissspidy, SergeyBiryukov.
See #59701.

git-svn-id: https://develop.svn.wordpress.org/trunk@56982 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-22 09:03:12 +00:00
Sergey Biryukov
33cb0d24dc Tests: Correct test class name for WP_Duotone unit tests.
Follow-up to [56101].

Props cbravobernal.
Fixes #59696.

git-svn-id: https://develop.svn.wordpress.org/trunk@56981 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-21 10:19:55 +00:00
Pascal Birchler
67476285c2 Build/Test Tools: Remove now obsolete jest-image-snapshot dependency.
With the migration of visual regression tests to Playwright in [56926], this package is no longer needed and can be safely removed.

See #59517.

git-svn-id: https://develop.svn.wordpress.org/trunk@56980 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-21 08:37:00 +00:00
Joe McGill
03e46a7670 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.
Fixes #59633. See #59591, #59490.


git-svn-id: https://develop.svn.wordpress.org/trunk@56978 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-20 19:06:46 +00:00
Jonathan Desrosiers
df21bdf81c Build/Test Tools: Use the correct path to build process test workflows.
Follow up to [56976].

See #59632.

git-svn-id: https://develop.svn.wordpress.org/trunk@56977 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-20 17:11:10 +00:00
Jonathan Desrosiers
7ac4f60c33 Build/Test Tools: Test the Gutenberg plugin build process.
A very common contributor setup is having a copy of the `gutenberg` development repository within a checkout of the `wordpress-develop` repository. On occasion, there are some strange incompatibilities that come up when using this setup. A few examples can be seen in #58671 and #59634.

This changeset helps ensure that these edge cases are not introduced by testing the Gutenberg plugin’s build process within WordPress configured to run from both the `src` and `build` directories.

This also renames the “Test npm” workflow to a more general “Test Build Processes”, which more accurately describes what is actually being tested within it and allows these new test jobs to be grouped in.

And finally, the logic within the workflow has been split out into two callable workflows. This helps avoid code duplication within the workflow, and allows for better grouping on the workflow run screen.

Props swissspidy, aferica, SergeyBiryukov, antonvlasenko, desrosj.
Fixes #59632. See #58671, #59634.

git-svn-id: https://develop.svn.wordpress.org/trunk@56976 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-20 14:54:23 +00:00
Sergey Biryukov
df57c555c2 External Libraries: Update getID3 to version 1.9.23.
The latest version includes numerous bug fixes, a few new features, as well as various improvements for PHP 8.1 and PHP 8.2 support.

This commit also includes PHPCS adjustments previously made for a passing PHP Compatibility scan.

References:
* [https://github.com/JamesHeinrich/getID3/releases/tag/v1.9.23 getID3 1.9.23 release notes]
* [https://github.com/JamesHeinrich/getID3/compare/v1.9.22...v1.9.23 Full list of changes in getID3 1.9.23]

Follow-up to [47601], [48278], [52254], [54376].

Props jrf.
Fixes #59683.

git-svn-id: https://develop.svn.wordpress.org/trunk@56975 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-20 13:27:56 +00:00
Felix Arntz
69a56e30f9 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.
Fixes #59677.
See #18298.


git-svn-id: https://develop.svn.wordpress.org/trunk@56974 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-19 19:07:13 +00:00
Jonathan Desrosiers
545748c9d2 Build/Test Tools: Skip Puppeteer download in build workflow.
This adds the `PUPPETEER_SKIP_DOWNLOAD` environment variable to the Build WordPress workflow to skip downloading Puppeteer browser binaries unnecessarily.

Follow up to [56958].

See #59416, #59517, #58863.

git-svn-id: https://develop.svn.wordpress.org/trunk@56973 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-19 15:03:51 +00:00
Jonathan Desrosiers
3850ddca39 Build/Test Tools: Don’t run the performance workflow when branching.
When a branch is created, there is no previous commit to reference in the `github.event.before` context, which causes the performance workflow to fail because there is no previous commit to perform a comparison with.

This adds a condition to check that `github.event.before` is not set to `0000000000000000000000000000000000000000`, which is the default value when there are no previous commits.

Props swissspidy.
See #588867.

git-svn-id: https://develop.svn.wordpress.org/trunk@56972 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-19 13:59:01 +00:00
Sergey Biryukov
2a6b527f73 Tests: Improve the @group annotation accuracy and consistency.
Includes removing `.php` from some older group names, because most of the groups are no longer named based on the file containing the function, and sometimes functions move around, making the file-based group name inaccurate.

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

git-svn-id: https://develop.svn.wordpress.org/trunk@56971 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-19 13:51:04 +00:00
Bernie Reiter
6528d9840b Blocks: During traversal, allow post callback to modify block.
Both the `$pre_callback` and `$post_callback` functions that are given as arguments to `traverse_and_serialize_block(s)` receive a reference to the current block as their first argument. However, while any changes that the "pre" callback makes to the block are reflected by the serialized markup, the same wasn't true for the "post" callback: Any changes that it made were only applied ''after'' the block had already been serialized.

This commit changes the behavior such that `$post_callback`'s changes to the current block are also reflected in the serialized markup.

See #59646.
Props gziolo.
Fixes #59669.

git-svn-id: https://develop.svn.wordpress.org/trunk@56970 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-18 19:30:40 +00:00
Sergey Biryukov
c9ff475e1f Tests: Remove some unnecessary function_exists() checks for compat functions.
Each of these functions already has a separate test for availability.

If any of them are unavailable, then the test should fail rather than be skipped.

Follow-up to [52038], [52039], [52040].

Props johnbillion.
See #59647.

git-svn-id: https://develop.svn.wordpress.org/trunk@56969 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-18 10:39:19 +00:00
Tonya Mork
428c624e15 Build/Test Tools: Fix WP version in package-lock.json.
After [56966], CI jobs that check the `package-lock.json` failed on the "Ensure version-controlled files are not modified or deleted" task.

There are 2 version fields that need to be updated for the new WP version. This changeset updates the "packages" > "version" for 6.5.0.

Follow-up to [56966].

Props swissspidy, benharri.
Unprops hellofromTonya.
Fixes #59665.

git-svn-id: https://develop.svn.wordpress.org/trunk@56968 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 20:34:31 +00:00
Tonya Mork
23f7233278 Fix version number for 6.5-alpha.
Fixes the version number from [56966] to include its number in the version, as it is the commit that opened trunk for 6.5-alpha.

Follow-up to [56966].

git-svn-id: https://develop.svn.wordpress.org/trunk@56967 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 18:48:03 +00:00
Tonya Mork
4ec6ff34f6 Trunk is now 6.5 alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@56966 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 18:39:45 +00:00
Tonya Mork
eae1aa8ebf Post WordPress 6.4 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@56964 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 17:43:48 +00:00
Tonya Mork
47a522ffbe WordPress 6.4 RC1 - capitalize RC in version.
Capitalize RC in the version, i.e. just in case the build requires it.

Unprops hellofromTonya.

git-svn-id: https://develop.svn.wordpress.org/trunk@56963 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 17:25:23 +00:00
Tonya Mork
933d27bbcb WordPress 6.4 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@56962 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 17:17:44 +00:00
Tonya Mork
b97ae04b52 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56961 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 16:06:01 +00:00
Bernie Reiter
dcd6e5c036 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56960 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 15:46:44 +00:00
Tonya Mork
7856fcbd8c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56959 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 13:48:21 +00:00
zieladam
8077c0723f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@56958 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 13:40:22 +00:00
Jonathan Desrosiers
eb637362c7 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56957 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 13:32:06 +00:00
Jonathan Desrosiers
9721943061 Build/Test Tools: Update the caniuse-lite database.
This updates the data for the `caniuse-lite` package and runs `grunt precommit:css`.

Fixes #58869.

git-svn-id: https://develop.svn.wordpress.org/trunk@56956 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 13:18:43 +00:00
Jonathan Desrosiers
fe59ac3fb6 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56955 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 12:42:08 +00:00
Pascal Birchler
f95ddbcee5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56954 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 11:27:24 +00:00
Sergey Biryukov
c9ddecbf09 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56953 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 10:37:35 +00:00
Sergey Biryukov
112f7da4c4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56952 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 09:52:07 +00:00
Tonya Mork
1455e76c88 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56951 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 02:12:07 +00:00
Aaron Jorbin
c197e15fcc 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)


git-svn-id: https://develop.svn.wordpress.org/trunk@56950 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-17 02:00:11 +00:00
Peter Wilson
c626e63715 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56949 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 23:49:10 +00:00
Aaron Jorbin
6802179d2c CSS: Run grunt precommit:css to update CSS.
See: #58869.
Props peterwilsoncc.




git-svn-id: https://develop.svn.wordpress.org/trunk@56948 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 21:46:26 +00:00
Joe McGill
36019306ff 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56947 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 20:39:19 +00:00
Joe McGill
ccb9ab4834 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56946 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 20:35:05 +00:00
Tammie Lister
f6c0c51706 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56945 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 19:14:55 +00:00
Jonathan Desrosiers
797bb8d6af 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56944 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 16:04:00 +00:00
Felix Arntz
1d006a0f57 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56943 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 15:15:14 +00:00
Pascal Birchler
14173bf50d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56942 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 14:32:26 +00:00
Sergey Biryukov
0f81f441dc 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56941 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 14:00:01 +00:00
Peter Wilson
9225964063 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@56940 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 04:41:13 +00:00
Colin Stewart
60cd149b6f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56939 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-16 00:05:28 +00:00
Tonya Mork
f5e171652f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56938 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-15 14:53:12 +00:00
Tonya Mork
39e28173d5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56937 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-15 14:02:34 +00:00
Sergey Biryukov
0633814df8 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56936 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-15 08:07:11 +00:00
Sergey Biryukov
12dc9ca50b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@56935 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-14 12:20:25 +00:00
Pascal Birchler
9d1c581bf6 Build/Test Tools: Do not round percentages when comparing performance test results.
Props joemcgill.
See #59517.

git-svn-id: https://develop.svn.wordpress.org/trunk@56934 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-13 20:03:07 +00:00