45148 Commits

Author SHA1 Message Date
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
Jonathan Desrosiers
2ee9a3ff25 Bundled Themes: Reverts [52549].
[52549] updated some default presets in use by default themes to the new format. However, this change would cause elements to lose their styling when active on an older version of WordPress.

See #54782.

git-svn-id: https://develop.svn.wordpress.org/trunk@52615 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 19:50:56 +00:00
Jonathan Desrosiers
347cd20937 Twenty Twenty-Two: Re-add the link to the theme’s HelpHub changelog.
See #54318.

git-svn-id: https://develop.svn.wordpress.org/trunk@52613 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 19:40:15 +00:00
Jeff Ong
ca8898d2e7 Twenty Twenty-Two: update the required version.
This commit updates the required WordPress version of the 2022 default theme to 5.9 in advance of its release on January 25.

Props hellofromtonya, kjellr, desrosj.
See #54318.


git-svn-id: https://develop.svn.wordpress.org/trunk@52612 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 19:03:54 +00:00
Sergey Biryukov
f09c56bfd3 Date/Time: Add a unit test for the return type of current_datetime().
Follow-up to [45883].

Props pbearne.
Fixes #53484.

git-svn-id: https://develop.svn.wordpress.org/trunk@52611 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-21 05:58:13 +00:00
Jb Audras
8db1549c0f Docs: Replace "Current theme" with "Active theme" in various DocBlocks.
This change replaces "Current theme" with "Active theme" in various DocBlocks for better consistency with user-facing strings.

Follow-up to [52580].

Props Presskopp, audrasjb, costdev.
Fixes #54831.
See #54770.


git-svn-id: https://develop.svn.wordpress.org/trunk@52610 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-20 23:51:22 +00:00
Sergey Biryukov
7ca1a2a0d7 General: Clarify the deprecation messages in the _deprecated_*() functions family.
This makes the strings easier to translate and provides more details about what exactly is deprecated: a PHP function, a file name, or a WordPress hook.

The changes apply to:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `_doing_it_wrong()`

Follow-up to [6514], [7884], [12536], [12584], [16939], [16942], [16945], [24439], [24723], [32989], [37861], [39315].

Props mukesh27, audrasjb, SergeyBiryukov.
Fixes #54658.

git-svn-id: https://develop.svn.wordpress.org/trunk@52609 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-20 13:11:04 +00:00
Jb Audras
26bb9fde3d Administration: Properly handle HTML entities in the News & Events dashboard widget.
This change adds support for various HTML entities in the News & Events dashboard widget.

Props nickciske, kpegoraro, iandunn, shedonist, sayedulsayem, sabernhardt, audrasjb, SergeyBiryukov, ocean90.
Fixes #41208.


git-svn-id: https://develop.svn.wordpress.org/trunk@52608 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-20 09:17:43 +00:00
Sergey Biryukov
4f5fd9e5d2 Users: Revert the variable change in [52606] that caused the tests to fail.
Follow-up to [52604-52606].

Props audrasjb.
See #54690.

git-svn-id: https://develop.svn.wordpress.org/trunk@52607 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-19 13:37:58 +00:00
Sergey Biryukov
cc1b2515d7 Docs: Further update the send_retrieve_password_email filter documentation for consistency.
Follow-up to [52604], [52605].

See #54690.

git-svn-id: https://develop.svn.wordpress.org/trunk@52606 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-19 13:16:44 +00:00
Jb Audras
2db35e5674 Docs: Docblocks consistency fixes after [52604].
Follow-up to [52604].

Fixes #54690.


git-svn-id: https://develop.svn.wordpress.org/trunk@52605 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-19 12:40:57 +00:00
Jb Audras
f53f2960f8 Users: Add new hooks to filter retrieve password emails.
This change introduces two new hooks to help developers to filter retrieve password emails:

- `send_retrieve_password_email` can be used to filter whether to send the retrieve password email;
- `retrieve_password_notification_email` can be used to filter the contents of the reset password notification email sent to the user.

This changesets also adds unit tests for these new filters.

Props connapptivity, costdev, audrasjb, johnbillion.
Fixes #54690.


git-svn-id: https://develop.svn.wordpress.org/trunk@52604 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-19 12:15:13 +00:00
Sergey Biryukov
d0d4833909 I18N: Improve the context for color-related strings in WP_Theme::translate_header().
* Use the `color scheme` context for the "Light" string, for more accuracy.
* Add the same context to the "Dark" string too, for consistency.

Follow-up to [37946], [52588].

Fixes #54804.

git-svn-id: https://develop.svn.wordpress.org/trunk@52603 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-19 10:33:55 +00:00
Peter Wilson
fc6ae7b5f6 Script loader: Prevent DB errors during Multisite install.
Prevent the script loader from attempting to create nonces during the installation process for Multisite configurations.

Prior to this fix, multiple "Table does not exist" errors were thrown during installation if `MULTISITE` was defined in the `wp-config.php` file but the salt constants were not defined. Without the salts defined in PHP, WP was attempting to use the database fallbacks prior to table creation.

Props schlessera, johnbillion, hellofromTonya, audrasjb, costdev.
Fixes #54800.



git-svn-id: https://develop.svn.wordpress.org/trunk@52602 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 23:45:40 +00:00
Tonya Mork
196361bae5 Editor: @wordpress package updates.
Update packages to include these bug fixes from Gutenberg:

* Navigation Block: update micromodal to `0.4.10` to fix menu close button on mobile

Props ryelle, poena, get_dave, talldanwp, aristath, kjellr, audrasjb, desrosj.
See #54487.

git-svn-id: https://develop.svn.wordpress.org/trunk@52598 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-18 21:32:03 +00:00