Commit Graph

19353 Commits

Author SHA1 Message Date
hellofromTonya
2b2313d56b Editor: Hide visibility and status settings for wp_navigation post type.
Adds CSS to hide both the visibility and status settings for the `wp_navigation` post type.

Props antonvlasenko , costdev. 
Fixes #54407.
Built from https://develop.svn.wordpress.org/trunk@52293


git-svn-id: http://core.svn.wordpress.org/trunk@51885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 21:01:02 +00:00
Sergey Biryukov
576116927b Upgrade/Install: Make some adjustments to the move_dir() function:
* Check for direct PHP flle access and only use `rename()` if true.
* Check whether the destination directory was successfully created.
* Clear the working directory so there is internal parity within the function between the results of a successful `rename()` and a fallback to `copy_dir()`.
* Use `move_dir()` in `WP_Upgrader::move_to_temp_backup_dir()` and `::restore_temp_backup()`.

Follow-up to [51815], [51898], [51899], [51902], [52192], [52284].

Props afragen, peterwilsoncc, dd32, SergeyBiryukov.
See #54166, #51857.
Built from https://develop.svn.wordpress.org/trunk@52289


git-svn-id: http://core.svn.wordpress.org/trunk@51881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 19:12:00 +00:00
hellofromTonya
5c414db9ad External Libraries: Further fix jQuery deprecations in WordPress core.
Follow-up to [50001], [50270], [50367], [50383], [50410], [50420], [50429], [50547].

Props chaion07, Clorith, costdev, desrosj, malthert, peterwilsoncc, presskopp, promz, sabernhardt, SergeyBiryukov, toro_unit, wpnomad.
Fixes #51519.
Built from https://develop.svn.wordpress.org/trunk@52285


git-svn-id: http://core.svn.wordpress.org/trunk@51877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:18:01 +00:00
Sergey Biryukov
5e35ad4b4a Upgrade/Install: Check that WordPress is installed before scheduling cleanup of the temp-backup directory.
Trying to schedule cron jobs before WordPress is installed results in DB errors, which is suboptimal.

This addresses a  `Table 'wp_options' doesn't exist` error when running the installation with `WP_DEBUG` enabled.

Follow-up to [51815], [51898], [51899], [51902], [52192].

Props dlh, pbiron.
See #51857.
Built from https://develop.svn.wordpress.org/trunk@52284


git-svn-id: http://core.svn.wordpress.org/trunk@51876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 17:12:01 +00:00
hellofromTonya
14f6cf230b REST API: Replace hardcoded wp/v2/ preloaded paths with rest_get_route_for_taxonomy_items() and rest_get_route_for_post_type_items() in wp-admin/site-editor.php.
[51962] and [51964] introduced two new functions: `rest_get_route_for_post_type_items()` and `rest_get_route_for_taxonomy_items()`. These functions replaced hardcoded references in all parts of core that reference taxonomy and post type rest controller endpoints. However, several instances were missed in the `wp-admin/site-editor.php` file.

This commit replaces those remaining hardcoded instances.

Follow-up to [51962], [51964], [52232].

Props spacedmonkey.
Fixes #54536.
Built from https://develop.svn.wordpress.org/trunk@52281


git-svn-id: http://core.svn.wordpress.org/trunk@51873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 15:54:03 +00:00
hellofromTonya
ce3aed3186 Administration: For block themes, link to Site Editor interface instead of Customizer in Dashboard's welcome panel and Themes interface.
For block themes (like Twenty Twenty-Two), Customizer menu item is removed and replaced with the Site Editor menu item. However, other links exist in the Dashboard's welcome panel "Customize Your Site" button and the "Customize" button in each theme listed in the Appearance > Themes interface.

This commit changes each of those remaining links to link to the Site Editor interface instead of the Customizer.

To help identify block vs non-block themes, two method methods are introduced in `WP_Theme`:

* `WP_Theme:: is_block_based()` which identifies if the theme is a block theme or not.
* `WP_Theme::get_file_path()` which is similar to `get_theme_file_path()` but uses the directories within the theme object.

Both of these new methods include test coverage including the addition of a parent and child block theme in test data.

Follow-up to [18749], [35483], [42013], [42169].

Props antonvlasenko, jameskoster, hellofromTonya, matveb, noisysocks, poena, sergeybiryukov.
Fixes #54460.
Built from https://develop.svn.wordpress.org/trunk@52279


git-svn-id: http://core.svn.wordpress.org/trunk@51871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 14:27:03 +00:00
noisysocks
e4b553a201 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Update Pattern block category and add documentation
- Fix non existent menu handling in nav block
- Make Reusable blocks available in the Site Editor
- Add caching to WP_Theme_JSON_Resolver_Gutenberg::get_user_data_from_custom_post_type()
- theme.json: add appearanceTools flag to opt-in into appearance UI controls
- Update the block theme folders to templates and parts
- Remove reference to gutenberg_, swap with wp_
- Use table layout in templates list screen
- Update featured image placeholder graphic.
- [Inserter]: Adjust order of theme blocks and reorder inserter items
- Implement suitable fallback for Nav block on front end of site when no menu selected
- Toggle Group Control: add tooltip
- Use first non-empty Nav post as primary fallback for Nav block
- Change .nvmrc and documentation for Node.js version (LTS to 14.18.1)
- Update: Migrate global styles user database data on the rest endpoint
- Update global styles public API
- Update: Rename user preset origin to custom
- Try always generating navigation post title
- Show all templates and template parts on the site editor list screens
- Highlight "Site" in the navigation panel
- Fix template part slug generation when creating through the block placeholder
- [Block Library - Post Title]: Fix render error when setting Page to homepage
- Add 'Clear customizations' button to template list page
- Gallery v1: Allow clicks within replace media placeholder state
- Site Editor: Set the <title> on the list page to be same as the CPT name
- Gallery: Fix stuck image size options loader
- Cover: Fix undo trap
- Add success and error snackbars to the templates list page
- Fix: theme colors cannot override defaults
- Fix: Color palette is not being stored
- Add elements support to the typography panel in global styles
- Make links plural in global styles
- Add: Gradient palette editor
- Update some small style regressions in the template list
- Add: Transparency support on global styles colors
- Fix: apply by slug on all origins
- Render empty Nav block if no fallback block can be utilised
- Allow filtering of Nav block fallback
- Fix Nav block fallback DB query to match on full block grammar start tag
- Remove unstable max pages attribute from Nav block
- DateTimePicker: set PM hours correctly
- Update delete template button
- Site Editor: Template list add rename action
- Fix Nav block editing wrong entity on creation of new Menu
- [REST] Restore the missing double slash in the ID received by /templates
- Add icons to navigation sidebar items
- Update function names for the public global styles API functions
- Templates Controller: Add missing 'is_custom' prop
- Rename gutenberg_ to wp_ for some functions that land in WordPress 5.9
- [Block Library - Template Part]:Remove support for conversion to Reusable block
- Global Styles: Call "palettes" and not "color palettes" on panel label
- Add button text when no colors found
- Update: Global Styes: Count all color palette origins on the palette counter
- Rename navigationMenuId to ref
- Offset the parent iframe when computing Popover position 
- Fix: Failing PHPUnit test
- Show theme, plugin or author in Added By column with appropriate icon or avatar
- Add origin and author to template rest api

See #54487.
Props talldanwp, mamaduka, oandregal.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-30 00:24:27 +00:00
spacedmonkey
ebf7eb50dc Editor: Remove Navigation Areas
Navigation area were merged as part of full site editing and the new navigation block. This functionality is experimental and not currently used in WordPress core, so should be removed.

Props noisysocks, spacedmonkey, get_dave, zieladam.
Fixes #54506.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 22:06:01 +00:00
hellofromTonya
677e6e5b13 Media: Fix TypeError and improve wp_exif_frac2dec() to only return int or float.
For certain images, `wp_exif_frac2dec()` unexpectedly returned a string instead of `int` or `float`. This can occur when an image is missing meta and calls the function with `'0/0'`. For those images, a fatal error was thrown on PHP 8.0+:

{{{
TypeError: round(): Argument #1 ($num) must be of type int|float, string given
}}}

Upon deeper review, inconsistent and unexpected results were returned from different types of input values passed to the function.

Changes are:

* Maintains backwards-compatibility for valid input values.
* Fixes handling of invalid input values by bailing out to return the documented type of `int|float` by returning `0`.
* Improves the fractional conditional check.
* Improves the calculated fraction handling to ensure (a) the numerator and denominator are both numeric and (b) the denominator is not equal to zero.
* Safeguards the behavior via tests for all possible ways code could flow through the function.
* Safeguards the backwards-compatibility of the `wp_read_image_metadata()` by adding some defensive coding around the calls to the `wp_exif_frac2dec()` function.

These changes fix the fatal error and make the function more secure, stable, and predictable while maintaining backwards-compatibility for valid input values.

Follow-up to [6313], [9119], [22319], [28367], [45611], [47287].

Props adamsilverstein, jrf, peterwilsoncc, praem90, stevegs, tobiasbg.
Fixes #54385.
Built from https://develop.svn.wordpress.org/trunk@52269


git-svn-id: http://core.svn.wordpress.org/trunk@51861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-29 19:36:05 +00:00
Sergey Biryukov
7cbc31f7c0 Docs: Remove inaccurate part of the screen_settings filter description.
The filter is called for all admin screens, not just the Widgets screen.

Follow-up to [27256].

Props Starbuck.
Fixes #54524.
Built from https://develop.svn.wordpress.org/trunk@52257


git-svn-id: http://core.svn.wordpress.org/trunk@51849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-27 02:07:00 +00:00
Sergey Biryukov
70f43f261b External Libraries: Update getID3 to version 1.9.21.
The latest version includes preliminary PHP 8.1 support, as well as a variety of bug fixes.

Release notes: https://github.com/JamesHeinrich/getID3/releases/tag/v1.9.21

A full list of changes in this update can be found on GitHub:
https://github.com/JamesHeinrich/getID3/compare/v1.9.20...v1.9.21

This commit also includes:
* Setting the `$options_audiovideo_quicktime_ReturnAtomData` property (now `false` by default) to `true` in `wp_read_video_metadata()` and `wp_read_audio_metadata()` in order to get the `created_timestamp` value.
* PHPCS adjustments previously made for a passing PHP Compatibility scan.

Follow-up to [47601], [47737], [47902], [48278], [49621], [50714].

Props jrf, SergeyBiryukov.
Fixes #54162.
Built from https://develop.svn.wordpress.org/trunk@52254


git-svn-id: http://core.svn.wordpress.org/trunk@51846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 03:06:03 +00:00
Sergey Biryukov
fe2a2ef0e4 Docs: Improve consistency of some DocBlocks in wp-admin/includes/post.php.
Follow-up to [52249].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52251


git-svn-id: http://core.svn.wordpress.org/trunk@51843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-26 00:28:03 +00:00
audrasjb
b0743f17e1 Docs: Miscellaneous DocBlock corrections in wp-admin/includes/post.php.
See #53399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 20:39:00 +00:00
audrasjb
f69b6a04fb Media: Replace some array keys with their numeric equivalent.
This change replaces `['0']` with `[0]` which brings better consistency, readability and performance.

Props chintan1896, adamsilverstein, costdev.
Fixes #53540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-25 08:35:09 +00:00
Sergey Biryukov
dfdbbb4e62 Docs: Miscellaneous DocBlock corrections.
See #53399.
Built from https://develop.svn.wordpress.org/trunk@52242


git-svn-id: http://core.svn.wordpress.org/trunk@51834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 23:59:59 +00:00
audrasjb
c66d278da5 Docs: Document the globals used in some Privacy API methods.
See #53399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-24 11:41:03 +00:00
John Blackbourn
92f0b0cb48 Docs: Various docblock corrections and improvements.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 21:37:01 +00:00
noisysocks
121c824ccd Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- FSE: Add welcome guide
- Update theme styles for the code block
- Add feature flag to toggle the new site editor sidebar
- Add templates list page for site editor
- Cover Block: Fix default background dim
- E2E: Add more Cover block tests
- Cover Block: Fix regressions
- Post Comments Form: ensure typography styles are applied to child elements
- Navigation: Fix space-between
- Fix background colours in nested submenus.
- Fix duplicate custom classnames in navigation submenu block
- Fix colour rendering in Navigation overlay
- Fix: Add ability to opt out of Core color palette V2
- Change @package to WordPress in block-library
- Make the core color palette opt-in for themes with not theme.json
- Remove textdomain from calendar block
- Page List block: fix space before href attribute
- Try: Let Featured Image block inherit dimensions, look like a placeholder
- [Global Styles]: Add block icon next to blocks list
- Page List: Use core entities instead of direct apiFetch
- Site Editor: Stabilize export endpoint
- Fix mobile horizontal scrollbar.
- Multi-entity save: Only set site entity to pending if really saving
- Add page list to navigation direct insert conditions
- Implement "Add New" for templates list in Site Editor
- Post Featured Image: Remove withNotices HOC
- Fix page list missing button styles when set to open on click.
- Make appender fixed position to avoid jumps in the UI
- Color UI component: reorder palettes and update names (core by defaults, user by custom)
- Remove the Styles link in Site Editor
- GlobalStyles sidebar: do not show default palette if theme opts-out
- Only render the site editor canvas when the global styles are ready.
- Global Styles: rename core origin key to default for presets
- Clarify i18n context for PostTemplateActions's "New" label
- Revert erroneous native editor package version bumps
- Try: Hide the columns inserter in pattern previews.
- Fix site editor region navigation
- Update navigation sidebar responsiveness
- Add _wp_array_set and _wp_to_kebab_case to 5.8 compat
- Make user able to change all color palette origins
- Site Editor: Update hrefs to not specifically refer to themes.php?page=gutenberg-edit-site
- Site Editor: Validate the postType query argument
- Navigation: Scale submenu icon.
- Move the theme editor under tools for FSE themes
- Deprecate navigation areas

See #54487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-23 05:40:38 +00:00
Sergey Biryukov
d2c41142ed Editor: Check the correct post type support property for initial_edits.
The property to check should be `editor` instead of `content`, as posts don't have a `content` support property.

This addresses an e2e test failure in Gutenberg.

Follow-up to [52230].

Props talldanwp.
See #53813.
Built from https://develop.svn.wordpress.org/trunk@52231


git-svn-id: http://core.svn.wordpress.org/trunk@51823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-22 08:42:03 +00:00
audrasjb
9ee35e14c2 Editor: Do not provide initial_edits for properties that are not supported by the current post type.
Previously, the block editor initialization always provided "title", "content" and "excerpt" initial edits in the `initializeEditor` call even though these properties might not be supported by the current post type being edited. This leads to a bug in the post editor where as soon as one would open a "new post", the editor considers the content "dirty", meaning changes are applied and it is not possible to leave the editor without encountering an "unsaved changes" notice.

This change updates the `$initial_edits` variable declaration to only provide the properties that are supported by the current post type.

Props youknowriad, h71.
Fixes #53813.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-21 19:28:03 +00:00
Sergey Biryukov
c9ecd13aca Coding Standards: Wrap some long lines in js/_enqueues/admin/post.js per the JS coding standards for better readability.
See #53359.
Built from https://develop.svn.wordpress.org/trunk@52228


git-svn-id: http://core.svn.wordpress.org/trunk@51820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-20 02:49:58 +00:00
Sergey Biryukov
742cd201e6 Docs: Update documentation for the $plugin_data parameter of various hooks:
* Document the structure of the `$plugin_data` array passed to the `plugin_row_meta` filter.
* Document some missing values returned by `get_plugin_data()`:
 * `PluginURI`
 * `AuthorName`
* Link to `get_plugin_data()` and the `plugin_row_meta` filter as the canonical sources in other various filters and actions which receive the `$plugin_data` parameter:
 * `network_admin_plugin_action_links`
 * `network_admin_plugin_action_links_{$plugin_file}`
 * `plugin_action_links`
 * `plugin_action_links_{$plugin_file}`
 * `plugin_auto_update_setting_html`
 * `manage_plugins_custom_column`
 * `after_plugin_row`
 * `after_plugin_row_{$plugin_file}`
 * `in_plugin_update_message-{$file}`
* Update documentation for the `$response` parameter of the `in_plugin_update_message-{$file}` filter:
 * Correct type for the `id` value. It contains a string like `w.org/plugins/[plugin-name]`, not a numeric ID.
 * Update `$icons`, `$banners`, and `$banners_rtl` values to use typed array notation.

Follow-up to [8367], [8402], [12976], [16758], [26540], [30544], [34818], [51733], [52212], [52224].

See #53399.
Built from https://develop.svn.wordpress.org/trunk@52227


git-svn-id: http://core.svn.wordpress.org/trunk@51819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-20 02:23:02 +00:00
audrasjb
1bd5af61d2 Editor: Add missing label to new-post-slug input on Classic Editor.
Previously, the input for changing the permalink of a post does not have a label in the Classic Editor. This change adds a visually hidden label. It also makes sure browsers do not run spellcheck on the input field.

Props sabernhardt.
Fixes #53725.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 22:55:59 +00:00
Sergey Biryukov
966c7376b4 Docs: Restore [51733], accidentally reverted in [52212].
Document some more `$response` values in the `in_plugin_update_message-{$file}` filter:
* `banners_rtl`
* `requires_php`

Follow-up to [51733], [52212].

Fixes #40006.
Built from https://develop.svn.wordpress.org/trunk@52224


git-svn-id: http://core.svn.wordpress.org/trunk@51816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 22:16:58 +00:00
desrosj
9d86fba4db Docs: Remove instances of the “eg.” abbreviation in favor of “example” or “for example”.
See #53330.
Built from https://develop.svn.wordpress.org/trunk@52215


git-svn-id: http://core.svn.wordpress.org/trunk@51807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 14:44:01 +00:00
desrosj
b0b9e23c70 Upgrade/Install: Improve the accuracy of the auto_update_{$type} filter docblock.
This updates the filter documentation for `auto_update_{$type}` to account for the changes to default auto-update behaviors made in WordPress 5.6.

Starting in WordPress 5.6, all new installs auto-update major versions by default.

Props felipeloureirosantos, audrasjb, marybaum, davidbaumwald.
Fixes #53330.
Built from https://develop.svn.wordpress.org/trunk@52214


git-svn-id: http://core.svn.wordpress.org/trunk@51806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-19 14:19:59 +00:00
audrasjb
9f91a2a245 Docs: Add missing parameters in in_plugin_update_message-{$file} filter.
Follow-up to [51733].

Props costdev, audrasjb, SergeyBiryukov.
Fixes #40006.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-18 23:19:08 +00:00
John Blackbourn
40626108d0 Docs: Corrections relating to types used in inline documentation for comment ID and site ID proprties.
Includes a correction for a typo introduced in [52204].

See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-18 13:57:01 +00:00
John Blackbourn
c9746ab584 Docs: Various corrections and improvements relating to types used in inline documentation.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-18 13:50:05 +00:00
audrasjb
b3b8d6959c Upgrade/Install: Add timezone info to last checked update time.
The time displayed on the Updates screen matches the server time which may not be the timezone the person viewing the page is in. This change includes the timezone information with the time.

Props mkaz.
Fixes #53554.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-18 09:25:03 +00:00
audrasjb
03b59ce449 Posts, Post Types: Increment post_count option value only on multisite installations.
Avoid the `post_count` option to be created on single-site installations.

Follow-up to [52201].

Props dlh, henry.wright.
Fixes #54462.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-18 00:20:59 +00:00
audrasjb
cbac37d16d Posts, Post Types: Increment post_count option value during blog creation.
Previously, the `post_count` option value was not incremented when the default "Hello world!" post is inserted during blog creation on a multisite installation.

Props henry.wright.
Fixes #54462.
See #53443.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-17 23:08:03 +00:00
hellofromTonya
d4b3deddda Upgrade/Install: Remove 5.8 function and fix deactivate Gutenberg plugin version compare < 11.9.
Follow-up to [52165] where the `version_compare()` fails for 11.8.x versions. This commit changes the version comparison to < 11.9 for deactivating the Gutenberg plugin. 

The `_upgrade_580_force_deactivate_incompatible_plugins()` function is no longer needed in 5.9. It's redundant and unnecessary as `_upgrade_590_force_deactivate_incompatible_plugins()` deactivates those versions as well.

Removing `_upgrade_580_force_deactivate_incompatible_plugins()` and moving the deactivation logic back into the `_deactivate_gutenberg_when_incompatible_with_wp()`, thus removing the new private function `_deactivate_gutenberg_when_incompatible_with_wp()` introduced in [52165].

Follow-up [51180], [51266], [52165].

Props hellofromTonya, tobiasbg, clorith, sergeybiryukov, costdev.
Fixes #54405. 
Built from https://develop.svn.wordpress.org/trunk@52199


git-svn-id: http://core.svn.wordpress.org/trunk@51791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-17 17:45:00 +00:00
audrasjb
1589bba4f5 Upgrade/Install: Differentiate en_US version strings from localized ones.
Adds a condition to `$version_string` to determine whether the Core update is the original en_US package, or a localized one.

This change fixes an issue where these packages were not differentiated and duplicate messages were displayed.

Props Presskopp, benjamingosset.
Fixes #53710.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-17 16:24:00 +00:00
joedolson
74395140ad Media: Move dismiss upload errors button after errors.
Change the button that dismissess upload errors so it appears after the relevant errors. Change button from icon-only to text-based. Removes ambiguity about what you are cancelling when using the control.

Props ComputerGuru, melchoyce, vdwijngaert, alexislloyd, joedolson, shaunandrews, sabernhardt.
Fixes #42979.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-17 15:56:03 +00:00
audrasjb
0a8b1555b8 Login and Registration: auto-focus the reset password field.
Although auto-focusing form fields can be arguable in some cases, it makes sense when there is a very specific task to accomplish and when there is no relevant content before the auto-focused field.

This change brings consistency between various forms generated by `wp-login.php`.

Props afercia, donmhico, sabernhardt.
Fixes #40302.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-17 00:14:01 +00:00
Sergey Biryukov
8a5e1aa0b3 Upgrade/Install: Correct the weekly cron event for clearing the temp-backup directory:
* Make sure the `wp_delete_temp_updater_backups` event has an action associated with it when it runs.
* Check if the cron event already exists before scheduling it, to avoid scheduling duplicate events. 
* Move the code for clearing the `temp-backup` directory to a standalone function.

Follow-up to [51815], [51898], [51899].

Props pbiron, johnbillion.
See #51857.
Built from https://develop.svn.wordpress.org/trunk@52192


git-svn-id: http://core.svn.wordpress.org/trunk@51784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 22:19:59 +00:00
ryelle
4a18ff86c9 Themes: Force a scrollbar on the Themes page to prevent visual shake on hover.
On some browser & window size combinations (near where a scrollbar would appear), hovering over the theme card causes a layout shift. This makes the screen visually "jump" as the scrollbar appears and disappears. By forcing the scrollbar to be visible on this page, hovering doesn't cause the layout shift anymore.

Props wparslan, sabernhardt, costdev, audrasjb.
Fixes #53478.


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


git-svn-id: http://core.svn.wordpress.org/trunk@51777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 17:18:00 +00:00
hellofromTonya
c5518c2f11 Taxonomy: Allow get_*_*_link() and edit_term_link() functions to accept a term ID, WP_Term, or term object.
`get_term()` accepts a term ID, instance of `WP_Term`, or an object (i.e. `stdClass` as a result of a db query). Functions that use `get_term()` also now allow for the same data types.

Why? For consistency, removing extra processing code in consuming functions, and performance.

Functions changed in this commit are:
* `get_category_feed_link()`
* `get_term_feed_link()`
* `get_tag_feed_link()`
* `get_edit_tag_link()`
* `get_edit_term_link()`
* `edit_term_link()`

For each of consumer of these functions, changes to pass the object instead of the term ID.

Includes unit/integration tests for test coverage of these changes.

Follow-up to [6365], [9136], [9340], [14711], [15792], [15800], [18827], [32606], [36646], [37252].

Props davidbinda, johnbillion, peterwilsoncc, hellofromTonya, sergeybiryukov, mista-flo, hareesh-pillai, audrasjb, jeffpaul, chaion07.
Fixes #50225.
Built from https://develop.svn.wordpress.org/trunk@52180


git-svn-id: http://core.svn.wordpress.org/trunk@51772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 14:57:02 +00:00
hellofromTonya
9cf709d6b6 Administration: Restores "Customize" menu item for non-block themes and moves for block themes.
For themes without non-block themes (i.e. without a `/block-templates/index.html` file), restores the "Customize" menu item under "Appearance" menu to its original location of `6`.

For block themes, moves it to position `8`, as "Styles" is in position `7` as of [52158].

Follow-up to [29026], [52069], [52158].

Props poena, davidbaumwald, sabernhardt, hellofromTonya.
Fixes #54418.
Built from https://develop.svn.wordpress.org/trunk@52178


git-svn-id: http://core.svn.wordpress.org/trunk@51770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 04:45:00 +00:00
hellofromTonya
3f7dbfd6a9 Widgets: Wraps long widget titles in classic Widgets screen.
Follow-up to [18577], [26426].

Props afercia, bravokeyl, drewapicture, gkloveweb, hitendra-chopda, hellofromTonya, ianhayes94, ovann86, pankajmohale, poena, sabrib, swissspidy, xkon.
Fixes #37451.
Built from https://develop.svn.wordpress.org/trunk@52177


git-svn-id: http://core.svn.wordpress.org/trunk@51769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 03:17:58 +00:00
hellofromTonya
a393ec95a5 Login and Registration: Wrap long usernames in login error message.
Adds `word-wrap: break-word` to wrap long usernames in the login's error message. Using `word-wrap` instead of `word-break` for better cross-browser support and to avoid the deprecation (see Ref below).

For consistency, also changes `#backtoblog`.

Ref:
* `word-break: break-word` deprecation https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#syntax

Follow-up to [51108].

Props soniakash, audrasjb, sabernhardt, hellofromTonya, desrosj, ocean90.
Fixes #37617.
Built from https://develop.svn.wordpress.org/trunk@52174


git-svn-id: http://core.svn.wordpress.org/trunk@51766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 01:56:58 +00:00
joedolson
9cb60e437f Coding Standards: Revert accidental image changes in [52171].
Reverts images changed in [52171].

Follow up to [52171].

See #54168.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-16 00:04:01 +00:00
joedolson
3b1d5aec7c Media: Revert media uploader input change in [52059].
Based on follow-up research, this change was never necessary in order to use e2e tests in the media library uploader. Additionally, it created several complicated side effects. Without significant benefit, it's not valuable to pursue the change further.

Follow up to [52059].

See #54168, #54411.
Fixes #54168.
Built from https://develop.svn.wordpress.org/trunk@52171


git-svn-id: http://core.svn.wordpress.org/trunk@51763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 23:22:02 +00:00
joedolson
dbc8d76a9f Taxonomy: Display update notices when adding terms.
Display notice and announce to screen readers when a new term is added. 

Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes #42937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 22:24:01 +00:00
joedolson
06e7a012b1 Commit Standards: Revert [52168] to correct commit message.
Used incorrect commit message..

Follow up to [52168].

See #42937.
Built from https://develop.svn.wordpress.org/trunk@52169


git-svn-id: http://core.svn.wordpress.org/trunk@51761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 22:18:00 +00:00
joedolson
b07f107447 Media: Featured image modal loads only selected image.
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.

Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes #42937.
Built from https://develop.svn.wordpress.org/trunk@52168


git-svn-id: http://core.svn.wordpress.org/trunk@51760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 21:55:00 +00:00
joedolson
6912dc20b9 Menus: Add audible notice on menu item add or remove.
Call `wp.a11y.speak()` to add audible notification when a menu item is added or removed from a menu.

Props joedolson, costdev, hellofromTonya.
Fixes #53840.
Built from https://develop.svn.wordpress.org/trunk@52166


git-svn-id: http://core.svn.wordpress.org/trunk@51758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 20:00:59 +00:00
hellofromTonya
1f608d5d5c Upgrade/Install: Deactivate the Gutenberg plugin if its version is 11.8 or lower.
Avoid a fatal error due to `WP_Theme_JSON_Schema` and potentially other classes and/or functions redeclarations when updating to WordPress 5.9 with an incompatible version of the Gutenberg plugin.

This commit uses the same strategy from 5.8. Moves the plugin deactivation code (introduced in [51266]) to a private function for reuse in 5.8, 5.9, and future major releases.

Follow-up to [51180], [51266].

Props hellofromTonya, johnbillion, jorbin.
See #54405.
Built from https://develop.svn.wordpress.org/trunk@52165


git-svn-id: http://core.svn.wordpress.org/trunk@51757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 19:59:03 +00:00
Sergey Biryukov
9ac09f5a67 Taxonomy: Clarify the taxonomy labels for customizing the field descriptions on Edit Tags screen:
* Update the label names to make it clear that these descriptions are not for the term name or slug itself, but for the Name, Slug, Parent, and Description fields:
 * `name_field_description`
 * `slug_field_description`
 * `parent_field_description`
 * `desc_field_description`
* Update the array structure to make it clear that the default values for these labels are the same for both hierarchical and non-hierarchical taxonomies, with the exception of `parent_field_description`.
* Add documentation and a `@since` note for the new labels.

Follow-up to [52094].

Fixes #43060.
Built from https://develop.svn.wordpress.org/trunk@52163


git-svn-id: http://core.svn.wordpress.org/trunk@51755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-11-15 16:45:01 +00:00