45162 Commits

Author SHA1 Message Date
Sergey Biryukov
97830c4093 Coding Standards: Use strict comparison in wp-admin/user-edit.php.
Follow-up to [2872], [13941], [12722], [14043], [14802], [23364], [42688].

Props azouamauriac.
See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52687 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-07 14:45:11 +00:00
Jb Audras
f9f66ac6b8 Twenty Twenty-Two: Restore custom padding for group blocks with a background color.
This change partially reverts [52679] which accidentally removed custom padding for group blocks with a background color.

Follow-up to [52679].

Props kjellr.
Fixes #55103.
See #54944.


git-svn-id: https://develop.svn.wordpress.org/trunk@52686 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-07 14:37:13 +00:00
Sergey Biryukov
da774e124b Coding Standards: Rename $r variable to $args for clarity in walk_page_tree().
Follow-up to [9830], [32617], [45667], [52684].

See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52685 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-07 14:19:31 +00:00
Sergey Biryukov
620b7ecf3d Coding Standards: Rename $r variable to $args for clarity in walk_nav_menu_tree().
Follow-up to [14248], [32612], [45667].

Props uzumymw.
See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52684 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-07 13:59:19 +00:00
Sergey Biryukov
371966a187 Tests: Rename the test file and class for wp_get_global_stylesheet() tests.
This matches the name of the function being tested.

Follow-up to [52675-52677].

See #54782.

git-svn-id: https://develop.svn.wordpress.org/trunk@52682 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-05 13:19:53 +00:00
Jb Audras
784367f816 Twenty Twenty-Two: Fix headings consistency in Pricing table pattern.
This change fixes a consistency issue where "Pigeon" was a h3, while "Sparrow" and "Falcon" were h2. Let's treat these birds equally 🐦

Props kjellr, jffng.
Fixes #54929.


git-svn-id: https://develop.svn.wordpress.org/trunk@52681 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-05 07:58:25 +00:00
Jb Audras
edcfb250d3 Docs: Typo corrections in various API docblocks.
Props hasanuzzamanshamim.
Fixes #55073.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@52680 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 16:26:12 +00:00
Jb Audras
8e781952c7 Twenty Twenty-Two: Remove negative side margins on group blocks with a background.
This change fixes an issue where applying a background color to a group block aligned it to the left in the editor.

Props eddystile, audrasjb, webmandesign, sabernhardt, petaryoast.
Fixes #54944.


git-svn-id: https://develop.svn.wordpress.org/trunk@52679 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 15:14:20 +00:00
Sergey Biryukov
38b5c686a1 Tests: Use more appropriate assertions in wp_get_global_stylesheet() tests.
This replaces instances of `assertTrue( str_contains( ... ) )` with `assertStringContainsString()` to use native PHPUnit functionality.

Follow-up to [52675], [52676].

See #54782.

git-svn-id: https://develop.svn.wordpress.org/trunk@52677 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 14:33:33 +00:00
Sergey Biryukov
c6c3d9b928 Coding Standards: Use strict type check for in_array() in wp_get_global_stylesheet().
Use multi-line comment syntax for some comments, per the documentation standards.

Follow-up to [52675].

See #54782.

git-svn-id: https://develop.svn.wordpress.org/trunk@52676 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 14:17:36 +00:00
Jorge Costa
b7aa3a09bc Fix: Classic themes using default presets are not working.
This commit makes the presets provided by the theme via add_theme_support always create CSS Custom Properties, whether or not the theme has a theme.json file. This way, if the overwrites a core preset, the core CSS variables are also overwritten and use the theme value.

Props oandregal, hellofromTonya, desrosj, costdev, pbearne, johnstonphilip, webmandesign.
Fixes #54782.

git-svn-id: https://develop.svn.wordpress.org/trunk@52675 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 13:50:34 +00:00
Jb Audras
f9f27c5716 Toolbar: Don't hide admin bar text labels from screen readers on small screens.
This change replaces `display: none` with `screen-reader-text` styles so the text labels are available for screen readers on small screens.

Props legendusmaximus, sabernhardt, konradyoast.
Fixes #54895.


git-svn-id: https://develop.svn.wordpress.org/trunk@52674 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 12:54:26 +00:00
Marius L. J
831dae4296 External libraries: Update version string for hoverIntent.
Updating the version string will help invalidate caches, ensuring the new version of the library is loaded where applicable.

Follow-up to [52429].

Props david.binda.
Fixes #54904.

git-svn-id: https://develop.svn.wordpress.org/trunk@52673 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 10:50:39 +00:00
Joe Dolson
26722b7762 Comments: Only render term update notices on term screens.
Prevent blank notices from appearing when adding custom fields or terms in the post editor.

Props gadhiyaravi, Boniu91, ravipatel, sabernhardt.
Fixes #54955. See #42937.


git-svn-id: https://develop.svn.wordpress.org/trunk@52672 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 01:20:30 +00:00
Joe Dolson
8009f552a2 Comments: Verify 'mirroring' property exists in media views.
Checks that the media collection has a mirroring property before accessing the property in media views.

Props MMDeveloper, mukesh27.
Fixes #53856.


git-svn-id: https://develop.svn.wordpress.org/trunk@52671 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-04 00:58:13 +00:00
Sergey Biryukov
1712bfcf79 Docs: Fix typo in the is_post_status_viewable() function description.
Follow-up to [50130].

Props rafiahmedd.
Fixes #55068.

git-svn-id: https://develop.svn.wordpress.org/trunk@52670 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-03 21:23:22 +00:00
Jonny Harris
acfcea4cba Taxonomy: Remove cache expiry limitation in WP_Term_Query.
Remove the one day expiry limitation from query caches found in the `WP_Term_Qurery` class. Removing this limitation means that the caches will remain in object caching, as long as possible. Ensure that all term / taxonomy cache clear functions invalidate query caches, by deleting the last_changed value in the terms cache group. 

Props spacedmonkey, adamsilverstein, boonebgorges, tillkruess, dlh, flixos90.
Fixes #54511.


git-svn-id: https://develop.svn.wordpress.org/trunk@52669 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-03 17:41:46 +00:00
Jb Audras
14e20f72b5 Editor: Remove standard post type UI for templates and template parts.
In [52158] the standard post type UI was added back for templates and template parts, because these features had been temporarily removed from the site editor in the rush to get 5.9 ready for December. Since 5.9 these features were properly added back to the site editor, the `show_ui` values for these post types should be returned back to `false`.

Follow-up to [52158].

Props manfcarlo, audrasjb.
Fixes #54908.


git-svn-id: https://develop.svn.wordpress.org/trunk@52668 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-03 09:01:10 +00:00
Jb Audras
f8148ca4f4 Twenty Twenty-Two: Make 404 pattern search label and button translatable.
This changes makes the Twenty Twenty-Two "hidden-404" pattern fully prepared for translation.

Props kjellr, walbo.
Fixes #54928.


git-svn-id: https://develop.svn.wordpress.org/trunk@52664 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-02 23:41:19 +00:00
Peter Wilson
50e2499c2c Upgrade: Add follow up ticket ID to upgrade_590() comment.
Follow up to [52656].

Props audrasjb.
See #54906.


git-svn-id: https://develop.svn.wordpress.org/trunk@52662 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-02 23:20:29 +00:00
Sergey Biryukov
63c7374827 Twenty Twenty: Add Noto Serif as a fallback font before Garamond.
This aims to provide better experience on Chromebooks. Noto Serif is also the fallback font for Android devices.

Follow-up to [46271].

Props sabernhardt, nmschaller.
Fixes #50723.

git-svn-id: https://develop.svn.wordpress.org/trunk@52661 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-02 15:11:46 +00:00
David Baumwald
3707a6ca5c Options, Meta APIs: Correct some inline docs for update_post_meta and delete_post_meta.
In `update_post_meta` and `delete_post_meta`, code was added to fetch the parent post if these functions were called for a revision post ID.  In [9252], the code was apparently copied from `add_post_meta`, and the inline comment describing the new block of code was not updated to mention either "updated" or "deleted" respectively.  This change corrects the comment in both functions to reflect the current action instead of "added".

Props thelovekesh, rehanali.
Fixes #54835.

git-svn-id: https://develop.svn.wordpress.org/trunk@52660 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 17:10:48 +00:00
Sergey Biryukov
174b25846f General: Remove inaccurate reference to the link_updated field from the wp_insert_link() DocBlock.
The `link_updated` field is unused as of WordPress 3.0 and was never updated via `wp_insert_link()`, only via the `wp-admin/update-links.php` file removed in [13744].

Follow-up to [13744], [49487].

Props dshanske, dharm1025, SergeyBiryukov.
Fixes #54880.

git-svn-id: https://develop.svn.wordpress.org/trunk@52659 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 12:28:28 +00:00
Jb Audras
4f5a85015c Twenty Twenty-One: Replace GitHub with .org link in Theme URI.
Theme URI is the URL of a public web page where users can find more information about the theme. For bundled themes, it should be a link to the theme’s page on the Theme Repository.

Props kafleg.
Fixes #55018.


git-svn-id: https://develop.svn.wordpress.org/trunk@52658 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 10:29:51 +00:00
Marius L. J
f2e08d36af External libraries: Update jQuery Color to 2.2.0
The NPM package for jQuery Color was updated in [50543], but a bundled version still existed within core.
This removes that bundled version, in favor of expanding the Grunt build steps to include the package from NPM instead.

Fixes #55016. See #51405.

git-svn-id: https://develop.svn.wordpress.org/trunk@52657 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 01:20:19 +00:00
Peter Wilson
9e03599af8 Upgrade: Prevent warnings upgrading cron array.
An unvisited site may have an undefined cron array, resulting in `_get_cron_array()` returning the value `false`. Previously this would trigger warning in `upgrade_590()` as the function assumed `_get_cron_array()` would alway return an array.

No database version change is required as the upgrade routine was successful on sites with a cron array during 5.9.0. On sites without a cron array, the error has already been thrown if they are running db version 51917. This fix is only required for new sites or those upgrading that have skipped 5.9.0.

Follow up to [51917].

Props chrisvanpatten, kapilpaul, SergeyBiryukov.
Fixes #54906.
See #53940.


git-svn-id: https://develop.svn.wordpress.org/trunk@52656 602fd350-edb4-49c9-b593-d223f7449a82
2022-02-01 00:12:33 +00:00
Sergey Biryukov
2bbe1b7f40 Docs: Add a comment to clarify the username_exists() check in wpmu_validate_blog_signup().
Creating a new site that matches an existing user's login name is not allowed, unless it's the user's own username.

Follow-up to [https://mu.trac.wordpress.org/changeset/550 mu:550], [https://mu.trac.wordpress.org/changeset/1364 mu:1364].

Props henry.wright, joyously, swissspidy, SergeyBiryukov.
Fixes #54326.

git-svn-id: https://develop.svn.wordpress.org/trunk@52655 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-31 13:05:22 +00:00
John Blackbourn
24b83dd431 Build/Test Tools: Switch to some more appropriate assertions.
See #54725


git-svn-id: https://develop.svn.wordpress.org/trunk@52654 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-30 19:40:57 +00:00
John Blackbourn
ffd612760b Role/Capability: Correct the documented accepted types for the capability argument of WP_User_Query.
See #16841, #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@52653 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-30 19:32:08 +00:00
John Blackbourn
3fdce9eb4b Docs: Increase the specificity of types in various inline documentation.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@52652 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-30 19:23:25 +00:00
SergeyBiryukov
a88723499c Twenty Twenty-Two: Optimize the assets/images/ducks.jpg image.
The new file should have a much better balance of quality and file size.

Follow-up to [52081], [52107].

Props kafleg, kjellr, jffng, kapilpaul.
Fixes #54911.

git-svn-id: https://develop.svn.wordpress.org/trunk@52651 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-30 11:54:01 +00:00
Sergey Biryukov
0fd2e294be Users: Return a WP_Error from wp_insert_user() if the user_url field is too long.
The `user_url` database field only allows up to 100 characters, and if the value is longer than that, the function should return a proper error message instead of silently failing.

This complements similar checks for `user_login` and `user_nicename` fields.

Follow-up to [45], [1575], [32299], [34218], [34626].

Props mkox, sabernhardt, tszming, SergeyBiryukov.
Fixes #44107.

git-svn-id: https://develop.svn.wordpress.org/trunk@52650 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-29 14:23:59 +00:00
Jb Audras
1bf3a87e2b Administration: Add a top margin to Mail Server Port field on small screens.
This change fixes an overlapping issue on small screens in the Writing Settings screen.

Props pravinparmar2404, afercia, utz119, thimalw, sabernhardt, audrasjb.
Fixes #50177.


git-svn-id: https://develop.svn.wordpress.org/trunk@52649 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-28 21:48:08 +00:00
Marius L. J
d6e710330f External libraries: Update jQuery UI to 1.13.1
Some regressions happened alongside the release of jQuery UI 1.13.0, this brings the fixes from 1.13.1 downstream to WordPress, notably relating to Widget, Autocomplete, Sortable, and Tooltip modules.

See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1

Props blogaid, linux4me2, mgol.
Fixes #54902.

git-svn-id: https://develop.svn.wordpress.org/trunk@52648 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-28 16:42:47 +00:00
Sergey Biryukov
185bc1242d Themes: Correct the width of theme preview on Add Themes screen.
This ensures that the preview ratio remains accurate for the user's screen size when the sidebar is open.

Follow-up to [19995], [20110], [20133], [20138], [28033].

Props shreyasikhar26, costdev, sumitsingh, SergeyBiryukov.
Fixes #54764.

git-svn-id: https://develop.svn.wordpress.org/trunk@52647 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-28 12:08:08 +00:00
Jb Audras
3cab15be94 Media: Remove target blank attribute from media uploader edit links.
This change removes a dispensable target blank attribute from Edit links displayed in the asynchronous file uploader.

Follow-up to [22755].

Props kebbet, SergeyBiryukov.
Fixes #54945.
See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@52646 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-27 22:16:00 +00:00
Jb Audras
1356b77f56 Docs: Fix incorrect type in translations_api and translations_api_result docblocks.
Before this changeset, `translation_api` and `translation_api_result` filters were incorrectly marked as taking object as their first argument. The correct type is an array as `json_decode()` is asked to return an associative array.

Props volodymyrkolesnykov.
Fixes #54959.


git-svn-id: https://develop.svn.wordpress.org/trunk@52645 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-27 21:13:09 +00:00
Sergey Biryukov
0ee45ae917 Upgrade/Install: Make sure the "Show hidden updates" button is visible and works as expected.
The [https://api.jquery.com/toggle-event/ .toggle( handler, handler )] method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9. 

This commit updates the click handler function to work with jQuery 1.9+.

Follow-up to [9441], [9543], [42785], [48323].

Props malinevskiy, SergeyBiryukov.
Fixes #54886.

git-svn-id: https://develop.svn.wordpress.org/trunk@52644 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-26 13:09:52 +00:00
Sergey Biryukov
2d707c4512 Docs: Update spelling for inline comments in a few files.
Per the [https://make.wordpress.org/core/handbook/best-practices/spelling/ spelling] and [https://make.wordpress.org/docs/style-guide/language-grammar/word-choice/ word choice] documentation guidelines, American (US) spelling should be preferred.

Props mohadeseghasemi, subrataemfluence, rehanali, SergeyBiryukov.
Fixes #46837.

git-svn-id: https://develop.svn.wordpress.org/trunk@52640 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-25 13:54:01 +00:00
Sergey Biryukov
f745cc551b Docs: Correct @global tag in wp_kses_xml_named_entities().
This updates the variable name in the DocBlock to the correct one.

Follow-up to [48072], [52229].

Props david.binda.
Fixes #54899.

git-svn-id: https://develop.svn.wordpress.org/trunk@52639 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-25 11:14:15 +00:00
David Baumwald
14e529a1e3 Upgrade/Install: Update $_old_files for 5.9.
Props SergeyBiryukov, davidbaumwald.
Fixes #54894.

git-svn-id: https://develop.svn.wordpress.org/trunk@52637 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 18:23:00 +00:00
desrosj
e3082c092e Editor: Bump editor packages to include the latest fixes.
This merges the latest package updates for the block editor to include the fix for https://github.com/WordPress/gutenberg/pull/38175.

Props hellofromTonya, mamaduka, joen, talldanwp, cbravobernal, poena.
Fixes #54487.

git-svn-id: https://develop.svn.wordpress.org/trunk@52633 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 15:55:02 +00:00
Jb Audras
afcad3c28d Docs: Docblock corrections for get_block_file_template().
Follow-up to [52324].

Props johnbillion, SergeyBiryukov, costdev.
Fixes #54879.


git-svn-id: https://develop.svn.wordpress.org/trunk@52631 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 15:26:56 +00:00
Dominik Schilling
4101f1f7eb Plugins/Themes: Allow to install/activate plugins/themes which require the WordPress version currently in development.
Twenty Twenty-Two requires WordPress 5.9 but currently can't be (re)activated in the 5.9 branch because `version_compare( '5.9-RC3-52627', '5.9', '>=' )` as used by `is_wp_version_compatible()` returns `false`. To appreciate the testing of upcoming versions any `-alpha`, `-RC`, `-beta` suffixes are now stripped off from the WordPress version before checking for compatibility.

Fixes #54882.

git-svn-id: https://develop.svn.wordpress.org/trunk@52628 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 10:39:50 +00:00
Peter Wilson
60a085a078 Help/About: Update Freedoms page for 5.9.
Fixes #54270.



git-svn-id: https://develop.svn.wordpress.org/trunk@52626 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 09:39:53 +00:00
Robert Anderson
35e0864e68 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Block Editor: Mark last change as persistent on save
- Site Editor: Restore ?styles=open functionality
- Site Editor: Fix resizable box scrollbars in blocks
- Add classic menus to menu switcher

See #54487.
Props talldanwp.


git-svn-id: https://develop.svn.wordpress.org/trunk@52624 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 07:44:37 +00:00
Robert Anderson
aba29c2421 Customizer: Remove Widgets panel when a theme does not support widgets
By setting 'theme_supports' on the panel, we ensure that the Widgets panel is
removed if a theme does not have support for 'widgets'.

This makes the behaviour of the Widgets and Menus panels consistent.

Follows [52621].
See #54888.
Props hellofromTonya, costdev, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@52622 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 05:35:11 +00:00
Robert Anderson
141815988a Customizer: Remove Menus panel when a theme does not support menus
By overriding check_capabilities(), we can ensure that the Menus panel
is removed if a theme does not have support for 'menus' nor 'widgets'.

This ensures that the Menus panel does not appear when using a block
theme, which is confusing to users.

See #54888.
Props hellofromTonya, costdev, peterwilsoncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@52621 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-24 05:32:28 +00:00
Sergey Biryukov
1283afc6f7 Coding Standards: Use a more appropriate variable name in link_advanced_meta_box().
Follow-up to [45667].

Props mkox, SergeyBiryukov.
Fixes #54856.

git-svn-id: https://develop.svn.wordpress.org/trunk@52620 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-23 09:01:17 +00:00
Jonathan Desrosiers
a7a5bf1910 Bundled Themes: Bump the versions for bundled themes for release.
This bumps the versions of the default bundled themes in preparation for release with WordPress 5.9.

The new versions are:
- Twenty Ten: 3.6
- Twenty Eleven: 4.0
- Twenty Twelve: 3.6
- Twenty Thirteen: 3.5
- Twenty Fourteen: 3.3
- Twenty Fifteen: 3.1
- Twenty Sixteen: 2.6
- Twenty Seventeen: 2.9
- Twenty Nineteen: 2.2
- Twenty Twenty: 1.9
- Twenty Twenty-One: 1.5

Props audrasjb.
Fixes #54783.

git-svn-id: https://develop.svn.wordpress.org/trunk@52618 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-22 14:06:00 +00:00