Commit Graph

19362 Commits

Author SHA1 Message Date
Sergey Biryukov
62574145ce Coding Standards: Use camel case with a lowercase first letter for the blockTheme array key.
This matches the WordPress JS naming conventions and the naming of other keys in the `$prepared_themes` array.

Follow-up to [52341].

See #54578, #53359.
Built from https://develop.svn.wordpress.org/trunk@52346


git-svn-id: http://core.svn.wordpress.org/trunk@51938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-08 10:16:05 +00:00
hellofromTonya
9aba2584bb Themes: Hide "Live Preview" button for FSE block themes.
Currently, the Site Editor does not have a live preview feature for non-activated block themes.

This commit is a stop-gate to remove the "Live Preview" button for those themes. It avoids confusing users and avoiding a notification message that doesn't make sense.

Props antonvlasenko, costdev, hellofromTonya, kafleg, paaljoachim.
Fixes #54578.
Built from https://develop.svn.wordpress.org/trunk@52341


git-svn-id: http://core.svn.wordpress.org/trunk@51933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 20:07:00 +00:00
hellofromTonya
4f0c8ef665 Upgrade/Install: Fix moving plugins folder in WP_Upgrader:: move_to_temp_backup_dir().
[51815] introduced the creation of a temporary backup of plugins before updating.

The `move()` (and later, `move_dir()`) call) uses a `$src` parameter.
For Hello Dolly, this is `<path>/wp-contents/plugins/.` (note the period at the end).

For users on Linux and Mac, this doesn't appear to cause any problems.
However, on Windows, the move causes the plugins folder to be moved which then causes a failure when attempting to call `mkdir()`.

This commit skips any plugin whose slug is `'.'` as this slug results in the `$src` value ending in a period. 

Follow-up to [51815].

Props costdev, boniu91, hellofromTonya.
Fixes #54543.
Built from https://develop.svn.wordpress.org/trunk@52337


git-svn-id: http://core.svn.wordpress.org/trunk@51929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:51:03 +00:00
youknowriad
ec25c4ee57 Site Editor: Render the template descriptions properly.
The initializaion of the editor was a bit different between Gutenberg and Core.
This brings them in sync which solves the missing descriptions from the template header
in the site editor.

See #54337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:40:01 +00:00
hellofromTonya
177a4d830b REST API: Pass post type name to rest_get_route_for_post_type_items().
The new `rest_get_route_for_post_type_items()` function accepts a string, not an object. This commit passes the post type name instead of the object to resolve a notice in the site editor page.

Follow-up to [52281].

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


git-svn-id: http://core.svn.wordpress.org/trunk@51925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 16:15:02 +00:00
John Blackbourn
39bff93b6b Docs: Various inline documentation corrections and improvements.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 12:20:02 +00:00
hellofromTonya
f70fb51f99 Themes: Better names for WP_Theme::is_block_theme() and wp_is_block_theme() and make wp_is_block_theme() a wrapper.
This commit renames the following method and function to better represent block theme terminology:

* `WP_Theme::is_block_based()` to `WP_Theme::is_block_theme()`
* `wp_is_block_template_theme()` to `wp_is_block_theme()`

It also changes `wp_is_block_theme()` to be a helper wrapper (sugar syntax) for `wp_get_theme()->is_block_theme();`. Why? To ensure both the method and function behave the same, to help Gutenberg maintain WordPress cross-version compatibility, and to make it less cumbersome to port changes from Gutenberg to Core.

Follow-up to [52069], [52247], [52279].

Props antonvlasenko, costdev, hellofromTonya, noisysocks.
Fixes #54550.
Built from https://develop.svn.wordpress.org/trunk@52330


git-svn-id: http://core.svn.wordpress.org/trunk@51922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 00:02:02 +00:00
John Blackbourn
9a982b4ae8 Docs: Various docblock corrections.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-01 12:17:00 +00:00
audrasjb
15d7d368f3 Docs: Docblock corrections in _disable_block_editor_for_navigation_post_type().
Follow-up to [52145].

See #53399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-01 11:41:59 +00:00
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