20769 Commits

Author SHA1 Message Date
Greg Ziółkowski
3b63a75108 Editor: Sync changes from the Gutenberg plugin 14.1 release
Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1:

- @wordpress/a11y@3.17.1
 - @wordpress/annotations@2.17.2
 - @wordpress/api-fetch@6.14.1
 - @wordpress/autop@3.17.1
 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1
 - @wordpress/babel-plugin-makepot@5.1.1
 - @wordpress/babel-preset-default@7.1.1
 - @wordpress/base-styles@4.8.1
 - @wordpress/blob@3.17.1
 - @wordpress/block-directory@3.15.2
 - @wordpress/block-editor@10.0.2
 - @wordpress/block-library@7.14.2
 - @wordpress/block-serialization-default-parser@4.17.1
 - @wordpress/block-serialization-spec-parser@4.17.1
 - @wordpress/blocks@11.16.2
 - @wordpress/browserslist-config@5.0.1
 - @wordpress/components@21.0.2
 - @wordpress/compose@5.15.2
 - @wordpress/core-data@5.0.2
 - @wordpress/create-block-tutorial-template@2.5.1
 - @wordpress/create-block@4.1.1
 - @wordpress/custom-templated-path-webpack-plugin@2.1.3
 - @wordpress/customize-widgets@3.14.2
 - @wordpress/data-controls@2.17.2
 - @wordpress/data@7.1.2
 - @wordpress/date@4.17.1
 - @wordpress/dependency-extraction-webpack-plugin@4.0.2
 - @wordpress/deprecated@3.17.1
 - @wordpress/docgen@1.26.1
 - @wordpress/dom-ready@3.17.1
 - @wordpress/dom@3.17.2
 - @wordpress/e2e-test-utils@8.1.1
 - @wordpress/e2e-tests@5.1.2
 - @wordpress/edit-post@6.14.2
 - @wordpress/edit-site@4.14.2
 - @wordpress/edit-widgets@4.14.2
 - @wordpress/editor@12.16.2
 - @wordpress/element@4.15.1
 - @wordpress/env@5.2.1
 - @wordpress/escape-html@2.17.1
 - @wordpress/eslint-plugin@13.1.1
 - @wordpress/format-library@3.15.2
 - @wordpress/hooks@3.17.1
 - @wordpress/html-entities@3.17.1
 - @wordpress/i18n@4.17.1
 - @wordpress/icons@9.8.1
 - @wordpress/interface@4.16.2
 - @wordpress/is-shallow-equal@4.17.1
 - @wordpress/jest-console@6.0.1
 - @wordpress/jest-preset-default@9.0.1
 - @wordpress/jest-puppeteer-axe@5.0.1
 - @wordpress/keyboard-shortcuts@3.15.2
 - @wordpress/keycodes@3.17.1
 - @wordpress/lazy-import@1.4.3
 - @wordpress/library-export-default-webpack-plugin@2.3.3
 - @wordpress/list-reusable-blocks@3.15.2
 - @wordpress/media-utils@4.8.1
 - @wordpress/notices@3.17.2
 - @wordpress/npm-package-json-lint-config@4.2.1
 - @wordpress/nux@5.15.2
 - @wordpress/plugins@4.15.2
 - @wordpress/postcss-plugins-preset@4.1.1
 - @wordpress/postcss-themes@5.0.1
 - @wordpress/preferences-persistence@1.9.1
 - @wordpress/preferences@2.9.2
 - @wordpress/prettier-config@2.0.1
 - @wordpress/primitives@3.15.1
 - @wordpress/priority-queue@2.17.2
 - @wordpress/project-management-automation@1.16.1
 - @wordpress/react-i18n@3.15.1
 - @wordpress/readable-js-assets-webpack-plugin@2.0.1
 - @wordpress/redux-routine@4.17.1
 - @wordpress/reusable-blocks@3.15.2
 - @wordpress/rich-text@5.15.2
 - @wordpress/scripts@24.1.2
 - @wordpress/server-side-render@3.15.2
 - @wordpress/shortcode@3.17.1
 - @wordpress/style-engine@1.0.1
 - @wordpress/stylelint-config@21.0.1
 - @wordpress/token-list@2.17.1
 - @wordpress/url@3.18.1
 - @wordpress/viewport@4.15.2
 - @wordpress/warning@2.17.1
 - @wordpress/widgets@2.15.2
 - @wordpress/wordcount@3.17.1


Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini.
See #56467.



git-svn-id: https://develop.svn.wordpress.org/trunk@54257 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 15:14:54 +00:00
Jonny Harris
f158620eab Networks and Sites: Store main site id of a network in network options.
Instead of caching main site id an object cache, store main site id on a network options. This results in less database queries on sites without persistent object caching. 

Props spacedmonkey, johnjamesjacoby, peterwilsoncc, desrosj.
Fixes #55802.

git-svn-id: https://develop.svn.wordpress.org/trunk@54256 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 14:24:08 +00:00
Jb Audras
0cfcb3e272 Media: Add caching to wp_count_attachments().
This changeset adds caching to `wp_count_attachments()`, for better consistency with `wp_count_posts()`.

Props jeherve, antpb, mukesh27, robinwpdeveloper, costdev.
Fixes #55227.


git-svn-id: https://develop.svn.wordpress.org/trunk@54255 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 14:20:57 +00:00
Sergey Biryukov
beeb5a4a97 Coding Standards: Rename WordPress Dependencies API class files.
The current coding standards note that the name of the class files should be based on the class name with `class-` prepended, and the underscores replaced by hyphens (see the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions] section in the handbook), except for the three legacy files: `class.wp-dependencies.php`, `class.wp-scripts.php`, `class.wp-styles.php`.

To bring more consistency to the codebase and make it easier to implement autoloading in the future, this commit renames those three legacy files to conform to the coding standards:

* `wp-includes/class.wp-dependencies.php` → `wp-includes/class-wp-dependencies.php`
* `wp-includes/class.wp-scripts.php` → `wp-includes/class-wp-scripts.php`
* `wp-includes/class.wp-styles.php` → `wp-includes/class-wp-styles.php`

Includes:
* Loading the new files from the old ones, for anyone that may have been including the files directly.
* Replacing references to the old filenames with the new filenames.

Follow-up to [7970], [45654], [45662], [45663], [45678], [47197], [52026], [53749].

Props afragen, schlessera, swissspidy, dingo_d, hellofromTonya, SergeyBiryukov.
Fixes #37861. See #55647.

git-svn-id: https://develop.svn.wordpress.org/trunk@54254 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 14:15:25 +00:00
Jonathan Desrosiers
9958965c6f Editor: Add box-shadow support for blocks through theme.json files.
This makes it possible to add `box-shadow` to specific blocks (such as buttons or groups), allowing this to be configured in block themes without custom CSS.

Props andrewserong, cbravobernal, madhudollu, scruffian, onemaggie.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54253 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 13:47:55 +00:00
Jb Audras
79a46307e3 Help/About: Add a help tab in Theme Install screen for the new "Block Themes" search filter.
Follow-up to [53906].

Props audrasjb, poena, robinwpdeveloper, webcommsat.
Fixes #56405.


git-svn-id: https://develop.svn.wordpress.org/trunk@54252 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 13:46:03 +00:00
Jb Audras
87c24a16e9 Editor: Backport hooks to filter theme.json data from Gutenberg to 6.1.
This changeset ports the work done in Gutenberg (released in 14.1) to add hooks to filter the `theme.json` data. Specifically, it adds the following filters: `theme_json_default`, `theme_json_blocks`, `theme_json_theme`, and `theme_json_user`.

For more details, see the following Gutenberg pull requests:

- [https://github.com/WordPress/gutenberg/pull/44015 gutenberg#44015]: Make global styles data filterable
- [https://github.com/WordPress/gutenberg/pull/44109 gutenberg#44109]: Prepare `WP_Theme_JSON_Data` class for backporting
- [https://github.com/WordPress/gutenberg/pull/44159 gutenberg#44159]: Update hook's names from `global_styles_*` to `theme_json_*`

Props oandregal, czapla, gziolo, bernhard-reiter.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54251 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 13:10:28 +00:00
Sergey Biryukov
ca0979baa5 Bootstrap/Load: Send HTTP headers after querying posts in WP::main().
By running `WP::send_headers()` after posts have been queried, we can ensure that conditional tags like `is_front_page()`, `is_home()`, etc. work as expected.

This provides better context and more flexibility when adjusting HTTP headers via the `wp_headers` filter or `send_headers` action.

Previously, the earliest action where conditional tags worked correctly was `wp`.

Includes moving the `X-Pingback` header, previously sent in `WP::handle_404()`​ after posts have been queried, to a more appropriate place in `WP::send_headers()`.

Follow-up to [2627], [34442].

Props jonoaldersonwp, joostdevalk, peterwilsoncc, adamsilverstein, SergeyBiryukov.
Fixes #56068.

git-svn-id: https://develop.svn.wordpress.org/trunk@54250 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 13:10:24 +00:00
Jb Audras
61f7e75895 Security: Salting functions: translate the phrase "put your unique phrase here".
In `wp_salt()` WordPress pre-populates the check for duplicate salt values with the default put your unique phrase here. As the `wp-config.php file` for non-en_US can be translated in downloaded packages, a translated version of this phrase ought to be in the pre-populated duplicate values array too.

Props peterwilsoncc, SergeyBiryukov, whaze, costdev, audrasjb.
Fixes #55937.


git-svn-id: https://develop.svn.wordpress.org/trunk@54249 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 11:55:21 +00:00
Jb Audras
270629df0e Shortcodes: Reverse wrapping of apply_shortcodes() and do_shortcode().
This changeset reverses the wrapping of `apply_shortcodes()` and `do_shortcode()` such that `apply_shortcodes()` is now the recommended function. In addition:

- Calls to `do_shortcode()` have been changed to `apply_shortcodes()`.
- Some default filter callbacks have been changed from `'do_shortcode'` to `'apply_shortcodes'`.
- Applicable documentation has been updated to refer to `apply_shortcodes()` instead.

Follow-up to [47004].

Props SergeyBiryukov, rafiahmedd, namithjawahar, peterwilsoncc, costdev.
Fixes #55883.


git-svn-id: https://develop.svn.wordpress.org/trunk@54248 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 10:29:55 +00:00
Jb Audras
1b3b794265 Administration: Allow to wrap Settings sections with custom HTML content.
This changeset improves the `add_settings_section()` function to allow developers to pass extra HTML mark-up to be rendered before and after the settings section. Extra argument `$args` can now be passed to the function, and is an array that can contain the following items:

- `before_section`: HTML content to prepend to the section's HTML output. Receives the section's class name provided with the `section_class` argument via an optional `%s` placeholder. Default empty.
- `after_section`: HTML content to append to the section's HTML output. Default empty.
- `section_class`: The class name to use for the section. Used by `before_section` if a `%s` placeholder is present. Default empty.

The HTML passed using these extra arguments is escaped using `wp_kses_post()` just before rendering. This changeset also provides a set of unit tests for this new feature.

Props griffinjt, nacin, scribu, ross_ritchey, ryan, chriscct7, palmiak, rehanali, costdev, martinkrcho, chaion07, audrasjb, hellofromtonya.
Fixes #17851.


git-svn-id: https://develop.svn.wordpress.org/trunk@54247 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 09:57:43 +00:00
Jonny Harris
0bdbce39e1 Posts, Post Types: Post title should not be translatable in get_user_data_from_wp_global_styles method.
In [52280] `wp_template_part` and `wp_template` posts, made the title of the post created not translatable. This was changed [54186] by mistake. This commit reverts that change.

Follow up to [54186], [52280].

Props mukesh27, kebbet.
See #55392.

git-svn-id: https://develop.svn.wordpress.org/trunk@54246 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 09:35:46 +00:00
Jb Audras
58433f0f5a General: Revert [54225].
The My Site screen is not documented on HelpHub yet, so let's re-add the former Codex link for now.

Follow-up to [54225].

Props SergeyBiryukov.
Unprops audrasjb.
See #48987.


git-svn-id: https://develop.svn.wordpress.org/trunk@54245 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 08:17:22 +00:00
Peter Wilson
4241aa348a Posts, Post types: Prevent get_sample_permalink() modifying the post object.
`get_sample_permalink()` (ab)uses the `$post->filter` property to indicate a sample permalink is being generated for the post. This change ensures the property is restored to its original value.

Props herregroen, hellofromTonya, peterwilsoncc, Rahmohn, costdev.
Fixes #54736.




git-svn-id: https://develop.svn.wordpress.org/trunk@54244 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 04:29:11 +00:00
Joe Dolson
4c173550a2 Media: Change alt attribute field to textarea in media library.
Change the input field used for `alt` attributes in the media library views from a text input to a textarea. This gives users more flexibility in resizing the field for easier management of longer alt attributes. 

This patch includes a less-common use of `esc_attr` for a `textarea`. This is because the primary usage of the `alt` attribute will be escaped using `esc_attr`, and the value in editing should match the value output on the front end.

Props edent, sabernhardt, afercia, JavierCasares, audrasjb, joedolson.
Fixes #50066.

git-svn-id: https://develop.svn.wordpress.org/trunk@54243 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 04:00:35 +00:00
Jonathan Desrosiers
826e1a3f89 General: Throw a more descriptive error when templates are not found.
When `wp.template()` is called in JavaScript for a template element that does not exist, a very nondescript error message is currently returned (“Uncaught TypeError: Cannot read property `replace` of `undefined`”).

This updates adds a check for this scenario and a new “Template not found” error is now thrown instead.

Props joehoyle, noisysocks, hilayt24.
Fixes #36631.

git-svn-id: https://develop.svn.wordpress.org/trunk@54241 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 03:50:40 +00:00
Jonathan Desrosiers
7a6ba32941 Networks and Sites: Officially remove global terms.
Global terms was a feature from the WordPress MU days where multisite and single site installs used different code bases.

In WordPress 3.0, WordPress MU was merged into one location and the UI [14854] and “on” switch [14880] for global terms were completely removed.

Even before this merge, global terms was bug infested and unreliable. After [14854]/[14880], the feature was no longer maintained and became increasingly broken as taxonomies progressed without it (term splitting and term meta do not work at all). At this point, the feature has not worked in 12+ years and there’s no hope for saving it.

This deprecates the remaining global terms related code and no-ops the functions.

Global terms, you don’t have to go home, but you can’t stay here.

Props scribu, wonderboymusic, SergeyBiryukov, nacin, pento, desrosj, johnjamesjacoby, johnbillion, dd32.
Fixes #21734.

git-svn-id: https://develop.svn.wordpress.org/trunk@54240 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 02:49:25 +00:00
Jonathan Desrosiers
f2f99f3985 Bootstrap/Load: Confirm the value of WP_ENVIRONMENT_TYPE before using.
This adjusts the check for the presence of the `WP_ENVIRONMENT_TYPE` constant to also confirm it is set to a non-empty value before using.

Props dd32, khokansardar, ramon-fincken.
Fixes #55741.

git-svn-id: https://develop.svn.wordpress.org/trunk@54239 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 02:22:49 +00:00
Jonathan Desrosiers
2225a352e5 Coding Standards: Applying an alignment fix from running composer format.
Follow up to [54214].

See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54238 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 01:40:56 +00:00
Sergey Biryukov
3beda5b203 Date/Time: Minor tweak to support deprecated timezones on General Settings screen.
Underneath the timezone selector on the General Settings screen, a small snippet of info about the selected time zone is displayed.

This information would be missing if the timezone is set to a deprecated timezone value, even though PHP is perfectly capable of generating that information, including for deprecated timezones.

By passing the `DateTimeZone::ALL_WITH_BC` constant as the `$timezoneGroup` parameter to the PHP native `timezone_identifiers_list()` function, a timezone name list is retrieved containing both current and deprecated timezone names, preventing the condition from failing when the current timezone is a deprecated one.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Note: As this is an admin/output page, no pre-existing tests are available.

Follow-up to [54207], [54217], [54227], [54229], [54230], [54232], [54233].

Props jrf, costdev, marcyoast.
See #56468.

git-svn-id: https://develop.svn.wordpress.org/trunk@54237 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 01:37:59 +00:00
Jonathan Desrosiers
39e5879e99 Themes: Import Twenty Twenty-Three is now the default theme.
Follow up to [54235].

See #56383.

git-svn-id: https://develop.svn.wordpress.org/trunk@54236 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 01:34:49 +00:00
Jonathan Desrosiers
a145e169ce Bundled Themes: Import Twenty Twenty-Three, the new default theme for WordPress 6.1.
Twenty Twenty-Three is a stripped-back, minimal version of Twenty Twenty-Two that includes a collection of 10 distinct style variations designed and submitted by members of the WordPress community.

This unique approach to creating a default theme harnesses all of the flexibility that full site editing has to offer.

Everybody loves you when you’re twenty-three. What’s my age again?

Props amjadr360, anariel-design, audrasjb, beafialho, bgardner, colorful-tones, critterverse, daisyo, desrosj, dianeco, greenshady, joen, jffng, kafleg, kishanjasani, kraftbj, luminuu, madhudollu, mikachan, mtias, onemaggie, pbking , poena, richtabor, scruffian, soean, tanvirul, thelovekesh.
See #56383.

git-svn-id: https://develop.svn.wordpress.org/trunk@54235 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 01:21:00 +00:00
Peter Wilson
7ad9e7d04e Posts, Post types: Cache get_page_by_title().
Convert `get_page_by_title()` to a `WP_Query` wrapper to take advantage of the object caching built in to the latter.

Add dedicated unit tests for the function `get_page_by_title()`.

Props spacedmonkey, boonebgorges, igmoweb, pcfreak30, pbearne.
Fixes #36905.



git-svn-id: https://develop.svn.wordpress.org/trunk@54234 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 01:13:51 +00:00
Sergey Biryukov
45da79e52e Date/Time: Correct timezone dropdown list creation in wp_timezone_choice().
This fixes a bug where if the `timezone_string` is set to a timezone name which has since been deprecated, no option would be (pre-)selected in the generated dropdown list and when the form using the dropdown list is submitted, the “old”, originally saved value would be lost as the form would submit without a value being selected for the `timezone_string` field.

The fix is a little hacky: it basically checks ahead of generating the actual dropdown list whether the `$selected_zone` value would be recognized and set to “selected” and if not, verifies that the value ''is'' a valid but outdated timezone name and if so, adds an extra dropdown entry to the top of the list with the original value and sets this value to “selected”.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Note: There are no pre-existing tests at all for this method and adding a complete set of tests for this method is outside the scope of this ticket, so this fix does not contain any tests.

Follow-up to [54207], [54217], [54227], [54229], [54230], [54232].

Props jrf, costdev, marcyoast.
See #56468.

git-svn-id: https://develop.svn.wordpress.org/trunk@54233 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 01:00:24 +00:00
Sergey Biryukov
09e619c648 Date/Time: Correct sanitization of localized default timezone_string in populate_options().
This fixes a bug where if the default `timezone_string` is set to a deprecated timezone name due to a localization providing an outdated timezone name string, this localized timezone string would be discarded and an empty string would be set as the timezone value instead.

By passing the `DateTimeZone::ALL_WITH_BC` constant as the `$timezoneGroup` parameter to the PHP native `timezone_identifiers_list()` function, a timezone name list is retrieved containing both current and deprecated timezone names, preventing the invalidation of the option value.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Includes:
* Expanding the translators comment to encourage translators to use “old” names over “new” names.
* Adding a dedicated test to the `Tests_Admin_IncludesSchema` test class.

Follow-up to [54207], [54217], [54227], [54229], [54230].

Props jrf, costdev.
See #56468.

git-svn-id: https://develop.svn.wordpress.org/trunk@54232 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-20 00:41:58 +00:00
David Baumwald
faac282869 Upgrade/Install: Use "placeholder" for example values in setup-config.php.
During install, the user is prompted for database connection settings.  Inputs for the database name, username, and password will most likely be changed from the examples given, but these example values are presented as the input's `value` property.  This required the user to clear the current value before entering their own.

This change moves the example values for these fields to the `placeholder` property.

Props oliverstapelfeldt, audrasjb, krupalpanchal, sabernhardt.
Fixes #56365.

git-svn-id: https://develop.svn.wordpress.org/trunk@54231 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 23:53:09 +00:00
Sergey Biryukov
0b9f8c8f7b Date/Time: Correct sanitization of timezone_string in sanitize_option().
This fixes a bug where if the `timezone_string` is set to a timezone name which has since been deprecated, the option value would be “lost” when saving the value again, as the comparison being done to verify whether it is a valid timezone name would only take “current” timezone names into account and would invalidate deprecated timezone names.

By passing the `DateTimeZone::ALL_WITH_BC` constant as the `$timezoneGroup` parameter to the PHP native `timezone_identifiers_list()` function, a timezone name list is retrieved containing both current and deprecated timezone names, preventing the invalidation of the option value.

See the extensive write-up about this in ticket #56468.

Also see: [https://www.php.net/manual/en/datetimezone.listidentifiers.php PHP Manual: timezone_identifiers_list()].

Includes adding a dedicated test to the data provider used in the `Tests_Option_SanitizeOption` test class.

Note: The new data set is ''named'', even though the other data sets are unnamed, to make sure it is clear what this data set is testing. Adding test names for the original data sets in this data provider would be a great future improvement, but is outside of the scope of this commit.

Follow-up to [18323], [33119], [54207], [54217], [54227].

Props jrf, costdev.
See #56468.

git-svn-id: https://develop.svn.wordpress.org/trunk@54229 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 23:46:26 +00:00
Joe Dolson
e466bee571 Media: Set https as placeholder for embedding media from URL.
Change the "Insert from URL" field in the media library to use a placeholder suggesting the `https://` protocol instead of a value attribute with `http://`.

Props Presskopp, adamsilverstein, joyously, thijso, joedolson, costdev.
Fixes #53404.

git-svn-id: https://develop.svn.wordpress.org/trunk@54228 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 23:32:10 +00:00
Sergey Biryukov
f33c8c464a I18N: Update list of continents and cities for the timezone selection.
Based on a two-way comparison between the available timezone city names in PHP 5.6.20 and PHP 8.2.0.

Lists of available timezone names have been retrieved using the PHP `timezone_identifiers_list()` function.

See: [https://3v4l.org/ro1vY/rfc#vgit.master timezone_identifiers_list() output and comparison].

Note: Both spellings of `Kiev`/`Kyiv` need to be in the list to allow it to work PHP cross-version.
* The “old” version — `Kiev` — will be used as the basis to find the localized name for the timezone dropdown lists on PHP 5.6 to 8.1.
* The corrected spelling — `Kyiv` — will be used to find the localized name on PHP 8.2 and up.

Follow-up to [50555], [54207], [54217].

Props jrf, costdev.
See #56468.

git-svn-id: https://develop.svn.wordpress.org/trunk@54227 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 23:22:40 +00:00
David Baumwald
3b3d7ebb71 Media: Revert WebP generation.
Given [https://make.wordpress.org/core/2022/09/11/webp-in-core-for-6-1/ Matt's recent post about removing WebP from core] and possibly implementing the feature in a future [https://make.wordpress.org/core/2022/09/11/canonical-plugins-revisited/ "Canonical Plugin"], this change reverts changesets [54086], [54094], and [54097].  Additionally, [54210] contained a coding standards follow-up in one of the affected files that is no longer needed.

Reverts [54086], [54094], and [54097].

Props SergeyBiryukov.
See #55443.

git-svn-id: https://develop.svn.wordpress.org/trunk@54226 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 22:51:53 +00:00
Jb Audras
cc3cb33ef5 General: Replace Codex links with their HelpHub counterparts - My Sites screen
Props chaton666.
See #48987.


git-svn-id: https://develop.svn.wordpress.org/trunk@54225 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 22:35:20 +00:00
Sergey Biryukov
49634edddb Docs: Correct the wording in wp_lostpassword_url() description.
This affects:
* The `wp_lostpassword_url()` function.
* The `lost_password_html_link` filter.

The filter description was copied from the function, which appears to be not quite accurate, as the lost password can only be reset, not retrieved.

Follow-up to [11448], [54206].

See #55646.

git-svn-id: https://develop.svn.wordpress.org/trunk@54224 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 22:24:46 +00:00
Sergey Biryukov
8423a7da9e Coding Standards: Move WP_List_Table::get_views_links() to a more appropriate place.
This moves the newly introduced `::get_views_links()` method to a more predictable location, next to the the `::get_views()` and `::views()` methods.

Follow-up to [54215].

See #42066.

git-svn-id: https://develop.svn.wordpress.org/trunk@54223 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 22:22:08 +00:00
Sergey Biryukov
d3519b09e8 I18N: Remove <code> tags from translatable strings in WP_List_Table::get_views_links().
To simplify the strings and exclude any parts that don't require translation, the `<code>` tags wrapping a placeholder can be moved out of the string and added to the placeholder value.

Follow-up to [54215].

See #42066.

git-svn-id: https://develop.svn.wordpress.org/trunk@54222 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 22:13:21 +00:00
Jb Audras
e2f98843c8 Twenty Twenty-One: Add a missing HTML comment for Customizer notice control.
This brings consistency with other bundled themes, like Twenty Nineteen.

Props haritpanchal.
Fixes #55725.


git-svn-id: https://develop.svn.wordpress.org/trunk@54221 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 22:05:47 +00:00
Jb Audras
869800ffa6 General: Ensure admin notices are properly displayed on Site Health layout.
This changeset adds some CSS tweaks to ensure admin notices like the "Automated update failed" notice don't break the layout of the Site Health and Privacy Settings screens.

Props johnjamesjacoby, costdev, Clorith, audrasjb, SergeyBiryukov, joedolson.
Fixes #54624.



git-svn-id: https://develop.svn.wordpress.org/trunk@54220 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 21:49:44 +00:00
David Baumwald
8f40409840 Help/About: Make translator comments version agnostic and make version translatable on the About page.
In past versions of the About page, translator comments referencing the Field Guide and Release Notes links included the current version number.  This change updates these translator comments to remove a specific version number, which was not necessary.

This change also abstracts the version number out of the "Read the WordPress X.X Release Notes" string, making it translatable.

Props Presskopp, audrasjb, SergeyBiryukov, marybaum.
Fixes #54741.

git-svn-id: https://develop.svn.wordpress.org/trunk@54219 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 21:41:57 +00:00
Jb Audras
0c248dc0df General: Pass $action to nonce_life filter.
This changeset contextualizes the usage of `nonce_life` filter by passing the `$action` parameter. It allows to alterate the default lifespan of nonces on a case by case basis.

Props giuseppemazzapica, dwainm, DrewAPicture, jorbin, audrasjb, SergeyBiryukov, costdev, antonvlasenko.
Fixes #35188.


git-svn-id: https://develop.svn.wordpress.org/trunk@54218 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 21:34:52 +00:00
Joe Dolson
fd91d0f355 Editor: Fix text zoom on link popup editor.
Update CSS in the classic visual editor link popup to remove sizing in pixels that caused significant text overlaps when the base font size is scaled or set to a larger custom value in the browser or operating system.

Props jonny-s, sabernhardt, joedolson.
Fixes #53174.

git-svn-id: https://develop.svn.wordpress.org/trunk@54216 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 21:16:10 +00:00
David Baumwald
56bde67811 Administration: Add new get_views_links method to WP_List_Table.
Many `WP_List_Table` child classes in core use mostly the same code to create their "view" links markup.  To DRY-up the code, a new `WP_List_Table->get_view_links` method is being introduced to consolidate the HTML link generation when provided an array of links.

This change also implements this new method in the relevant `WP_List_Table_xxx` child classes `get_views` methods.  Finally, unit tests are being added to validate view links markup and test for some "unhappy paths".

Props afercia, costdev, garrett-eclipse, Dharm1025, juhise, peterwilsoncc.
Fixes #42066.

git-svn-id: https://develop.svn.wordpress.org/trunk@54215 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 21:06:08 +00:00
Jb Audras
c7baffbbc3 Editor: Backport block supports filter callback, registrations and tests to 6.1.
This changeset backports the following changes:

- Implement [https://github.com/WordPress/gutenberg/pull/42880 gutenberg#42880]: Backport script loader: enqueue stored block supports styles
- Allow a way to bypass `SCRIPT_DEBUG` in tests. See [https://github.com/WordPress/wordpress-develop/pull/3259#issuecomment-1250403735 comment] and the related [https://github.com/WordPress/gutenberg/pull/44248 Gutenberg pull request]

Props ramonopoly, gziolo, bernhard-reiter, audrasjb, costdev.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54214 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 20:54:20 +00:00
David Baumwald
a647192d7c Role/Capability: Add a new update_role function.
Until now, changing a user's role involved deleting a user's role then re-adding.  This change creates a new `update_role` function and associated method in `WP_Roles` to consolidate this process.

This commit also introduces new unit tests around `update_role` and adds additional "unhappy path" tests for roles and capabilities in general.

Props maksimkuzmin, peterwilsoncc, NomNom99, costdev, SergeyBiryukov.
Fixes #54572.

git-svn-id: https://develop.svn.wordpress.org/trunk@54213 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 20:47:22 +00:00
David Baumwald
906ec63c78 Upgrade/Install: Add plugin URL to the automatic update email.
For each automatic plugin update, both successful and failed, information about each plugin is included in the email upon completion of the process.  This change adds the plugin URL, if known, to the information included for each plugin that was processed.

This change also adds unit tests to validate the email contents after various automatic plugin update scenarios.

Props JosVelasco, pbiron, oliverstapelfeldt, ChrisHardie, Ipstenu, dd32, peterwilsoncc, audrasjb, costdev.
Fixes #53049.

git-svn-id: https://develop.svn.wordpress.org/trunk@54212 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 20:26:09 +00:00
Jb Audras
e573d73355 Editor: Backport block supports (border, color, elements, spacing) from Gutenberg to WP 6.1.
This changeset backports `border`, `color`, `elements` and `spacing` block supports changes from Gutenberg to WP 6.1. 

See tracking issue on Gutenberg repository: [https://github.com/WordPress/gutenberg/pull/43440 gutenberg#43440].

Props ramonopoly, glendaviesnz, bernhard-reiter, audrasjb, costdev.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54211 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 20:12:02 +00:00
Jonathan Desrosiers
0fba7cf62b Coding Standards: Various alignment fixes from composer format.
Follow up to [53874], [54097], [54110], [54155], [54162], [54184].

See #39210, #55443, #56288, #56092, #56408, #56467, #55881.

git-svn-id: https://develop.svn.wordpress.org/trunk@54210 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 19:49:47 +00:00
Jonathan Desrosiers
5d05191bdc External Libraries: Update the jQuery UI library to version 1.13.2.
This is a bug fix release. For more information on the changes included, see https://jqueryui.com/changelog/1.13.2/.

Props Clorith, monolithon, desrosj.
Fixes #56239.

git-svn-id: https://develop.svn.wordpress.org/trunk@54209 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 18:02:11 +00:00
David Baumwald
5f0e8ba053 Posts, Post Types: Update new wp_post_class_taxonomies filter name for consistency.
In [54066], a new filter was added to alter the taxonomies for which class names are generated for a given post type.  At the time, the filter name was prefixed with `wp_`.

For consistency with filters of a similar type, this change updates the filter name to `post_class_taxonomies`.

Follow-up to [54066].

Props SergeyBiryukov.
See #37114.

git-svn-id: https://develop.svn.wordpress.org/trunk@54208 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 17:52:54 +00:00
David Baumwald
4a9e86841f Login and Registration: Add a new filter for the lost password link.
On the login page, the "Register" link for new users has been filterable for some time.  This change adds the ability to filter the "Lost your password?" link as well.

Props wparslan, audrasjb, rafiahmedd, SergeyBiryukov, antonvlasenko, hellofromTonya.
Fixes #55388.

git-svn-id: https://develop.svn.wordpress.org/trunk@54206 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 17:07:52 +00:00
Marius L. J
45860af625 Site Health: Improve the details provided by the REST API checks.
The descriptions provided whenever a REST API check failed lacked details that would help in troubleshooting any issues, most notably the actual REST API endpoint that was being tested.

Adding this vital piece of detail, along with a revamp of the error messages shown, where previously there was a risk that the markup of your website was included as an error message, improves the overall user experience, and gives more accurate details that can be looked when looking up how to fix or improve the behavior of the REST API.

Props dingo_d, shetheliving.
Fixes #54617.

git-svn-id: https://develop.svn.wordpress.org/trunk@54205 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 15:28:33 +00:00
Tonya Mork
c5c1f37e0d Editor: Fix function name case in wp_default_packages_inline_scripts().
Fixes function name typo by changing from uppercase `get_current_user_ID()` to lowercase `get_current_user_id()`.

>Note: Function names are case-insensitive for the ASCII characters A to Z, though it is usually good form to call functions as they appear in their declaration.
[https://www.php.net/manual/en/functions.user-defined.php As per the PHP manual], PHP functions are case-insensitive, meaning the code runs. However, this fix is necessary for consistency, maintainability, and future-proofing.

Follow-up to [54182].

Unprop hellofromTonya.
See #56467.

git-svn-id: https://develop.svn.wordpress.org/trunk@54204 602fd350-edb4-49c9-b593-d223f7449a82
2022-09-19 14:18:18 +00:00