43729 Commits

Author SHA1 Message Date
Aaron Jorbin
62d35aae07 Boostrap/Load: Strengthen language in wp-config-sample.php
Make it clearer where custom pieces belong in wp-config.php

Props kraftbj, jorbin.
Fixes #37199.



git-svn-id: https://develop.svn.wordpress.org/trunk@50915 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-14 19:33:05 +00:00
Aaron Jorbin
dc1d54ae3a Bootstrap/Load: Improve docs for error reporting
Make it clearer that wp_debug_mode will change this based on the WP_DEBUG constant and also make it clearer where this list comes from.

Props sasagar, schlessera, jorbin.
Fixes #41902.



git-svn-id: https://develop.svn.wordpress.org/trunk@50914 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-14 19:26:09 +00:00
Sergey Biryukov
6768039f21 Docs: Update documentation in phpunit/includes/abstract-testcase.php per the documentation standards.
Follow-up to [44902].

See #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50913 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-14 19:07:47 +00:00
Sergey Biryukov
5d34fc734d Docs: Clarify the @since note for unlink-homepage-logo in get_custom_logo().
This should make it clearer that the value applies to the `custom-logo` theme feature.

Follow-up to [48039], [48283], [48749], [48757], [48758], [48832].

Props joyously.
See #51075, #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50912 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-13 12:52:46 +00:00
Kelly Choyce-Dwan
57e78f709b Toolbar: Reset box-shadow on links.
This prevents any theme-added `box-shadow` styles from applying to the toolbar items.

Props sabernhardt, florianbrinkmann.
Fixes #40594.



git-svn-id: https://develop.svn.wordpress.org/trunk@50847 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-12 21:20:32 +00:00
Kelly Choyce-Dwan
4e4b37ebcb Login, Users: Use a monospace font to display passwords.
When typing a password, the input field should use a monospace font. It's easier to distinguish letters in monospace fonts, which makes it easier to accurately read passwords.

Props robdxw, utz119, hedgefield, hareesh-pillai.
Fixes #40275.



git-svn-id: https://develop.svn.wordpress.org/trunk@50846 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-12 19:57:16 +00:00
Marius L. J
4258ff74f9 Site Health: Remove status text indentation.
This removes the left-side margin from the status text in the Site Health dashboard widget, which caused the text to be slightly indented, and not centered under the status indicator circle.

Follow-up to [50833].

See #52966.

git-svn-id: https://develop.svn.wordpress.org/trunk@50845 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-12 14:19:17 +00:00
Sergey Biryukov
1ede4de4a3 Post Thumbnails: Display the "Remove featured image" link in the classic editor in red color.
This matches the color of the "Move to Trash" link and other similar links for destructive actions in the admin.

Props monikarao, hareesh-pillai, sabernhardt, hellofromTonya.
Fixes #45198.

git-svn-id: https://develop.svn.wordpress.org/trunk@50844 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-12 10:12:49 +00:00
Jonathan Desrosiers
9cda2c28e3 Build/Test Tools: Update the several dependencies.
This updates the following dependencies:

- `grunt` from `1.3.0` to `1.4.0`.
- `grunt-legacy-util` from `2.0.0` to `2.0.1`.
- `sass` from `1.32.11` to `1.32.12`.
- `sinon-test` from `3.0.0` to `3.1.0`.
- `uglify-js` from `3.13.4` to `3.13.6`.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50843 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 20:10:27 +00:00
Jonathan Desrosiers
6d5fbf96a6 External Libraries: Update the Requests library to version 1.8.0.
While some of the changes in the `1.8.0` release have already been copied to WordPress Core in earlier releases (see [38727], [46258], [47902] and [49382]), this release contains additional improvements, including:

- A significant performance fix when using cURL.
- Improved compliance with RFC2616.

The library has also been moved under the WordPress project’s GitHub organization and can now be found at https://github.com/WordPress/Requests.

Props jrf, dd32, rmccue, justinahinon, netweb, schlessera, TimothyBJacobs, soulseekah, ozh, skithund, carlalexander, travisnorthcutt, desrosj.
Fixes #53101.

git-svn-id: https://develop.svn.wordpress.org/trunk@50842 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 19:40:41 +00:00
David Baumwald
a035830160 Bundled Theme: Update twenty_twenty_one_password_form function to actually use a $post parameter.
The `twentytwentyone` filtered `the_password_form` with a `twenty_twenty_one_password_form` callback that, by default, passed only one parameter that was assumed to be the post or post ID.  However, the first parameter for `the_password_form` is the filtered output value.  This fix updates both the filter reference and callback to use two parameters: `$output` and `$post`. 

Props burhandodhy, mukesh27.
Fixes #53091.

git-svn-id: https://develop.svn.wordpress.org/trunk@50841 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 18:24:38 +00:00
David Baumwald
be105fd0f5 Docs: Update help key documentation link in REST API response.
Props dd32, mukesh27, audrasjb, SergeyBiryukov.
Fixes #53162.

git-svn-id: https://develop.svn.wordpress.org/trunk@50840 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 18:03:37 +00:00
Sergey Biryukov
127da0ecae Coding Standards: Adds spacing so define() statements displayed when creating a network.
This ensures that the code intended to be copied to `wp-config.php` conforms to WordPress Coding Standards.

Props paulschreiber, johnjamesjacoby.
Fixes #53182.

git-svn-id: https://develop.svn.wordpress.org/trunk@50839 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 17:08:45 +00:00
Sergey Biryukov
bab911f0d7 Editor: Some documentation and test improvements for loading separate assets for core blocks:
* Move `should_load_separate_core_block_assets()` to a more appropriate place.
* Update DocBlocks and inline comments per the documentation standards.
* Document the `$wp_styles` global in `wp_maybe_inline_styles()`.
* List the expected result first in unit test assertions.
* Remove a duplicate unit test.
* Add missing `@covers` tags.

Follow-up to [50836], [50837].

See #50328, #52620, #53180.

git-svn-id: https://develop.svn.wordpress.org/trunk@50838 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 16:26:28 +00:00
Greg Ziółkowski
7f01308436 Editor: Fix regression introduced with loading separate block assets
Related to [50836]. load-styles.php doesn't load the should_load_separate_core_block_assets function and that causes an error 500 - which in turn makes the dashboard appear unstyled.

Props aristath.
Fixes #53180.




git-svn-id: https://develop.svn.wordpress.org/trunk@50837 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 14:14:15 +00:00
Greg Ziółkowski
d5f900c3df Editor: Enqueue script and style assets only for blocks present on the page
Adds styles for individual core blocks to make it possible to render only styles for those blocks that are rendered on the page (frontend). This is optinal functionality for start that can be controlled with the new `separate_core_block_assets` filter.

In addition to that, styles can be inlined when `path` is passed when registering an individual styles. This functionality can be changed with the new `styles_inline_size_limit` filter. The maximum size of inlined styles in bytes defaults to 20 000.

Props aristath, aduth, westonruter, mcsf.
Fixes #50328, #52620.



git-svn-id: https://develop.svn.wordpress.org/trunk@50836 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-11 09:41:48 +00:00
Jonathan Desrosiers
2ac7f39570 Posts, Post Types: Enable revisions for the wp_block post type.
This allows site owners to take advantage of revisions while broader improvements to block management and reusable blocks are explored.

Props matveb, audrasjb, desrosj.
Fixes #53072.

git-svn-id: https://develop.svn.wordpress.org/trunk@50835 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-10 18:37:36 +00:00
Jonathan Desrosiers
6db619b7d6 Network and Sites: Display site icons in the My Sites menu.
This updates the My Sites dropdown menu on multisite installs to display the site icon for each site. When a site icon is not selected, the default WordPress logo will continue showing.

Props rmccue, joemcgill, afercia, audrasjb, desrosj.
Fixes 46657.

git-svn-id: https://develop.svn.wordpress.org/trunk@50834 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-10 18:22:56 +00:00
Sergey Biryukov
2b2f309d6f Site Health: Improve the appearance of Site Health Status dashboard widget.
This better utilizes the available screen space on wider screens.

Props mblach, hedgefield, Clorith.
Fixes #52966.

git-svn-id: https://develop.svn.wordpress.org/trunk@50833 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-10 14:54:57 +00:00
Sergey Biryukov
180e7a2721 Coding Standards: Use strict comparison in wp-admin/includes/screen.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50832 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-09 20:25:41 +00:00
Sergey Biryukov
f8a5eb35e1 Docs: Correct @since tags for new properties and functions related to infinite scrolling in Media Library.
Follow-up to [50829].

See #50105, #40330, #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50831 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-08 11:20:02 +00:00
Joe Dolson
89989405ae Permalinks: Add labels for permalink configuration fields.
If the current server configuration doesn't allow WordPress to edit permalink settings, the textarea with new rules to use was not labeled. Add labels and aria-describedby pointing to the field description.
 
Props sabernhardt
Fixes #53142.

git-svn-id: https://develop.svn.wordpress.org/trunk@50830 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 23:49:15 +00:00
Joe Dolson
85f53ca0a6 Media: Remove infinite scroll from media library and modal.
Replace infinitely autoloading behavior on scroll with a user-controlled load more button. Fix a long standing accessibility issue in the media library. Infinite scroll poses a wide range of problems for accessibility, usability, and performance.

This change modifies the library to load 40 items in the initial view, with a load more button to load the next 40 items and a button to move focus from the load more region to the first of the most recently added items.

The text for communicating the jump target was broadly discussed, agreeing that the text incorporated here would most concisely and clearly convey the purpose of the button, and any further detail is learnable from use.
 
Props afercia, adamsilverstein, joedolson, audrasjb, francina 
Fixes #50105. See #40330. 

git-svn-id: https://develop.svn.wordpress.org/trunk@50829 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 23:17:33 +00:00
John Blackbourn
0a3a3c5119 Docs: Miscellaneous docblock updates.
See #52628


git-svn-id: https://develop.svn.wordpress.org/trunk@50828 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 20:14:22 +00:00
Jonathan Desrosiers
d5407ec719 Docs: Use correct @since tag notation.
This corrects the version number specified by the `@since` tag for the `delete_theme` and `deleted_theme` action hooks introduced in [50826] to contain a full, 3 digit version.

Props ocean90.
See #16401.

git-svn-id: https://develop.svn.wordpress.org/trunk@50827 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 18:24:23 +00:00
Jonathan Desrosiers
d6a37f9046 Themes: Introduce the delete_theme and deleted_theme action hooks.
This change introduces the `delete_theme` and `deleted_theme` action hooks, which fire immediately before and after an attempt to delete a theme, respectively.

Props scottconnerly, ptahdunbar, pbiron, vetyst, desrosj.
Fixes #16401.

git-svn-id: https://develop.svn.wordpress.org/trunk@50826 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 16:08:42 +00:00
Sergey Biryukov
35c1cdee74 Plugins: Escape the currently installed version number on Add Plugins screen.
The number is displayed in the plugin details modal if a newer version is already installed.

Props m0ze, bmcculley, ayeshrajans.
Fixes #53020.

git-svn-id: https://develop.svn.wordpress.org/trunk@50825 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 13:48:12 +00:00
Greg Ziółkowski
154c0800e3 Editor: Update WordPress packages from Gutenberg 10.5
Applies changes between the Gutenberg plugin v10.4 and v10.5. It contains the latest version of WordPress packages and PHP changes applied to non-experimental features.

Props youknowriad.
See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50824 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 11:46:32 +00:00
Sergey Biryukov
524f2b1f23 Docs: Correct the aria-current array key in the documentation for two widget filters.
This applies to `nav_menu_link_attributes` and `page_menu_link_attributes` filters.

Follow-up to [42808], [44416].

Props jnylen0, chetan200891, alexstine.
See #43522, #52628.

git-svn-id: https://develop.svn.wordpress.org/trunk@50823 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 09:45:40 +00:00
Sergey Biryukov
ea4707d927 Media: Avoid an infinite loop between wp_getimagesize() and wp_get_image_mime().
As a result of the recent changes, both functions were calling each other if the `exif` PHP extension is not available.

The issue is now resolved by calling the `getimagesize()` PHP function directly, instead of the `wp_getimagesize()` wrapper.

Follow-up to [50146], [50810], [50814], [50815], [50818-50821].

See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50822 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-07 09:31:01 +00:00
Sergey Biryukov
630399eb20 Media: Remove an extra variable and a redundant check in WP_Image_Editor_Imagick::set_quality().
`wp_get_webp_info()` returns either a string or `false` for the `type` key, so we can just check for the string directly.

Follow-up to [50810], [50814], [50815], [50818-50820].

See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50821 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-06 15:03:32 +00:00
Sergey Biryukov
08b4cab653 Docs: Correct documentation for wp_get_webp_info() return results.
Follow-up to [50810], [50814], [50815], [50818], [50819].

See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50820 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-06 13:57:18 +00:00
Sergey Biryukov
2c9bc14b94 Media: Remove _wp_webp_is_lossy() for now.
The function was only used in a single place in core.

Follow-up to [50810], [50814], [50815], [50818].

Props johnjamesjacoby.
See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50819 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-06 11:09:34 +00:00
Sergey Biryukov
784a0cd87a Media: Correct an early return condition in wp_get_webp_info().
Previously, this would only have evaluated to `true` if `wp_get_image_mime()` returned `false`.

Follow-up to [50810], [50814], [50815].

See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50818 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-06 10:19:42 +00:00
Jonathan Desrosiers
970f904de5 Site Health: Include more ImageMagick/Imagick information in the Media Handling section.
This adds additional information to the Media Handling section of the Site Health Info page. When ImageMagick is used as the site’s image editor, a full list of file formats supported will now be shown. This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).

Additionally, the version of Imagick installed. This will help site owners debug issues with generating images on the PHP side.

Some variables have also been renamed to more accurately represent what is being stored.

Props Clorith, desrosj.
Fixes #53022.

git-svn-id: https://develop.svn.wordpress.org/trunk@50817 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-05 19:20:55 +00:00
David Baumwald
7ca9b459e5 Comments: Remove fourth parameter on remove_filter call.
In `class-walker-comment.php`, a `remove_filter` call on `comment_text` passed a fourth parameter which was not needed.  This change removes the extra argument.

Props diddledan, SergeyBiryukov.
Fixes #53113.

git-svn-id: https://develop.svn.wordpress.org/trunk@50816 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-05 18:53:54 +00:00
Sergey Biryukov
bf17cc67ce Media: Move retrieving WebP image size information into wp_getimagesize().
Remove `_wp_get_image_size()`.

Follow-up to [50146], [50810], [50814].

Props johnjamesjacoby.
See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50815 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-05 18:46:10 +00:00
Sergey Biryukov
462560edba Media: Some documentation and test improvements for WebP support:
* Document that WebP constants are only defined in PHP 7.1+.
* Correct the `$filename` parameter type in `wp_get_webp_info()`.
* Use a consistent message when skipping tests due to the lack of WebP support.
* Remove unnecessary `else` branches after `markTestSkipped()`.
* Replace `assertEquals()` with more appropriate assertions.

Follow-up to [50810].

See #35725.

git-svn-id: https://develop.svn.wordpress.org/trunk@50814 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-05 17:06:17 +00:00
Sergey Biryukov
596a24c692 Themes: Remove the "Featured" tab on Add Themes screen.
Themes displayed in this tab were actually random, and have not been selected to be featured to new WordPress users.

The tab had already been removed from the Theme Directory, and with this change, the options in the admin area and in the directory will match again.

The "Popular" tab is now displayed instead as the default view.

Props poena, kjellr, celloexpressions.
Fixes #49487. See #meta5044.

git-svn-id: https://develop.svn.wordpress.org/trunk@50813 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-05 15:53:41 +00:00
Jonathan Desrosiers
aa62fdbfaa Formatting: Verify emails with + characters are valid.
This adds an assertion to confirm that `is_email()` considers email addresses with a `+` valid.

Props SergeyBiryukov, ayeshrajans.
Fixes #53130.

git-svn-id: https://develop.svn.wordpress.org/trunk@50812 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-04 16:05:49 +00:00
Sergey Biryukov
9aa08906e2 Docs: Further synchronize documentation for some Plugin API functions.
Follow-up to [50807].

See #50531.

git-svn-id: https://develop.svn.wordpress.org/trunk@50811 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-04 15:00:33 +00:00
Adam Silverstein
6a5ff5aa03 Images: enable WebP support.
Add support for uploading, editing and saving WebP images when supported by the server.

Add 'image/webp' to supported mime types. Correctly identify WebP images and sizes even when PHP doesn't support WebP. Resize uploaded WebP files (when supported) and use for front end markup.

Props markoheijne, blobfolio, Clorith, joemcgill, atjn, desrosj, spacedmonkey, marylauc, mikeschroder, hellofromtonya, flixos90.
Fixes #35725.



git-svn-id: https://develop.svn.wordpress.org/trunk@50810 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-04 14:43:36 +00:00
Jonathan Desrosiers
80302b7b35 General: Use correct escaping function for form action attributes.
Props chintan1896, audrasjb.
Fixes #53150.

git-svn-id: https://develop.svn.wordpress.org/trunk@50809 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-04 13:46:06 +00:00
Jonathan Desrosiers
3eb51f7546 General: Use correct escaping function for the plugin icon URL.
Props chintan1896, audrasjb.
Fixes #53151.

git-svn-id: https://develop.svn.wordpress.org/trunk@50808 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-04 13:37:50 +00:00
Sergey Biryukov
96c9af127c Plugins: Standardize the terminology used for actions, filters, and callback functions.
Use `$hook_name` when referring to a filter or action hook name, and `$callback` when referring to a callback function.

This brings more consistency to parameter names in Plugin API functions.

Includes minor code layout fixes for better readability and reordering some functions in a more logical order.

Props johnbillion, jrf, SergeyBiryukov.
Fixes #50531.

git-svn-id: https://develop.svn.wordpress.org/trunk@50807 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-04 10:46:26 +00:00
Sergey Biryukov
86d09a09a4 Twenty Twenty-One: Fix "Opening PHP tag must be on a line by itself" WPCS issue.
Follow-up to [50802].

See #52938.

git-svn-id: https://develop.svn.wordpress.org/trunk@50806 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-03 14:33:21 +00:00
Sergey Biryukov
65fb405e87 Coding Standards: Fix a whitespace at end of line issue in wp-admin/includes/class-wp-comments-list-table.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50805 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-03 14:08:13 +00:00
Sergey Biryukov
1415ac7ca7 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-posts-list-table.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50804 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-03 13:55:08 +00:00
Sergey Biryukov
984c194bf2 Upgrade/Install: Display plugin and theme update counts on WordPress Updates screen.
This restores the information that was previously included in a title attribute tooltip on pending updates link in the toolbar.

Follow-up to [50801].

Props sabernhardt, audrasjb, mukesh27, davidbaumwald.
Fixes #53031.

git-svn-id: https://develop.svn.wordpress.org/trunk@50803 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-02 16:52:46 +00:00
Sergey Biryukov
955df634d1 Twenty Twenty-One: Display page title as the H1 heading when a static page is selected as the "Posts page".
This ensures that the heading represents the content of the page. Previously, the site title was displayed instead.

Props sabernhardt, justinahinon, rianrietveld, mukesh27, francina, audrasjb, Boniu91.
Fixes #52938.

git-svn-id: https://develop.svn.wordpress.org/trunk@50802 602fd350-edb4-49c9-b593-d223f7449a82
2021-05-01 18:12:22 +00:00