Commit Graph

19159 Commits

Author SHA1 Message Date
joedolson
fe1cb3ff0d Media: Restore AJAX response data shape in media library.
Restore the original shape of the AJAX response data in the media library after removing infinite scroll, and pass total number of attachments in the response headers `X-WP-Total` and `X-WP-TotalPages`. 

Improve backwards compatibility for plugins intercepting the ajax response. Headers match the structure and count calculation used in REST API responses.

Fix an issue with hiding the spinner after the load is completed and ensure that the load more view is created when changing tabs in the media library modal.

Follow up to [50829].

props adamsilverstein, spacedmonkey, joedolson.
Fixes #50105.
Built from https://develop.svn.wordpress.org/trunk@51145


git-svn-id: http://core.svn.wordpress.org/trunk@50754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 20:50:57 +00:00
desrosj
b7489425cb Site Health: Display a list of file formats supported by the GD library.
This adds the list of file formats supported by the GD library to the Media Handling section in Site Health.

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]).

Follow up to [50817].
Props adamsilverstein, jorbin. 
Fixes #53022.
Built from https://develop.svn.wordpress.org/trunk@51143


git-svn-id: http://core.svn.wordpress.org/trunk@50752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-14 18:59:59 +00:00
desrosj
8c4cff0708 Upgrade/Install: Built files should not be included in the $_old_files list.
Follow up to [51133].
Unprops desrosj.
See #53367.
Built from https://develop.svn.wordpress.org/trunk@51134


git-svn-id: http://core.svn.wordpress.org/trunk@50743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 16:22:03 +00:00
desrosj
f7c74d3994 Upgrade/Install: Update the $_old_files list for 5.8.
Follow up to [50761], [50794], [51021].
Props kapilpaul, desrosj.
See #52991, #52846, #53246.
Fixes #53367.
Built from https://develop.svn.wordpress.org/trunk@51133


git-svn-id: http://core.svn.wordpress.org/trunk@50742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 15:54:57 +00:00
antpb
06cddbd3b3 Privacy: Improve naming of user confimed action email filters.
The filters `user_confirmed_action_email_content`, `user_erasure_complete_email_subject`, and `user_erasure_complete_email_headers` have been deprecated.

They have been replaced with `user_erasure_fulfillment_email_content`, `user_erasure_fulfillment_email_subject`, and `user_erasure_fulfillment_email_headers`.

Props desrosj, garrett-eclipse, birgire, DrewAPicture, lifeforceinst, ocean90, pbiron, pento, coffee2code, TZ-Media, SergeyBiryukov, johnbillion, audrasjb, davidbaumwald, hellofromTonya, helen, xkon, antpb, peterwilsoncc, lukecarbis.
Fixes #44314.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-09 01:35:58 +00:00
desrosj
bdbda4c306 Coding Standards: Use single quotes when there are no variables within the string.
Follow up to [51117].

See #48743.
Built from https://develop.svn.wordpress.org/trunk@51120


git-svn-id: http://core.svn.wordpress.org/trunk@50729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:55:58 +00:00
desrosj
892e5dd68e Administration: Adjust Internet Explorer message to be a bit more clear.
This moves “Internet Explorer” to the beginning of the sentence introduced in [51117] to make the reason the user is seeing this message more clear.

Props chanthaboune, jeffpaul, desrosj.
Fixes #48743.
Built from https://develop.svn.wordpress.org/trunk@51119


git-svn-id: http://core.svn.wordpress.org/trunk@50728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:54:57 +00:00
antpb
a8321ed2d5 Administration: Introduce dashboard notice to discourage use of out of date browser.
If a browser matches Internet Explorer, the dashboard will display a notice recommending a more modern browser.

Props youknowriad, sabernhardt, afercia, SergeyBiryukov, davidbaumwald, netweb, johnbillion, jeherve.
See #48743.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:47:58 +00:00
whyisjake
71f37fe636 Editor: Ensure that the block editor can be used on the page post type.
Additionally, add a notice for when you are editing the "latest posts" page.

Fixes #45537.

Props cameronjonesweb, swissspidy, hannahmalcolm, Fantasy1125, ArnaudBan, grantmkin, youknowriad, knutsp, SergeyBiryukov, audrasjb, whyisjake. 

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


git-svn-id: http://core.svn.wordpress.org/trunk@50725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:38:58 +00:00
whyisjake
1b7df89e93 Administration: Escape the values of data-colname.
Adds a `esc_attr` wrapper to `strip_all_tags`.

See [33016].

Fixes #40401.

Props rellect, SergeyBiryukov, hareesh-pillai, audrasjb.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:21:57 +00:00
whyisjake
2d6e474c85 Media: Ensure that post_id variable is initiated ahead of usage.
This prevents warnings when using custom bulk actions in the media library.

Props gitlost, achbed, Boniu91, wpgurudev, hellofromTonya.

Fixes #39589.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50720 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:08:09 +00:00
ryelle
57fa6fde4e Login and Registration: Wrap long site titles to a new line.
Props sumitsingh, geekpress, sabernhardt.
Fixes #52776.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 19:46:58 +00:00
desrosj
7af8858ec7 Build/Test Tools: Update several devDependencies.
This updates `qunit`, `sass`, and `uglify-js` to thei latest versions.

Several other packages are also having their versions bumped as a result of running `npm audit fix`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@51097


git-svn-id: http://core.svn.wordpress.org/trunk@50706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 17:15:15 +00:00
Sergey Biryukov
08f5a1b098 Upgrade/Install: Remove parsing of readme.txt files for plugin or theme requirements.
This affects:
* `validate_plugin_requirements()`
* `validate_theme_requirements()`

Historically, the `Requires PHP` header was introduced in #meta2952 for the Plugin Directory first, so at the time it made sense to have it defined in the same place as `Requires at least`, which only existed in `readme.txt`. 

Since parsing of PHP and WordPress requirements was later added to WordPress core, the core should retrieve all the necessary data from the main plugin or theme file and not from `readme.txt`, which only contains the data meant for the Plugin or Theme Directory.

The recommended place for `Requires PHP` and `Requires at least` headers is as follows:
* The plugin's main PHP file
* The theme's `style.css` file

The place for the `Tested up to` header remains in `readme.txt` for the time being, as it's not used by WordPress core.

Follow-up to [44978], [45546], [47573], [47574], [meta5841], [meta9050].

Props afragen, Otto42, joyously, williampatton, audrasjb.
Fixes #48520. See #48515, #meta2952, #meta4514, #meta4621.
Built from https://develop.svn.wordpress.org/trunk@51092


git-svn-id: http://core.svn.wordpress.org/trunk@50701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 10:13:00 +00:00
youknowriad
446dd1768a Block Editor: Add a type property to allow Core to identify the source of the editor styles.
Gutenberg plugin need to override the editor styles provided by core selectively,
this added property allows it to do so without committing to a public API.

Props nosolosw, jorgefilipecosta.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 08:15:57 +00:00
noisysocks
bbc2d09a9f Make new WordPress installations use blocks in widget areas instead of widgets
Modifies `wp_install_defaults()` so that when you install a new WordPress site you
have block in your widget areas, not widgets.

Fixes #53324.
Props isabel_brison, hellofromtonya, andraganescu.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 01:55:57 +00:00
joedolson
e53ace6056 Application Passwords: Allow enter key to submit profile form.
Fix the enter key in profile form fields moving focus to the application password input instead of submitting the profile update for. Replace the submit button type used for application passwords with `button type="button"` and ensure that the enter key's native behavior isn't overwritten.

props audrasjb, alexstine, promz, sabernhardt.
Fixes #52849.
Built from https://develop.svn.wordpress.org/trunk@51086


git-svn-id: http://core.svn.wordpress.org/trunk@50695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:49:58 +00:00
joedolson
637282bb0f Themes: Fix accessibility issues with controls in themes screen.
Add accessible names to several theme controls so provide better context for screen reader users. Change theme details element into a button that can receive focus. Ensure focus is set back on existing theme when theme details modal is closed.

props alexstine, poena.
Fixes #52649.
Built from https://develop.svn.wordpress.org/trunk@51083


git-svn-id: http://core.svn.wordpress.org/trunk@50692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 23:10:57 +00:00
Sergey Biryukov
aeebd14fe2 Comments: Escape comment author's email in the Edit Comment form.
Technically, this is redundant, as the `comment_author`, `comment_author_email`, and `comment_author_url` fields are already escaped via `get_comment_to_edit()` before the form is displayed. 

However, this brings some consistency with the `comment_author` and `comment_author_url` fields being escaped in the same form.

Follow-up to [11721].

Props utsav72640.
Fixes #53349.
Built from https://develop.svn.wordpress.org/trunk@51080


git-svn-id: http://core.svn.wordpress.org/trunk@50689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-07 18:47:02 +00:00
Sergey Biryukov
00ac778b90 Coding Standards: Use strict comparison in wp-admin/options-media.php.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@51075


git-svn-id: http://core.svn.wordpress.org/trunk@50684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-05 13:57:59 +00:00
ryelle
13d9212bf4 List Tables: Update spacing in action items on small screens.
Switch the display to flex. The action items use their intrinsic space, rather than a fixed grid, which prevents too much space between items on larger mobile screens.

Props arunsathiya, sabernhardt, danfarrow, notlaura, aliveic, y_kolev
Fixes #48546, #47895.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-04 18:14:56 +00:00
Sergey Biryukov
f637014b61 Site Health: Remove unnecessary function_exists() checks from WP_Site_Health::get_tests().
By the time the tests run, both `wp_is_site_protected_by_basic_auth()` and `rest_url()` functions are available, so there is no need to check for their existence.

Follow-up to [44986], [51057].

Props Clorith, costdev, SergeyBiryukov.
Fixes #52642.
Built from https://develop.svn.wordpress.org/trunk@51066


git-svn-id: http://core.svn.wordpress.org/trunk@50675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-03 11:14:56 +00:00
Sergey Biryukov
8e5b3d5a97 Plugins: Make sure Hello Dolly translations are deleted when the plugin is deleted.
Follow-up to [19965], [29856].

Props costdev, Otshelnik-Fm, JeffPaul, SergeyBiryukov.
Fixes #52817.
Built from https://develop.svn.wordpress.org/trunk@51064


git-svn-id: http://core.svn.wordpress.org/trunk@50673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 15:12:58 +00:00
noisysocks
138fa081a7 Widgets: Add missing actions to widgets block editor
Adds the `'sidebar_admin-setup'`, `'sidebar_admin_page'`, and
`current_theme_supports( 'widgets' )` check to the widgets block editor so that
the block editor screen is more compatible with the classic screen.

Fixes #53288.
Props isabel_brison.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 01:57:57 +00:00
Clorith
918610fb88 Site Health: Conditionally run Authorization header test.
The test to confirm if Authorization headers can be used and recognized by WordPress needs to include a username and password combination that WordPress can compare against during the testing phase. The inclusion of credentials here would unfortunately also invalidate any existing basic auth session for the site, for example if the user had added this as an extra layer of security on their back-end.

This test is now skipped if the `wp_is_site_protected_by_basic_auth()` function detects that basic auth is being used, since the act of using basic auth to access the site confirms that this feature is working as expected in the first place.

Props WebDragon, TimothyBlynJacobs, costdev.
Fixes #52642.
Built from https://develop.svn.wordpress.org/trunk@51057


git-svn-id: http://core.svn.wordpress.org/trunk@50666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-02 00:51:57 +00:00
Sergey Biryukov
033c742a4e Block Editor: Load the WP_Theme_JSON_Resolver class in wp-admin/load-styles.php.
This ensures correct load order when style concatenation is used, e.g. when `SCRIPT_DEBUG` is off.

Additionally, make sure the `WP_CONTENT_DIR` constant is defined for use in `get_theme_root()` via `get_stylesheet_directory()`.

Follow-up to [50992], [51001], [51013].

Props nosolosw.
See #53175.
Built from https://develop.svn.wordpress.org/trunk@51056


git-svn-id: http://core.svn.wordpress.org/trunk@50665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 23:09:58 +00:00
Sergey Biryukov
44c185e0cf Coding Standards: Simplify a condition in wp-admin/admin-footer.php.
Props jamil95, mukesh27.
Fixes #53306.
Built from https://develop.svn.wordpress.org/trunk@51053


git-svn-id: http://core.svn.wordpress.org/trunk@50662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 11:30:57 +00:00
desrosj
2abc73b4cd Build/Test Tools: Update the several dependencies.
This updates the following dependencies:

- `chalk` from `4.1.0` to `4.1.1`.
- `dotenv` from `8.2.0` to `10.0.0`.
- `grunt` from `1.4.0` to `1.4.1`.
- `sass` from `1.32.12` to `1.34.0`.
- `sinon` from `10.0.0` to `11.1.1`.
- `uglify-js` from `3.13.6` to `3.13.8`.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@51040


git-svn-id: http://core.svn.wordpress.org/trunk@50649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 19:33:19 +00:00
Sergey Biryukov
7573bd8e8d Docs: Use a duplicate hook reference for widgets_admin_page in wp-admin/widgets-form-blocks.php.
Follow-up to [51038].

See #51506.
Built from https://develop.svn.wordpress.org/trunk@51039


git-svn-id: http://core.svn.wordpress.org/trunk@50648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 09:07:01 +00:00
noisysocks
341944a352 Widgets: Perform 'widgets_admin_page' action in block widget editor
Perform the 'widgets_admin_page' action just prior to outputting markup for the
widgets block editor so as to maximise backwards compatibility with the old
screen.

Follows [51037].
See #51506.
Props isabel_brison.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 01:52:57 +00:00
noisysocks
37bef4c2c5 Widgets: Remove unnecessary enqueue of 'format-library' assets
It is not necessary to enqueue 'format-library' assets here as this is done when
triggering the 'enqueue_block_editor_assets' action.

Follows [51028].
See #51506.
Props isabel_brison.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 01:50:57 +00:00
Sergey Biryukov
b1666e78fb Media: Replace basename() usage on media upload screen with wp_basename() for better multibyte filenames support.
Includes minor code layout fixes for better readability.

Follow-up to [44785], [51023].

See #51754.
Built from https://develop.svn.wordpress.org/trunk@51030


git-svn-id: http://core.svn.wordpress.org/trunk@50639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 14:24:57 +00:00
Peter Wilson
885bdb2556 Posts, Post Types: Improve post_exists() query.
Add `$status` parameter to `post_exists()` to allow developers to specify a post type, date and status to ensure they hit the `wp_posts` table's `type_status_date` index when determining if a post exists.

Props apokalyptik, boonebgorges, brettshumaker, DrewAPicture, MikeHansenMe, peterwilsoncc, whyisjake.
Fixes #34012.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 02:17:56 +00:00
ryelle
6e4b41c848 Site Health, Privacy: Combine shared CSS for Site Health & Privacy Settings
The styles for the Privacy settings page were based on the Site Health section. These were duplicated into `edit.css` in #49264. This change merges the selectors from Site Health into the Privacy section, to reduce that duplicate code.

Props xkon, notlaura, clorith.
See #52429.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:53:57 +00:00
antpb
e2e8120fa6 Media: Add button in media upload page for copying the media url.
Adds a button to the media upload page to make copying the url possible on the same page when a media item upload is successful.

Props anotia, ryokuhi, Mista-Flo, lukecarbis, antpb, claytoncollie, shaunandrews, joedolson.
Fixes #51754.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:40:58 +00:00
Sergey Biryukov
d7086ba67a Themes: Display the number of available theme updates in the admin menu.
This brings some consistency with the similar update counter for plugins.

Props mukesh27, zodiac1978, pixolin, Boniu91, francina, sannevndrmeulen, joyously, SergeyBiryukov.
Fixes #43697.
Built from https://develop.svn.wordpress.org/trunk@51022


git-svn-id: http://core.svn.wordpress.org/trunk@50631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-26 01:17:57 +00:00
Sergey Biryukov
8f8f433b3c Administration: Improve the message about installing the Link Manager plugin to use legacy Links screen.
This provides direct links to install and activate the plugin, if the user has the capabilities to do so, instead of just linking to plugin search results.

It also matches more closely the message about installing the Classic Editor plugin for meta boxes incompatible with the block editor.

Follow-up to [22855], [44280], [45657].

Props tw2113, peterwilsoncc, SergeyBiryukov.
Fixes #52669.
Built from https://develop.svn.wordpress.org/trunk@51011


git-svn-id: http://core.svn.wordpress.org/trunk@50620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 20:14:59 +00:00
Sergey Biryukov
b722ba6ca5 Coding Standards: Further update the code for bulk menu items deletion to better follow WordPress coding standards.
Follow-up to [51006], [51009].

See #21603.
Built from https://develop.svn.wordpress.org/trunk@51010


git-svn-id: http://core.svn.wordpress.org/trunk@50619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 19:14:57 +00:00
joedolson
a4bf256f7c Coding Standards: Apply some minor coding standards fixes.
Follow up to [51006].

See #21603.
Built from https://develop.svn.wordpress.org/trunk@51009


git-svn-id: http://core.svn.wordpress.org/trunk@50618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 18:53:58 +00:00
joedolson
212f532d4c Menus: Add bulk delete for menu items.
Adds an option to bulk delete menu items from the core Navigation Menus screen, offering a considerable usability benefit when making significant changes to navigation menus.

Uses the bulk select pattern found in post and media lists for consistency with other core management screens, rather than the rapid delete pattern found in menus in the customizer.

Props wphound, welcher, melchoyce, maxpertici, audrasjb
Fixes #21603.
Built from https://develop.svn.wordpress.org/trunk@51006


git-svn-id: http://core.svn.wordpress.org/trunk@50615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 17:42:58 +00:00
youknowriad
4ae0e4220f Block Editor: Introduce block templates for classic themes.
With this patch, users will be able to create custom block based templates
and assign them to specific pages/posts.

Themes can also opt-out of this feature

Props bernhard-reiter, carlomanf.
Fixes #53176.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 14:20:57 +00:00
Sergey Biryukov
670ec9cfa7 Comments: Include a "View Post" link on the Comments screen for a single post.
This makes it easier to view the post on the front end of the site when moderating comments, without having to open the editor first.

Props trejder, audrasjb, vladytimy, lukecarbis, ayeshrajans, chaion07, paaljoachim, hareesh-pillai, SergeyBiryukov.
Fixes #52353.
Built from https://develop.svn.wordpress.org/trunk@50999


git-svn-id: http://core.svn.wordpress.org/trunk@50608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 12:26:58 +00:00
noisysocks
8775b69cd0 Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core.

- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
  @wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
  depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
  editor control depending on wp_use_widgets_block_editor().

Follows [50996] which was missing these files.
See #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:52:58 +00:00
noisysocks
81f62198c3 Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core.

- Adds @wordpress/edit-widgets, @wordpress/customize-widgets and
  @wordpress/widgets.
- Modifies wp-admin/widgets.php to branch between the old editor and new editor
  depending on wp_use_widgets_block_editor().
- Modifies WP_Customize_Widgets to branch between the old editor control and new
  editor control depending on wp_use_widgets_block_editor().

Fixes #51506.
Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 08:40:25 +00:00
youknowriad
dd68caaf6d Block Editor: Add the layout block support.
The layout block allows containers to define the size of their inner blocks
and the allowed allignments.
It's only enabled for themes with theme.json files.

Props nosolosw.
See #53175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@50600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-25 07:36:58 +00:00
gziolo
cfa7f89ba0 Editor: Use the block editor context in filters that used the editor name
Follow-up for [50956].
Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 21:21:57 +00:00
desrosj
0d1e4e553c General: Avoid unnecessary calls to update_user_option().
The `update_user_option()` function is a way to update a user meta value after adding a blog’s prefix to the beginning of the meta key. But when the fourth parameter is `true`, the behavior is exactly the same as calling `update_user_meta()` directly.

This replaces all instances of `update_user_option()` when the fourth parameter is `true` in Core with a direct call to `update_user_meta()` to prevent an unnecessary call to `update_user_option()`.

Props johnjamesjacoby, zkancs, obenland, desrosj.
Fixes #43339.
Built from https://develop.svn.wordpress.org/trunk@50981


git-svn-id: http://core.svn.wordpress.org/trunk@50590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:59:57 +00:00
Sergey Biryukov
c4182fd00f Site Health: Make sure the submit_button() function is available in request_filesystem_credentials().
This avoids a fatal error when the function is called via REST API from `WP_Site_Health_Auto_Updates::test_check_wp_filesystem_method()`.

Props lakrisgubben, mukesh27, Clorith, SergeyBiryukov.
Fixes #53206.
Built from https://develop.svn.wordpress.org/trunk@50979


git-svn-id: http://core.svn.wordpress.org/trunk@50588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:24:57 +00:00
Sergey Biryukov
209074f5e1 Themes: Add an indication of whether a theme is a child theme on network admin Themes screen.
This shows the parent theme name in a child theme's metadata section in the list table, in a similar way it is displayed in the theme details modal on the single site Themes screen.

Props dpik, Mista-Flo, seanchayes, poena, johnbillion, jeremyfelt, bradt, jacklenox, helen, Travel_girl, karmatosed, Presskopp, joyously, SergeyBiryukov.
Fixes #30240.
Built from https://develop.svn.wordpress.org/trunk@50978


git-svn-id: http://core.svn.wordpress.org/trunk@50587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 19:04:56 +00:00
Sergey Biryukov
aabce962ae Widgets: Make sure WP_Widget constructor creates a correct classname value for a namespaced widget class.
This reverts the changes to `id_base` from [50953] due to backward compatibility concerns, and instead focuses on the `id` and `class` attributes specifically.

With this change, any backslashes in the `id` or `class` attributes for a namespaced widget class are converted to underscores, making it easier to style the output or target the widget with JavaScript.

Follow-up to [50953].

Fixes #44098.
Built from https://develop.svn.wordpress.org/trunk@50961


git-svn-id: http://core.svn.wordpress.org/trunk@50570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 09:51:56 +00:00
gziolo
4ae98860b9 Editor: Extract block_editor_rest_api_preload method for use with different editor screens
It is going to be used on the new widgets editor screen. This patch also introduced a new class WP_Block_Editor_Context that is going to be used with revised block editor filters to let extenders to keep their existing behavior. It should also allow to provide more settings through the context class as new screens get introduced like the navigation editor.

Props azaozz, chrisvanpatten, timothyblynjacobs, youknowriad.
Fixes #52920.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-24 07:32:55 +00:00
ryelle
48660b62b6 Administration: List Tables: Wrap long search terms onto a new line.
Props sumitsingh, audrasjb, justinahinon, sahilmepani, hareesh-pillai.
Fixes #52749.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 19:09:59 +00:00
Clorith
c47c99900c Site Health: Skip REST tests during scheduled events.
This change fixes a false positive that would appear during scheduled events, by only running the REST test when a user visits the Site Health page, meaning an active session is available.

The test checking if the REST API is available, includes a parameter for `context=edit` to make sure the block editor can function properly. This means a user session with editor capabilities is required for the test to pass, which is not the case during a scheduled event.

Props szaqal21, TimothyBlynJacobs, hermpheus.
Fixes #52112.
Built from https://develop.svn.wordpress.org/trunk@50939


git-svn-id: http://core.svn.wordpress.org/trunk@50548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 11:09:56 +00:00
Peter Wilson
fabf5334a5 Menus: Do not auto-set locations for new menus.
Do not auto-set new menus to all vacant locations on the Appearance > Menus screen in the dashboard.

Follow up to [48051].

Props Chouby, audrasjb, davidbaumwald, mukesh27.
Fixes #52949.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-20 04:52:56 +00:00
Sergey Biryukov
96beaa51d3 App Passwords: Use "sites" terminology instead of "blogs" in application passwords help text.
Follow-up to [49270].

Props jeremy80, johnbillion, audrasjb.
Fixes #53225.
Built from https://develop.svn.wordpress.org/trunk@50932


git-svn-id: http://core.svn.wordpress.org/trunk@50541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:17:56 +00:00
davidbaumwald
f47a74a428 I18N: Combine escaping and translation functions.
There are a few instances where two separate functions are used for both escaping and translating output.  This change combines the two functions into the appropriate Core helper function.

Props dimadin, SergeyBiryukov.
Fixes #53153.
Built from https://develop.svn.wordpress.org/trunk@50931


git-svn-id: http://core.svn.wordpress.org/trunk@50540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-19 18:10:59 +00:00
Sergey Biryukov
9fbc705dc0 Plugins: Add support for Update URI header.
This allows third-party plugins to avoid accidentally being overwritten with an update of a plugin of a similar name from the WordPress.org Plugin Directory.

Additionally, introduce the `update_plugins_{$hostname}` filter, which third-party plugins can use to offer updates for a given hostname.

If set, the `Update URI` header field should be a URI and have a unique hostname.

Some examples include:

* `https://wordpress.org/plugins/example-plugin/`
* `https://example.com/my-plugin/`
* `my-custom-plugin-name`

`Update URI: false` also works, and unless there is code handling the `false` hostname, the plugin will never get an update notification.

If the header is present, the WordPress.org API will currently only return updates for the plugin if it matches the following format:

* `https://wordpress.org/plugins/{$slug}/`
* `w.org/plugin/{$slug}`

If the header has any other value, the API will not return a result and will ignore the plugin for update purposes.

Props dd32, DavidAnderson, meloniq, markjaquith, DrewAPicture, mweichert, design_dolphin, filosofo, sean212, nhuja, JeroenReumkens, infolu, dingdang, joyously, earnjam, williampatton, grapplerulrich, markparnell, apedog, afragen, miqrogroove, rmccue, crazycoders, jdgrimes, damonganto, joostdevalk, jorbin, georgestephanis, khromov, GeekStreetWP, jb510, Rarst, juliobox, Ipstenu, mikejolley, Otto42, gMagicScott, TJNowell, GaryJ, knutsp, mordauk, nvartolomei, aspexi, chriscct7, benoitchantre, ryno267, lev0, gregorlove, dougwollison, SergeyBiryukov.
See #14179, #23318, #32101.
Built from https://develop.svn.wordpress.org/trunk@50921


git-svn-id: http://core.svn.wordpress.org/trunk@50530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-17 17:04:01 +00:00
Sergey Biryukov
63ea8284a3 Docs: Miscellaneous DocBlock corrections.
See #52628.
Built from https://develop.svn.wordpress.org/trunk@50916


git-svn-id: http://core.svn.wordpress.org/trunk@50525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-15 17:38:05 +00:00
ryelle
750697e837 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 19:59:02 +00:00
Clorith
d55ae83ddc 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.
Built from https://develop.svn.wordpress.org/trunk@50845


git-svn-id: http://core.svn.wordpress.org/trunk@50454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 14:21:01 +00:00
Sergey Biryukov
6f2d4403c8 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.
Built from https://develop.svn.wordpress.org/trunk@50844


git-svn-id: http://core.svn.wordpress.org/trunk@50453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-12 10:14:03 +00:00
Sergey Biryukov
86491779ec 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.
Built from https://develop.svn.wordpress.org/trunk@50839


git-svn-id: http://core.svn.wordpress.org/trunk@50448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-11 17:10:02 +00:00
Sergey Biryukov
c8e4bb5d70 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.
Built from https://develop.svn.wordpress.org/trunk@50833


git-svn-id: http://core.svn.wordpress.org/trunk@50442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-10 14:56:00 +00:00
Sergey Biryukov
0a8cfcd0d7 Coding Standards: Use strict comparison in wp-admin/includes/screen.php.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50832


git-svn-id: http://core.svn.wordpress.org/trunk@50441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-09 20:27:02 +00:00
Sergey Biryukov
f30138fd8a Docs: Correct @since tags for new properties and functions related to infinite scrolling in Media Library.
Follow-up to [50829].

See #50105, #40330, #52628.
Built from https://develop.svn.wordpress.org/trunk@50831


git-svn-id: http://core.svn.wordpress.org/trunk@50440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-08 11:22:03 +00:00
joedolson
34e71f3d94 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.
Built from https://develop.svn.wordpress.org/trunk@50830


git-svn-id: http://core.svn.wordpress.org/trunk@50439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 23:51:04 +00:00
joedolson
9b6710c43c 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. 
Built from https://develop.svn.wordpress.org/trunk@50829


git-svn-id: http://core.svn.wordpress.org/trunk@50438 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 23:19:03 +00:00
John Blackbourn
bdaca9bffc Docs: Miscellaneous docblock updates.
See #52628

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


git-svn-id: http://core.svn.wordpress.org/trunk@50437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 20:16:00 +00:00
desrosj
03dc655612 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.
Built from https://develop.svn.wordpress.org/trunk@50827


git-svn-id: http://core.svn.wordpress.org/trunk@50436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 18:26:02 +00:00
desrosj
102d9569c2 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.
Built from https://develop.svn.wordpress.org/trunk@50826


git-svn-id: http://core.svn.wordpress.org/trunk@50435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 16:09:59 +00:00
Sergey Biryukov
0082070074 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.
Built from https://develop.svn.wordpress.org/trunk@50825


git-svn-id: http://core.svn.wordpress.org/trunk@50434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-07 13:49:58 +00:00
desrosj
af4b043a69 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.
Built from https://develop.svn.wordpress.org/trunk@50817


git-svn-id: http://core.svn.wordpress.org/trunk@50426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 19:21:59 +00:00
Sergey Biryukov
16c42e467d 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.
Built from https://develop.svn.wordpress.org/trunk@50815


git-svn-id: http://core.svn.wordpress.org/trunk@50424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 18:47:57 +00:00
Sergey Biryukov
e21dfba663 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.
Built from https://develop.svn.wordpress.org/trunk@50813


git-svn-id: http://core.svn.wordpress.org/trunk@50422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-05 15:54:59 +00:00
Adam Silverstein
524030edfa 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 14:44:58 +00:00
desrosj
e7e4b84263 General: Use correct escaping function for form action attributes.
Props chintan1896, audrasjb.
Fixes #53150.
Built from https://develop.svn.wordpress.org/trunk@50809


git-svn-id: http://core.svn.wordpress.org/trunk@50418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 13:47:58 +00:00
desrosj
5ced9a5afe General: Use correct escaping function for the plugin icon URL.
Props chintan1896, audrasjb.
Fixes #53151.
Built from https://develop.svn.wordpress.org/trunk@50808


git-svn-id: http://core.svn.wordpress.org/trunk@50417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-04 13:38:58 +00:00
Sergey Biryukov
8641429845 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.
Built from https://develop.svn.wordpress.org/trunk@50805


git-svn-id: http://core.svn.wordpress.org/trunk@50414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-03 14:10:00 +00:00
Sergey Biryukov
4f2c63bbf6 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.
Built from https://develop.svn.wordpress.org/trunk@50804


git-svn-id: http://core.svn.wordpress.org/trunk@50413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-03 13:57:04 +00:00
Sergey Biryukov
29cd5d902d 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.
Built from https://develop.svn.wordpress.org/trunk@50803


git-svn-id: http://core.svn.wordpress.org/trunk@50412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-02 16:54:06 +00:00
Sergey Biryukov
754714ba43 Coding Standards: Fix a precision alignment issue in wp-admin/includes/template.php.
Follow-up to [49223].

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50795


git-svn-id: http://core.svn.wordpress.org/trunk@50404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-28 18:55:05 +00:00
Sergey Biryukov
1ad7538792 Plugins: When loading a plugin in a "sandbox" on activation, do it once.
This avoids a fatal error if the plugin is already included, e.g. in unit tests.

Follow-up to [50787].

See #31104.
Built from https://develop.svn.wordpress.org/trunk@50788


git-svn-id: http://core.svn.wordpress.org/trunk@50397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-25 13:21:05 +00:00
Sergey Biryukov
fe549286d5 Plugins: When loading a plugin in a "sandbox" on activation, do it in a separate function.
This avoids accidentally overriding some variables in the scope of `activate_plugin()`, e.g. `$silent` or `$network_wide`.

Plugins expecting to have access to `$network_wide` directly on inclusion should receive it as an argument of the activation hook callback instead, on any of these actions:

* `activate_plugin`
* `activate_{$plugin}`
* `activated_plugin`

Follow-up to [28644].

Props Mike_Cowobo, dd32, DrewAPicture, mensmaximus, SergeyBiryukov.
Fixes #31104.
Built from https://develop.svn.wordpress.org/trunk@50787


git-svn-id: http://core.svn.wordpress.org/trunk@50396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-24 18:04:04 +00:00
Sergey Biryukov
75d7c7e8d9 Coding Standards: Use strict comparison in wp-admin/includes/update-core.php.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50785


git-svn-id: http://core.svn.wordpress.org/trunk@50394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-23 14:51:05 +00:00
desrosj
64b4c21c1f Build/Test Tools: Remove Internet Explorer 11 from the browserslist.
This officially removes support for Internet Explorer 11 in the CSS files run through the build process in Core.

Individual tickets should be opened for removing each manually maintained area of the code base targeting IE11.

The resulting changes to CSS files are included in this commit.

Fixes #53077.
Built from https://develop.svn.wordpress.org/trunk@50784


git-svn-id: http://core.svn.wordpress.org/trunk@50393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-22 22:58:05 +00:00
Sergey Biryukov
8ef335a566 Coding Standards: Remove loose comparison in wp-admin/includes/plugin-install.php.
This more closely represents how the active installations count is displayed in the Plugin Directory.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50783


git-svn-id: http://core.svn.wordpress.org/trunk@50392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-22 19:18:05 +00:00
desrosj
2d7eb07747 Build/Test Tools: Update the caniuse-lite database.
This updates the `caniuse-lite` database to the most recent version (`1.0.30001214`) by running `npx browserslist@latest --update-db`.

The resulting changes after running `grunt precommit:css` are also included in this commit.

See #52624.
Built from https://develop.svn.wordpress.org/trunk@50782


git-svn-id: http://core.svn.wordpress.org/trunk@50391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-22 00:56:05 +00:00
Sergey Biryukov
784b1fb1b1 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-terms-list-table.php.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50780


git-svn-id: http://core.svn.wordpress.org/trunk@50389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 18:53:00 +00:00
davidbaumwald
5500f370fd Coding Standards: Fix minor, inline spacing issue in wp-admin/setup-config.php.
See #52627.



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


git-svn-id: http://core.svn.wordpress.org/trunk@50388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 18:31:07 +00:00
gziolo
f4f125b869 Editor: Abstract block editor configuration
There are several WordPress hooks defined on the server that depend on $post object that isn’t present on the new screens like edit site, edit widgets, or edit navigation. This patch deprecates existing filters and introduces replacements that are context-aware.

Props azaozz, andraganescu, jeremyfelt, nosolosw, youknowriad.
See #52920.




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


git-svn-id: http://core.svn.wordpress.org/trunk@50385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 05:12:05 +00:00
Peter Wilson
6ce6abd8c0 Upgrade/Install: Prevent possible type errors during installation.
Prevent a `TypeError` from occurring during installation if `wp-config.php` is not writable. In PHP 8.0 this can cause a fatal error, in earlier versions of PHP a warning would be thrown.

Account for a change in type returned by `fopen()` coming in a future version of PHP. Minor coding standards fixes in the `/wp-admin/setup-config.php` file.

Props xknown, hellofromTonya, jrf, peterwilsoncc.
See #51423.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-21 01:33:03 +00:00
Sergey Biryukov
253e1e0413 Code Modernization: Bring consistency to preparing some fields on Network Settings screen:
* `illegal_names`
* `limited_email_domains`
* `banned_email_domains`

If any of these options have a falsey value, treat it as an empty string. This addresses a PHP 8.1+ deprecation notice when passing a `null` value to `str_replace()`.

Additionally, avoid unnecessary type casting for better performance.

Props hellofromTonya, jrf, SergeyBiryukov.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@50772


git-svn-id: http://core.svn.wordpress.org/trunk@50381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-20 14:49:08 +00:00
Sergey Biryukov
596b9ed6ce Coding Standards: Use strict comparison in wp-admin/includes/class-wp-media-list-table.php.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50770


git-svn-id: http://core.svn.wordpress.org/trunk@50379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-19 11:41:07 +00:00
Sergey Biryukov
0cbb526928 Docs: Correct comment format in wp-admin/edit-tags.php, remove extra space.
Props immeet94.
Fixes #46428.
Built from https://develop.svn.wordpress.org/trunk@50769


git-svn-id: http://core.svn.wordpress.org/trunk@50378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-18 14:29:03 +00:00
Sergey Biryukov
81ad8ccdf6 Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-comments-list-table.php.
* Rename method argument in `WP_Comments_List_Table::floated_admin_avatar()` per the naming conventions.
* Use strict comparison in `WP_Comments_List_Table::handle_row_actions()`.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50768


git-svn-id: http://core.svn.wordpress.org/trunk@50377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-18 13:55:07 +00:00
Sergey Biryukov
ed067531ec Coding Standards: Use strict comparison in wp-admin/includes/class-walker-nav-menu-edit.php.
See #52627.
Built from https://develop.svn.wordpress.org/trunk@50767


git-svn-id: http://core.svn.wordpress.org/trunk@50376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 12:22:03 +00:00
Clorith
f7536fd387 Site Health: Remove Ajax requests from dashboard widget.
The Site Health dashboard widget uses the same JavaScript file as the Site Health pages to generate its progress indicator.

This file was also set up to store the current Site Health check results if the current tab being shown isn't the debug information one, this had the side effect of the dashboard being seen as not the debug screen as well.

This now has a conditional making sure it's the status screen it self being displayed, before trying to do any Ajax requests.

Props arena.
Fixes #49814.
Built from https://develop.svn.wordpress.org/trunk@50766


git-svn-id: http://core.svn.wordpress.org/trunk@50375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 11:29:02 +00:00
Clorith
954842868f Site Health: Correct array key for the default tab
Use `reset` to get the label from the first tab entry as the default if no tab is defined.
This ensures even if the tab order is changed, or tabs are removed, no warnings will be thrown.

Follow-up to [50764].

See #47225.
Built from https://develop.svn.wordpress.org/trunk@50765


git-svn-id: http://core.svn.wordpress.org/trunk@50374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 10:55:03 +00:00
Clorith
eea98a5426 Site Health: Support custom sub-menus and pages.
Allow developers to extend the Site Health screen with their own custom navigation tabs and pages.

This implements a new filter, `site_health_navigation_tabs`, which takes an associated array of tab identifiers/slugs, and tab labels, allowing developers to add their own subpage to the Site Health interface as new tabs.

To output a custom page, or add to an existing page, the `site_health_tab_content` action is triggered whenever the `tab` query argument is present and not empty. This action includes the current tab as its argument, which a developer would match against to only output content when relevant.

Props ramiy for initial patch.
Fixes #47225.
Built from https://develop.svn.wordpress.org/trunk@50764


git-svn-id: http://core.svn.wordpress.org/trunk@50373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-17 01:14:01 +00:00
Sergey Biryukov
afb02cb315 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-automatic-updater.php.
Includes minor code layout fixes for better readability.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50762


git-svn-id: http://core.svn.wordpress.org/trunk@50371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-04-16 12:01:15 +00:00