44842 Commits

Author SHA1 Message Date
Sergey Biryukov
53d604365e External Libraries: Update the Requests library to version 2.0.0.
This is a major release and contains breaking changes.

Most important changes to be aware of for this release:
* All code is now namespaced. Though there is a full backward compatibility layer available and the old class names are still supported, using them will generate a deprecation notice (which can be silenced by plugins if they'd need to support multiple WP versions). See the [https://requests.ryanmccue.info/docs/upgrading.html upgrade guide] for more details.
* A lot of classes have been marked `final`. This should generally not affect userland code as care has been taken to not apply the `final` keyword to classes which are known to be extended in userland code.
* Extensive input validation has been added to Requests. When Requests is used as documented though, this will be unnoticable.
* A new `WpOrg\Requests\Requests::has_capabilities()` method has been introduced which can be used to address #37708.
* A new `WpOrg\Requests\Response::decode_body()` method has been introduced which may be usable to simplify some of the WP native wrapper code.
* Remaining PHP 8.0 compatibility fixed (support for named parameters).
* PHP 8.1 compatibility.

Release notes: https://github.com/WordPress/Requests/releases/tag/v2.0.0

For a full list of changes in this update, see the Requests GitHub:
https://github.com/WordPress/Requests/compare/v1.8.1...v2.0.0

Follow-up to [50842], [51078].

Props jrf, schlessera, datagutten, wojsmol, dd32, dustinrue, soulseekah, costdev, szepeviktor.
Fixes #54504.

git-svn-id: https://develop.svn.wordpress.org/trunk@52244 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-25 01:10:30 +00:00
Robert Anderson
5349ecdc99 Themes: Move the skip link to outside the canvas in block themes
Fix Twenty Twenty-one having an erroneous margin above the Header template part
by moving the skip link outside of the wp-site-blocks canvas.

This is a backport of https://github.com/WordPress/gutenberg/pull/34986.

Props youknowriad.
Fixes #54491.





git-svn-id: https://develop.svn.wordpress.org/trunk@52243 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-25 01:05:30 +00:00
Sergey Biryukov
37abb3a470 Docs: Miscellaneous DocBlock corrections.
See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@52242 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-24 23:58:20 +00:00
Jonathan Desrosiers
cb67c52be2 Build/Test Tools: Configure Dependabot scanning for GitHub Actions.
This eliminates the need to manually check all GitHub Actions used within workflow files for updates.

Fixes #54503.

git-svn-id: https://develop.svn.wordpress.org/trunk@52241 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-24 14:49:24 +00:00
Jonathan Desrosiers
e7c8bf8fa7 Build/Test Tools: Specify NodeJS version 14.x in the .nvmrc file.
As of 2021-10-26, the LTS version of NodeJS is now `16.x`.

This pins the `14.x` version in the `.nvmrc` file to ensure contributors are able to contribute without issue until compatibility with version `16.x` can be confirmed in both `trunk` and the Gutenberg repository on GitHub.

Fixes #54502.

git-svn-id: https://develop.svn.wordpress.org/trunk@52240 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-24 14:05:31 +00:00
Jb Audras
9e64321e41 Docs: Document the globals used in some Privacy API methods.
See #53399.


git-svn-id: https://develop.svn.wordpress.org/trunk@52239 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-24 11:39:14 +00:00
Peter Wilson
03d2275051 Twenty Twenty-One: Combine duplicate CSS rules.
Use the postcss-merge-rules package when building TT1 stylesheets to reduce duplicate code in production CSS.

Props SergeyBiryukov, ryelle, Shaharyar10, shital-patel, mukesh27, poena.
Fixes #53605.



git-svn-id: https://develop.svn.wordpress.org/trunk@52238 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-24 03:33:02 +00:00
Jb Audras
5252489c0c Twenty Twenty-One: Style adjustments for list-based widgets in the widget editor.
This change brings style consistency between front-end and widget editor for list-based widgets.

Props circlecube, Rahmohn.
Fixes #53629.


git-svn-id: https://develop.svn.wordpress.org/trunk@52237 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-23 23:23:38 +00:00
John Blackbourn
7723214065 Docs: Various docblock corrections and improvements.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52236 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-23 21:35:57 +00:00
Tonya Mork
0725caf9a0 Build/Test Tools: Fix warnings from stdClass::__invoke() callback mocks in REST API tests.
When running core tests on PHPUnit 8.x and 9.x, four non-blocking warnings were displayed for the REST API tests:

{{{
There were 4 warnings:

1) Tests_REST_Request::test_route_level_validate_callback
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.

2) Tests_REST_Request::test_route_level_validate_callback_no_parameter_callbacks
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.

3) Tests_REST_Request::test_route_level_validate_callback_is_not_executed_if_parameter_validation_fails
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.

4) Tests_REST_Server::test_callbacks_are_not_executed_if_request_validation_fails
createPartialMock called with method(s) __invoke that do not exist in stdClass. This will not be allowed in future versions of PHPUnit.
}}}

These warnings are due to the PHP native `stdClass` not having a `__invoke()` method declared.

This commit adds a `Mock_Invokable` reusable class and replaces the `stdClass` with this new class.

Follow-up to [48945], [48947].

Props sourovroy, jrf.
Fixes #53844.

git-svn-id: https://develop.svn.wordpress.org/trunk@52235 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-23 18:55:23 +00:00
Sergey Biryukov
c16bc1228c Docs: Add a @since note and description to wp_kses_attr() for new attribute-related KSES options:
* Support for an array of allowed values for attributes.
* Support for required attributes.

Follow-up to [51963].

See #54261.

git-svn-id: https://develop.svn.wordpress.org/trunk@52234 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-23 18:37:03 +00:00
John Blackbourn
7a70bc55dc Build/Test Tools: Lower the timeout for GitHub Actions jobs so runaway or stalled processes don't risk running for the default timeout duration of six hours.
See #53363


git-svn-id: https://develop.svn.wordpress.org/trunk@52233 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-23 17:40:00 +00:00
Robert Anderson
a86125d5c1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52232 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-23 05:38:45 +00:00
Sergey Biryukov
4dea8f5945 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52231 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-22 08:40:26 +00:00
Jb Audras
c7b330801d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52230 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-21 19:26:08 +00:00
Sergey Biryukov
fcbf4617f9 KSES: Use correct global in wp_kses_xml_named_entities().
This fixes a discrepancy where the the global name used in the function did not match the one declared at the beginning of `kses.php`, and ensures that the function gets the correct array of allowed XML entity names.

Includes unit tests.

Follow-up to [48072].

Props ovidiul, costdev, peterwilsoncc, SergeyBiryukov.
Fixes #54060.

git-svn-id: https://develop.svn.wordpress.org/trunk@52229 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-21 17:15:26 +00:00
Sergey Biryukov
d55cf2b71e Coding Standards: Wrap some long lines in js/_enqueues/admin/post.js per the JS coding standards for better readability.
See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@52228 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-20 02:48:08 +00:00
Sergey Biryukov
956e81c605 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52227 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-20 02:21:15 +00:00
John Blackbourn
83e5057151 Query: Correct and standardise the meta query documentation.
Also improves the formatting of some surrounding documentation.

Props audrasjb, johnbillion

Fixes #53467


git-svn-id: https://develop.svn.wordpress.org/trunk@52226 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-20 00:06:06 +00:00
Jb Audras
194e456aa4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52225 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 22:54:34 +00:00
Sergey Biryukov
afc50ca20d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52224 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 22:15:26 +00:00
Tonya Mork
3442f776f3 Comments: Fix PHP Notice "trying to get property of non-object" in comments_open() and pings_open().
The post for the comments or pings is retrieved by `get_post()`. If the post exists, `get_post()` returns an instance of `WP_Post`; else, it returns `null`.

In both `comments_open()` and `pings_open()`, the returned value from `get_post()` is used without checking if the object returned, if the post exists. When the post does not exist, the following notices occur:

{{{
PHP Notice:  Trying to get property 'comment_status' of non-object in .../src/wp-includes/comment-template.php on line 1244
}}}

and

{{{
PHP Notice:  Trying to get property 'pings_open' of non-object in ../src/wp-includes/comment-template.php on line 1274
}}}

This commit fixes these notices by checking if the post has a non-falsey value before using it as an object to set the `$open` state. As the return from `get_post()` will only be an object or `null`, the truthy check is appropriate and slightly more performant.

Tests added to validate the fix.

Follow-up to [1964], [40666].

Props dd32, audrasjb, costdev, hellofromTonya, sergeybiryukov.
Fixes #54159.

git-svn-id: https://develop.svn.wordpress.org/trunk@52223 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 20:22:43 +00:00
Jeff Ong
c99da727d9 Twenty Twenty-Two: Sync updates from GitHub.
This commit syncs several changes for the default theme from its active development repository to core. 

This is a follow up to [52081], [52107], and [52164]. It includes improvements to the home page template, adding a filter for block patterns, pre-loading the web font, improvements and bug fixes to block patterns, and more. For a full list of changes, visit e4f69d0b7e...25d74deaa5.

Props jeffpaul, richtabor, netweb, luminuu, melchoyce, beafealho, clucasrowlands, desrosj, flixos90, joen, otto42, saju4wordpress, westonruter, kjellr, poena.
See #54318.


git-svn-id: https://develop.svn.wordpress.org/trunk@52222 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 20:12:44 +00:00
Jonathan Desrosiers
2a04054c0f Bundled Themes: Update the “Tested up to” header to 5.9.
This updates the “Tested up to” header in the `readme.txt` file for all bundled theme.

This also adds the “Tested up to” header to the `style.css` file for older default themes (Twenty Twenty and earlier). Previously, this header was only recommended, so it was not included. It is now required, per the theme handbook: https://make.wordpress.org/themes/handbook/review/required/#9-files.

Props kafleg, mukesh27, ravipatel.
Fixes #53797.

git-svn-id: https://develop.svn.wordpress.org/trunk@52221 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 19:32:29 +00:00
Jonathan Desrosiers
4976a2d626 Build/Test Tools: Add the ruleset file to the cache key for PHPCS and PHP compatibility scans.
This ensures that the cache is busted properly when the ruleset is adjusted but the `composer.json` file is not.

See #54425.

git-svn-id: https://develop.svn.wordpress.org/trunk@52220 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 19:21:36 +00:00
desrosj
a478079de9 Docs: Improve the documentation for registering block patterns and block pattern categories.
This expands the `@param` tag for the property argument available for the `register()` method in `WP_Block_Patterns_Registry` and `WP_Block_Pattern_Cattegories_Registry`.

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@52219 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 19:04:01 +00:00
Tonya Mork
7ab2a96856 WPDB: Call wp_load_translations_early() in wpdb::query() and wpdb::process_fields().
For consistency and simplification, replaces the `function_exists( '__' )` checks with `wp_load_translations_early()` to make sure i18n functions are available. This change removes the extra code introduced in [52176] for using non-translated error messages when `__()` is not available.

Improves the plural versions of the error messages.

For performance, when there are more than one problem field, uses `reset()` to populate the field in the error message.

Follow-up to [52176], [52195].

Props sergeybiryukov, hellofromTonya.
Fixes #32315.

git-svn-id: https://develop.svn.wordpress.org/trunk@52218 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 18:58:14 +00:00
Jb Audras
36463dfee8 Twenty Twenty-One: Prevent notice thrown in twenty_twenty_one_get_attachment_image_attributes().
Calling `twenty_twenty_one_get_attachment_image_attributes()` was causing an `Undefined index: width|height` notice to be thrown when the result from `wp_get_attachment_metadata()` does not set any value to `$meta`. This change adds an `isset()` check to prevent it.

Props wetah, hasanuzzamanshamim.
Fixes #54464.


git-svn-id: https://develop.svn.wordpress.org/trunk@52217 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 17:54:43 +00:00
Jonathan Desrosiers
8a0db56771 Script Loader: Document path as an accepted value for $key in wp_style_add_data().
Follow up to [50836].

Props tmatsuur.
Fixes #53792.

git-svn-id: https://develop.svn.wordpress.org/trunk@52216 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 15:12:25 +00:00
Jonathan Desrosiers
d87196b560 Docs: Remove instances of the “eg.” abbreviation in favor of “example” or “for example”.
See #53330.

git-svn-id: https://develop.svn.wordpress.org/trunk@52215 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 14:42:04 +00:00
Jonathan Desrosiers
2e246c302b 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52214 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 14:18:17 +00:00
Jb Audras
48fe42e9d2 Twenty Twenty-One: Check if anchor exists before triggering in-page navigation.
This prevents JavaScript errors when using hash in URLs without matching them to any existing anchor in the page.

Props rixeo, sabernhardt, pbearne.
Fixes #53619.


git-svn-id: https://develop.svn.wordpress.org/trunk@52213 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-19 13:01:23 +00:00
Jb Audras
c08e51cc88 Docs: Add missing parameters in in_plugin_update_message-{$file} filter.
Follow-up to [51733].

Props costdev, audrasjb, SergeyBiryukov.
Fixes #40006.


git-svn-id: https://develop.svn.wordpress.org/trunk@52212 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 23:17:52 +00:00
Jonathan Desrosiers
022287380f Twenty Twenty-One: Correct description of Dark Mode in the Customizer.
The Dark Mode toggle can appear in both bottom corners. This removes “right” from the description to be accurate for both RTL and LTR languages.

Props musabshakeel, dilipbheda, sabernhardt.
Fixes #53892.

git-svn-id: https://develop.svn.wordpress.org/trunk@52211 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 20:41:21 +00:00
Jonathan Desrosiers
e7f1bda4aa Twenty Sixteen: Correctly align columns within table blocks as configured in the editor.
Previously, all columns were forced to be aligned left, and aligned right for RTL languages.

Props robertghetau, umesh84, sabernhardt.
Fixes 54317.

git-svn-id: https://develop.svn.wordpress.org/trunk@52210 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 20:20:37 +00:00
David Baumwald
321dbd8efc Toolbar: Refine "Edit site" link.php.
The 'Edit site' link was added to core in [52158], but did not include an icon and was hidden for smaller screen sizes.  This change adds the "Appearance" icon to the link and hides the link text when necessary on smaller screen sizes.

Props sabernhardt, desrosj, shaunandrews.
Fixes #54441.

git-svn-id: https://develop.svn.wordpress.org/trunk@52209 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 16:46:56 +00:00
Jb Audras
5effc56351 Docs: Add missing null allowed type for the $id parameter of wp_set_current_user().
Props andy-schmidt.
See #53399.


git-svn-id: https://develop.svn.wordpress.org/trunk@52208 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 16:02:41 +00:00
Jb Audras
c25c175b47 Posts, Post Types: Multisite: Decrement post_count option value when a post is deleted.
Previously, the `post_count` option value was not decremented when a post was deleted.

This change moves the `_update_posts_count_on_delete` action from `delete_post` hook to `after_delete_post` to ensure the deletion is taken into account.

Props henry.wright, pbearne, audrasjb.
Fixes #53443.


git-svn-id: https://develop.svn.wordpress.org/trunk@52207 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 15:10:18 +00:00
Sergey Biryukov
47d8c7313e Database: Check if the $args[0] value exists in wpdb::prepare() before accessing it.
This avoids an `Undefined array key 0` PHP warning if no values are passed to the method besides the query string.

Follow-up to [41470].

Props mjaschen.
Fixes #54453.

git-svn-id: https://develop.svn.wordpress.org/trunk@52206 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 14:35:22 +00:00
John Blackbourn
041171cf83 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


git-svn-id: https://develop.svn.wordpress.org/trunk@52205 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 13:55:36 +00:00
John Blackbourn
9932b46595 Docs: Various corrections and improvements relating to types used in inline documentation.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52204 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 13:48:43 +00:00
Jb Audras
fb23461742 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52203 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 09:23:51 +00:00
Jb Audras
d6f3d408d8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52202 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-18 00:19:32 +00:00
Jb Audras
206f8b1d95 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52201 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 23:06:06 +00:00
Joe Dolson
59311a53d2 Comments: Change new comment required text class.
Change the new class on comment required text from `comment-required-message` to `required-field-message` for better future-compatibility, enabling better reuse.

Props sabernhardt.
Fixes #16206.


git-svn-id: https://develop.svn.wordpress.org/trunk@52200 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 18:36:53 +00:00
Tonya Mork
902fd83cf4 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. 

git-svn-id: https://develop.svn.wordpress.org/trunk@52199 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 17:43:41 +00:00
Joe Dolson
11e1a295b6 Toolbar: Prevent adminbar from hiding in-page anchors.
Use scroll-padding-top to offset scroll position on in-page anchors when adminbar is active. Also adjusts existing scroll padding for core themes that implement it.

Props afercia, kingkero, audrasjb, dufresnesteven, thimalw, sabernhardt, costdev.
Fixes #46371.


git-svn-id: https://develop.svn.wordpress.org/trunk@52198 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 17:18:09 +00:00
Jb Audras
5036d60706 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52197 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 16:22:19 +00:00
Joe Dolson
8cc2cd4a7d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@52196 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 15:54:40 +00:00
Sergey Biryukov
d772a0407e WPDB: Call wp_load_translations_early() in wpdb::_real_escape().
This follows the pattern used in other `wpdb` methods to make sure the i18n functions are available.

Follow-up to [29840].

Props nacin, johnbillion.
See #32315.

git-svn-id: https://develop.svn.wordpress.org/trunk@52195 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-17 04:03:25 +00:00