Commit Graph

43651 Commits

Author SHA1 Message Date
SergeyBiryukov
e31e5e7f4d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50772 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-20 14:47:02 +00:00
Peter Wilson
38652cf33e Build/Test Tools: Add seeking support to stream test library.
Introduces seeking to the `WP_Test_Stream` stream wrapper. This allows the testing of `wp_getimagesize()` and `wp_read_image_metadata()` among others. Includes tests for the latter.

Props hellofromTonya.
Fixes #52922.
See #52826.


git-svn-id: https://develop.svn.wordpress.org/trunk@50771 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-20 03:01:55 +00:00
Sergey Biryukov
c072116d6a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50770 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-19 11:39:54 +00:00
Sergey Biryukov
2d7b7dd833 Docs: Correct comment format in wp-admin/edit-tags.php, remove extra space.
Props immeet94.
Fixes #46428.

git-svn-id: https://develop.svn.wordpress.org/trunk@50769 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-18 14:27:59 +00:00
Sergey Biryukov
e01bbd48f4 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50768 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-18 13:54:00 +00:00
Sergey Biryukov
5e8b165a54 Coding Standards: Use strict comparison in wp-admin/includes/class-walker-nav-menu-edit.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50767 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-17 12:20:44 +00:00
Marius L. J
337fcf6edd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50766 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-17 11:27:35 +00:00
Marius L. J
05b44492c8 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50765 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-17 10:53:04 +00:00
Marius L. J
a32a192ede 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@50764 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-17 01:12:25 +00:00
Jonathan Desrosiers
bf17761e70 Build/Test Tools: Make adjustments to how often old branches are tested.
This adjusts the workflow responsible for testing old branches to only test old branches once per month. This more closely resembles the testing practices previously in place on TravisCI.

The latest, supported branch will continue to be tested twice per month.

This also makes adjustments so that the workflow is run whenever changes are made to it. This will help verify changes without having to wait until the next scheduled run.

Fixes #52653.

git-svn-id: https://develop.svn.wordpress.org/trunk@50763 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-16 17:24:47 +00:00
Sergey Biryukov
6caebf6fc2 Coding Standards: Use strict comparison in wp-admin/includes/class-wp-automatic-updater.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50762 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-16 11:59:14 +00:00
Greg Ziółkowski
4072823456 Editor: Update WordPress packages to use with WordPress 5.8
In the response to the discussion during the Dev Chat, I'm doing a first pass to keep WordPress packages up to date in the WordPress 5.8 release cycle.

See https://github.com/WordPress/wordpress-develop/pull/1176 for more details.

Props youknowriad, aristath, andraganescu.
See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50761 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-15 14:41:38 +00:00
Greg Ziółkowski
a45c871541 Editor: Backport changes for WordPress packages added in 5.7.1
Props peterwilsoncc.
See #52912.



git-svn-id: https://develop.svn.wordpress.org/trunk@50760 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-15 11:01:12 +00:00
Sergey Biryukov
fd6ccf4540 Coding Standards: Give a variable in WP_Automatic_Updater::after_core_update() a more meaningful name.
Follow-up to [25841], [25873], [25882].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50759 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-15 10:29:21 +00:00
Jonathan Desrosiers
312b67e82a REST API: Allow authors to read their own password protected posts.
Allow authenticated users to read the contents of password protected posts if they have the `edit_post` meta capability for the post.

Props xknown, zieladam, peterwilsoncc, swissspidy, timothyblynjacobs.

git-svn-id: https://develop.svn.wordpress.org/trunk@50717 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-14 23:22:07 +00:00
Jonathan Desrosiers
60fa61de5b External libraries: Include upstream GetID3 fix for PHP 8.
Props jrf, xknown.

git-svn-id: https://develop.svn.wordpress.org/trunk@50714 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-14 23:08:25 +00:00
David Baumwald
f7799b9455 Privacy: Ensure "Export Personal Data" does not generate invalid JSON.
Previously, when exporting personal data, if the JSON encoding of the data failed, the invalid JSON was still written to `export.json`.  This change captures the JSON encoding failure and adds a notice to the UI.  

Props hellofromTonya, jrf, SergeyBiryukov.
Fixes #52892.

git-svn-id: https://develop.svn.wordpress.org/trunk@50713 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-14 21:26:58 +00:00
Jonathan Desrosiers
d60ad57e47 Upgrade/Install: Correct the alignment of error messages for the language installer.
This makes the CSS selector used to right align certain form related elements more specific. This prevents any error messages from being right aligned.

Props sabernhardt, audrasjb.
Fixes #52989.

git-svn-id: https://develop.svn.wordpress.org/trunk@50712 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-14 14:09:31 +00:00
Sergey Biryukov
83b4b89c5a Site Health: Correct test result status for the HTTPS test.
The supported status values for Site Health tests are `good`, `recommended`, and `critical`.

Follow-up to [50660].

Props TimothyBlynJacobs.
Fixes #52783.

git-svn-id: https://develop.svn.wordpress.org/trunk@50710 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-14 13:00:52 +00:00
Peter Wilson
021b2a3753 Bundled Themes: Bump versions for WordPress 5.7.1.
Twenty Twenty-One: Bump version to 1.3
Twenty Seventeen: Bump version to 2.7

Props desrosj, mukesh27, peterwilsoncc.
Fixes #52859.


git-svn-id: https://develop.svn.wordpress.org/trunk@50708 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-13 23:47:25 +00:00
Sergey Biryukov
66b035ab3b Coding Standards: Use strict comparison in wp-admin/includes/class-custom-image-header.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50707 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-13 19:03:07 +00:00
Sergey Biryukov
27ddc687c4 Coding Standards: Use strict comparison in wp-admin/includes/class-custom-background.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50706 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-13 17:59:45 +00:00
David Baumwald
8b74b031c5 I18N: Add context to strings when updating a plugin or theme with a ZIP package.
After [48390], plugins and themes can be updated with an uploaded ZIP file.  Strings were added for comparing the "current" and "uploaded" versions of a plugin or theme, but lacked context for each as to the object being referenced.  This change adds a `plugin` or `theme` context to each of these strings for disambiguation.

Props dimadin, SergeyBiryukov.
Fixes #53017.

git-svn-id: https://develop.svn.wordpress.org/trunk@50705 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-13 17:36:39 +00:00
Dominik Schilling
396bb2927b Build/Test Tools: Remove an extra space in the job name for PHPUnit tests.
See #52625.

git-svn-id: https://develop.svn.wordpress.org/trunk@50704 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-13 16:10:12 +00:00
Greg Ziółkowski
8603c6a006 Blocks: Add is_default handling to server side block styles registry
Ensures that register_block_style lets developer pass `is_default` flag to mark one of the block style variations as the default one.

Props mukesh27, xavivars.
Fixes #53006.



git-svn-id: https://develop.svn.wordpress.org/trunk@50703 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-13 08:02:33 +00:00
David Baumwald
b18a87c9ce Feeds: Rename "Summary" to "Excerpt" in Reading Settings.
On the "Reading Settings" page, the post excerpt was referred to as a "Summary".  For consistency with the rest of Core, this change updates "summary" to "excerpt" both in the setting and the relevant help tab.

Props SergeyBiryukov, ravipatel, mukesh27.
Fixes #52987.

git-svn-id: https://develop.svn.wordpress.org/trunk@50702 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-12 22:32:11 +00:00
Sergey Biryukov
69d11640be Coding Standards: Rewrite a fragment in request_filesystem_credentials() for clarity and to avoid repetition.
Follow-up to [8540], [8865].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50701 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-12 18:32:39 +00:00
Sergey Biryukov
94a8a4c5ec Coding Standards: Use strict comparison in wp-admin/includes/file.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50700 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-12 18:17:37 +00:00
Sergey Biryukov
d2c95cede3 Coding Standards: Simplify the check for parent terms in export_wp().
This is more consistent with similar checks elsewhere in core.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50699 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-11 13:42:25 +00:00
Dominik Schilling
808e2f886f Customize: Set playsinline attribute for custom header videos.
With the `playsinline` attribute the video can also autoplay on mobile browsers without asking the user to open it up fullscreen.
Also, change all video element properties to use boolean values.

Props klevyke, ocean90.
Fixes #50111.

git-svn-id: https://develop.svn.wordpress.org/trunk@50698 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-10 12:38:04 +00:00
Dominik Schilling
87fc38e588 Build/Test Tools: Remove remaining Travis CI references.
* Remove `travis:` tasks in Gruntfile.js.
* Remove status badge in README.md that comes from Travis CI via shields.io.
* Remove Travis CI related skipping in the `WP_UnitTestCase_Base::skipOnAutomatedBranches()` test method and related Docker environment variables.

Props johnbillion, SergeyBiryukov, ocean90.
See #52161.
Fixes #52666.

git-svn-id: https://develop.svn.wordpress.org/trunk@50697 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-10 12:05:50 +00:00
Sergey Biryukov
b394d5a7cf Coding Standards: Give a variable in wp-admin/themes.php a more meaningful name.
Follow-up to [20029].

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50696 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-10 11:59:19 +00:00
Rachel Baker
a7d053801d REST API: Move the rest_jsonp_enabled filter before setting the Content-Type header.
Fixes an issue where if JSONP was disabled the `Content-Type` HTTP header was still set to `application/javascript`.  

Props dd32, TimothyBlynJacobs.
Fixes #52691.

git-svn-id: https://develop.svn.wordpress.org/trunk@50695 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-09 21:26:07 +00:00
Sergey Biryukov
234c2b52cc Themes: Remove unused code fragment from wp-admin/themes.php.
Follow-up to [25666], [26141].

Props mukesh27, rkradadiya.
Fixes #53005.

git-svn-id: https://develop.svn.wordpress.org/trunk@50694 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-09 11:47:46 +00:00
Sergey Biryukov
c00ba50d59 Editor: Use a consistent way to retrieve post ID on Edit Post screens.
Props mukesh27, ravipatel, davidbaumwald.
Fixes #52995.

git-svn-id: https://develop.svn.wordpress.org/trunk@50693 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-09 11:29:58 +00:00
Sergey Biryukov
4e5569ddd3 Coding Standards: Remove unnecessary unset() calls in WP_Importer methods.
Variables created within the scope of a function are discarded automatically when PHP leaves the scope of the function, i.e. on `return`, so doing a call to `unset()` straight before a `return` statement is redundant.

Props jrf, ravipatel, rachelbaker, mukesh27.
Fixes #52996.

git-svn-id: https://develop.svn.wordpress.org/trunk@50692 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-08 11:10:16 +00:00
Sergey Biryukov
ab3dbadec4 Coding Standards: Use strict comparison in wp-admin/includes/dashboard.php.
Includes minor code layout fixes for better readability.

See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50689 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 18:32:01 +00:00
Kelly Choyce-Dwan
d198f25c13 Accessibility: Administration: Update various background colors for increased contrast.
This ensures that contrast between text color and background meets the WCAG 2.0 AA recommended value. The following locations were changed:

- Network List Tables: Use lighter background colors for site status indicator.
- Nav Menus: Use a lighter background color for invalid menu items.
- Pointers: Use a darker background for pointer header.
- Themes: Use darker background on filter button hover.
- Customizer: Use darker background for selected widget.

Follow-up to [50025], [50571].
Props kebbet, melchoyce, peterwilsoncc.
Fixes #52760.



git-svn-id: https://develop.svn.wordpress.org/trunk@50687 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 16:36:16 +00:00
Greg Ziółkowski
0a00e3d522 Editor: Ensure @wordpress/inteface package is listed as a dependency
Discovered when backporting changes for WordPress 5.7.1 release.

See #52991.




git-svn-id: https://develop.svn.wordpress.org/trunk@50686 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 11:37:35 +00:00
Greg Ziółkowski
d71ed075e4 Build Tools: Update development dependencies from WP packages
This patch updates only development dependencies for WordPress packages to align better with the Gutenberg plugin.

See #52991.



git-svn-id: https://develop.svn.wordpress.org/trunk@50685 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 11:13:04 +00:00
Peter Wilson
feab4b3d51 Build tools: Revert package-lock.json change in [50682].
See #52768.


git-svn-id: https://develop.svn.wordpress.org/trunk@50683 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 01:32:21 +00:00
Peter Wilson
260f13ab57 Media: Do not lazy load hidden images or embeds.
Improve the check for sourceless or dimensionless media when determining if the lazy loading attribute should be added to iframes and images. Never include the lazy loading attribute on embeds of WordPress posts as the iframe is initially hidden.

Including `loading="lazy"` on initially hidden iframes and images can prevent the media from loading in some browsers.

Props adamsilverstein, fabianpimminger, flixos90, johnbillion, jonkastonka, joyously, peterwilsoncc, SergeyBiryukov, SirStuey, swissspidy.
Fixes #52768.



git-svn-id: https://develop.svn.wordpress.org/trunk@50682 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-07 00:59:18 +00:00
Sergey Biryukov
924343c8fc Login and Registration: Check if $_GET['login'] is set before using it in wp-login.php.
This avoids an "Undefined index" PHP notice displayed as part of password reset process if `$_GET['key']` is set, but `$_GET['login']` is not.

Props satrancali.
Fixes #52980.

git-svn-id: https://develop.svn.wordpress.org/trunk@50677 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 18:37:06 +00:00
Jonathan Desrosiers
4286a87407 Build/Test Tools: Prevent PHPUnit tests on push for forks/private mirrors.
The reorganization of the PHPUnit workflow in [50441] unintentionally caused the tests to be run for every `push` event, even for forks and private mirrors.

Previously, the second job required the first one to pass, and the conditional check on the first prevented both from running. Because the first job is no longer required for the second, both jobs must have the appropriate conditional check.

Fixes #52983.

git-svn-id: https://develop.svn.wordpress.org/trunk@50670 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 15:12:19 +00:00
Jonathan Desrosiers
715c5db575 Bundled Themes: Update the “Tested up to” value.
“Tested up to” is not displayed on the theme directory or within the WordPress dashboard, but should be updated to be accurate for anyone reading the theme’s source code.

Follow up to [50508].

Fixes #52859.

git-svn-id: https://develop.svn.wordpress.org/trunk@50669 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:41:35 +00:00
Jonathan Desrosiers
aac005ccdf Build/Test Tools: Update some dependencies.
This updates `elliptic` to version `6.5.4` through `npm audit fix`.

`uglify-js` is also updated to version `3.13.3`, and `grunt-contrib-uglify` to version `5.0.1`.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50668 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:29:06 +00:00
Jonathan Desrosiers
57db16646b Twenty Twenty-One: Rebuild IE specific editor stylesheet.
This was not updated to include the changes from [50493].

Fixes #52981. See #52702.

git-svn-id: https://develop.svn.wordpress.org/trunk@50667 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:10:17 +00:00
Jonathan Desrosiers
5a49965d1b Build/Test Tools: Update dependencies in default themes.
This updates several dependencies in the Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One default themes.

See #52624.

git-svn-id: https://develop.svn.wordpress.org/trunk@50666 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 14:05:30 +00:00
Sergey Biryukov
6b8d5df24e Coding Standards: Use strict comparison in wp-admin/includes/credits.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50665 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 13:45:47 +00:00
Sergey Biryukov
4ca1ee8c0e Coding Standards: Use strict comparison in wp-admin/includes/comment.php.
See #52627.

git-svn-id: https://develop.svn.wordpress.org/trunk@50664 602fd350-edb4-49c9-b593-d223f7449a82
2021-04-06 13:43:56 +00:00