Commit Graph

43099 Commits

Author SHA1 Message Date
Sergey Biryukov
35e4b004f0 Tests: Disable update checks while running REST API plugin installation tests.
This prevents external HTTP requests that are not required for the tests in question and may interfere with the results in case of a timeout.

Follow-up to [48242], [49491].

See #51669.

git-svn-id: https://develop.svn.wordpress.org/trunk@49913 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-30 19:02:03 +00:00
Sergey Biryukov
c32b13d2e7 Docs: Second pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Follow-up to [45674-45677].

Props marcio-zebedeu, zodiac1978, netweb.
See #48987.

git-svn-id: https://develop.svn.wordpress.org/trunk@49912 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-29 20:12:42 +00:00
Andrew Ozz
ce9d7aa464 Editor: Trigger the tinymce-editor-init custom jQuery event on DOM ready. Otherwise TinyMCE may initialize earlier and handlers attached on DOM ready may not get triggered. Fixes making the editor menu "sticky" and setting/resetting some screen options on the old Edit Post screen.
Fixes 52046, 51995.

git-svn-id: https://develop.svn.wordpress.org/trunk@49911 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-29 13:19:14 +00:00
Sergey Biryukov
505e08e2c4 Export: Add post_modified and post_modified_gmt fields to the generated WXR export file.
This allows for more flexibility when determining which version of a post is the latest one, and makes it possible to implement import logic involving updating and adding revisions to existing posts or pages.

Props jmdodd.
Fixes #52180.

git-svn-id: https://develop.svn.wordpress.org/trunk@49910 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-28 15:24:37 +00:00
Gary Pendergast
f6042ffc5b Site Health: Check that WordPress is installed before scheduling the HTTPS cron.
Trying to schedule cron jobs before WordPress is installed results in DB errors, which is suboptimal.

See #47577.



git-svn-id: https://develop.svn.wordpress.org/trunk@49909 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-28 01:43:18 +00:00
Sergey Biryukov
5321a2f082 Site Health: Add WP_MEMORY_LIMIT constant to debug info.
This complements the `WP_MAX_MEMORY_LIMIT` constant previously displayed there.

Props sanketchodavadiya, nre, talldanwp, noisysocks.
Fixes #51680.

git-svn-id: https://develop.svn.wordpress.org/trunk@49908 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-27 19:25:48 +00:00
Sergey Biryukov
b16def4d1d Accessibility: Upgrade/Install: Add more contrast to input borders during installation.
This brings the accessibility improvements previously made for other areas of the admin in WordPress 5.3 to the installation screens too.

Follow-up to [46241-46244], [46247], [46248], [46293], [46425].

Props Maigret, audrasjb.
Fixes #51854.

git-svn-id: https://develop.svn.wordpress.org/trunk@49907 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-26 19:52:48 +00:00
Sergey Biryukov
0f33f289e8 Docs: Correct the type of the $user parameter in WP_REST_Users_Controller::prepare_links().
Props iviweb, mukesh27.
Fixes #52175.

git-svn-id: https://develop.svn.wordpress.org/trunk@49906 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-25 14:52:25 +00:00
Sergey Biryukov
54b6981355 Posts, Post Types: Correct the check for term IDs to be queued for lazy-loading term meta.
This ensures that the `$term_ids` array in `wp_queue_posts_for_term_meta_lazyload()` (an indexed array not keyed by ID) does not contain duplicate values.

Props denishua, akabarikalpesh.
Fixes #52144.

git-svn-id: https://develop.svn.wordpress.org/trunk@49905 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-24 11:19:29 +00:00
Felix Arntz
e78d988aa2 Security, Site Health: Detect HTTPS support and encourage switching.
This changeset modifies the Site Health panel for HTTPS to provide more accurate recommendations based on whether the environment is already set up for HTTPS.

* Introduces `wp_is_using_https()` to check whether the site is configured to use HTTPS (via its Site Address and WordPress Address).
* Introduces `wp_is_https_supported()` to check whether the environment supports HTTPS. This relies on a cron job which periodically checks support using a loopback request.

Props Clorith, flixos90, miinasikk, westonruter.
Fixes #47577.


git-svn-id: https://develop.svn.wordpress.org/trunk@49904 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 19:11:20 +00:00
Aaron Jorbin
a0a03bfb6e Build/Test: Send Code Coverage reports to Codecov.
Help visualize and explore code coverage reports to avoid blunders.

Props desrosj, swissspidy.
Fixes #52141.



git-svn-id: https://develop.svn.wordpress.org/trunk@49903 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 18:17:51 +00:00
Sergey Biryukov
d2c8fae049 Tests: Correct @ticket references in tests/query/invalidQueries.php.
This ensures that running `phpunit --group 48556` works as expected.

Follow-up to [49900].

See #48556.

git-svn-id: https://develop.svn.wordpress.org/trunk@49902 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 15:04:54 +00:00
Sergey Biryukov
34d29e3c69 Twenty Nineteen: Correct @since version for twentynineteen_excerpt_more().
Follow-up to [49831].

See #46177.

git-svn-id: https://develop.svn.wordpress.org/trunk@49901 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 15:03:33 +00:00
Peter Wilson
6da93c4588 Query: Add bad path tests with invalid WP_Query parameters.
See #48556.


git-svn-id: https://develop.svn.wordpress.org/trunk@49900 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 03:03:56 +00:00
Peter Wilson
254131d009 Query: Revert post-type specific capability changes.
The modified checks of the `read_private_posts` capability could result in unexpected SQL queries when calling `WP_Query` with invalid parameters.

Reverts [49830], [49832] and [49833].
See #48556.


git-svn-id: https://develop.svn.wordpress.org/trunk@49899 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-23 03:01:00 +00:00
Jonathan Desrosiers
99cef3f100 Build/Test Tools: Remove the TravisCI configuration file.
In [49162], GitHub Action workflow configuration files were introduced to run all of Core’s automated testing with the intent to fully transition after some time was allowed for testing.

After two full months of testing, the time to finish this transition has come.

We thank TravisCI for testing the codebase through nearly 20 major and many more minor releases.

Fixes #52161. See #50401.

git-svn-id: https://develop.svn.wordpress.org/trunk@49876 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 20:59:16 +00:00
Jonathan Desrosiers
7b1e52b973 Bundled Themes: Bump the versions of Twenty Twenty-One and Twenty Nineteen.
New versions:

- Twenty Twenty-One: 1.1.
- Twenty Nineteen: 1.9.

Props poena.
Fixes #52160.

git-svn-id: https://develop.svn.wordpress.org/trunk@49873 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 18:17:55 +00:00
Jonathan Desrosiers
4ccfb0a084 Twenty Nineteen: Add the block-patterns tag to the appropriate SASS file.
This prevents the tag from being removed from `styles.css` when rebuilding the CSS.

Props danfarrow
Fixes #52159.

git-svn-id: https://develop.svn.wordpress.org/trunk@49872 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 18:13:21 +00:00
Kelly Choyce-Dwan
516c843734 Twenty Twenty-One: Set a maximum width on inputs.
Text inputs with a size attribute can end up longer than the screen width on small screens. A max-width of 100% keeps the inputs from breaking out of the container.

Props basscan, kjellr, poena, sabernhardt
Fixes #52083.



git-svn-id: https://develop.svn.wordpress.org/trunk@49870 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 16:51:55 +00:00
Jonathan Desrosiers
2c3c216752 Twenty Twenty-One: Improve strings found in post navigations for easier translating.
This change adjusts strings found within post navigations to ensure translators are provided the full context needed to properly translate.

Props poena, SergeyBiryukov, aristath.
Fixes #52047.

git-svn-id: https://develop.svn.wordpress.org/trunk@49866 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 16:13:51 +00:00
Jonathan Desrosiers
c7be6359b4 Twenty Twenty-One: Only load IE specific polyfills when actually using Internet Exploreer.
The `twenty-twenty-one-ie11-polyfills` script now has a `null` source, and the new `twenty-twenty-one-ie11-polyfills-asset` (which points to the actual `polyfills.js` source) will be loaded only if IE is detected by through the use of `wp_get_script_polyfill()`.

Because the original script name remains the same, this change is backwards compatible with any code registering `twenty-twenty-one-id11-polyfills` as a script dependency.

Props poena, ismail.elkorchi, peterwilsoncc
Fixes #52098.

git-svn-id: https://develop.svn.wordpress.org/trunk@49865 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 15:42:14 +00:00
Jonathan Desrosiers
acbbbd18b3 Twenty Twenty-One: Improve striped table styling in Dark Mode.
This change improves the display of table blocks with the “Stripes” style selected.

Previously, the text was not visible in striped rows when using Dark Mode.

Props ryelle, poena, melchoyce, celendesign, audrasjb.
Fixes #52129.

git-svn-id: https://develop.svn.wordpress.org/trunk@49864 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 15:00:49 +00:00
Sergey Biryukov
96555f949a Tests: Use shared post fixture in comment template tests.
This reinstates [49848], previously reverted in [49849], with the addition of `static` keyword for the `wpSetUpBeforeClass()` method, allowing the tests to pass on PHP 8.

Props peterwilsoncc.
See #51802.

git-svn-id: https://develop.svn.wordpress.org/trunk@49863 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-22 07:42:23 +00:00
John Blackbourn
7ef5a65f44 XML-RPC: Emit an appropriate HTTP status code when an error is returned in response to an XML-RPC request.
This most notably affects the response when XML-RPC is disabled or when the supplied username and password is incorrect.

Props ericmann

Fixes #48213


git-svn-id: https://develop.svn.wordpress.org/trunk@49862 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 20:21:12 +00:00
Jonathan Desrosiers
6c7bb97313 Twenty Twenty-One: Do not specify loading=“eager” for single post thumbnails.
While `loading=“eager”` is a supported alternative to omitting the attribute entirely, browsers follow the value of this attribute explicitly when specified.

Specifying `eager` would prevent the user from receiving any additional potential benefits implemented at the browser level, such as further mechanisms to automatically decide which elements to lazy-load.

Props flixos90, ryelle, poena.
Fixes #52139.

git-svn-id: https://develop.svn.wordpress.org/trunk@49860 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 18:37:47 +00:00
Sergey Biryukov
9027e7c489 Docs: Move locale filter documentation to the canonical place.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49859 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 18:24:53 +00:00
Sergey Biryukov
af5bab23ab Docs: Move sanitize_file_name filter documentation to the canonical place.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49858 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 18:23:21 +00:00
John Blackbourn
3202790820 Build/Test Tools: Don't mark the Tests_Cache::test_flush() test as risky when running the test suite with an object cache in place.
See #51802


git-svn-id: https://develop.svn.wordpress.org/trunk@49857 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 17:49:20 +00:00
John Blackbourn
51f9a54c9d XML-RPC: Fix a type error when requesting the menu field of a taxonomy.
Fixes #51493


git-svn-id: https://develop.svn.wordpress.org/trunk@49856 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 17:09:50 +00:00
Jonathan Desrosiers
b43ebc51e8 Twenty Twenty-One: Allow local anchor links to be used in primary navigation.
This adds some JavaScript to detect when an anchor link is clicked within the primary navigation on mobile devices and closes the menu before scrolling to the location on the page.

Props poena, macmanx, t-p.
Fixes #52006.

git-svn-id: https://develop.svn.wordpress.org/trunk@49854 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 15:03:40 +00:00
Greg Ziółkowski
3d43e57237 Blocks: Align with Gutenberg the name of generated asset handle for core blocks
Related Gutenberg PR: https://github.com/WordPress/gutenberg/pull/25220.

It aligns with the latest changes added by aristath to the Gutenberg project. As part of styles splitting for core blocks, there was a special pattern introduced for how style handles are named. Ideally, we would apply it to all blocks but there might be some backward compatibility considerations so I left the handling for non-core blocks unchanged.

Props aristath.
See #50328.



git-svn-id: https://develop.svn.wordpress.org/trunk@49850 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 11:37:30 +00:00
Peter Wilson
91a6444e50 Tests: Revert use of shared post fixture in comment template tests.
Removes code throwing a fatal in PHP 8.

Reverts [49848] from trunk.
See #51802.


git-svn-id: https://develop.svn.wordpress.org/trunk@49849 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 03:33:48 +00:00
Peter Wilson
9fa63c38ef Tests: Use shared post fixture in comment template tests.
See #51802.


git-svn-id: https://develop.svn.wordpress.org/trunk@49848 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 03:15:59 +00:00
Peter Wilson
c88cbe35e8 Query: Correct some coding standards after [49843].
See #44183


git-svn-id: https://develop.svn.wordpress.org/trunk@49847 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 02:54:43 +00:00
John Blackbourn
f141418a5f Query: Correct some coding standards after [49843].
See #44183

git-svn-id: https://develop.svn.wordpress.org/trunk@49846 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-21 00:31:54 +00:00
John Blackbourn
00dd0ba3b0 Upload: Introduce the {$action}_overrides filter that allows the overrides parameter for file uploads and file sideloads to be filtered.
The dynamic portion of the hook name, `$action`, refers to the post action.

Props iandunn, jakub.tyrcha, nacin, wonderboymusic, Mte90, johnbillion

Fixes #16849


git-svn-id: https://develop.svn.wordpress.org/trunk@49845 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-20 16:13:23 +00:00
John Blackbourn
99cfb00d13 Mail: Introduce a pre_wp_mail filter to allow short-circuiting the wp_mail() function without having to override the pluggable function.
Props DvanKooten, swissspidy, SergeyBiryukov, jtsternberg, ericlewis, Mte90, birgire, ayeshrajans

Fixes #35069


git-svn-id: https://develop.svn.wordpress.org/trunk@49844 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-20 15:07:23 +00:00
John Blackbourn
b04671e52f Query: Ensure the author archive title always shows the name of the queried author, regardless of whether there are results.
This brings the behaviour inline with the `<title>` element of the page which always shows the author name.

Props Tkama, subrataemfluence

Fixes #44183


git-svn-id: https://develop.svn.wordpress.org/trunk@49843 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-20 14:35:58 +00:00
Sergey Biryukov
a706d9e189 Docs: Use a canonical form of "knowledgeable" in readme.html.
Props shahinsid07, audrasjb.
Fixes #52125.

git-svn-id: https://develop.svn.wordpress.org/trunk@49842 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-20 12:56:42 +00:00
SergeyBiryukov
457b20ebce Docs: Fix typo in getCursorMarkerSpan() DocBlock in js/_enqueues/wp/editor/base.js.
Props voboghure, mukesh27, audrasjb.
Fixes #52128.

git-svn-id: https://develop.svn.wordpress.org/trunk@49841 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-20 12:30:02 +00:00
Sergey Biryukov
93c504a57a Twenty Ten: Correct $post_title variable name in loop-attachment.php.
Follow-up to [45609] / #47632.

Props sabernhardt.
Fixes #52121.

git-svn-id: https://develop.svn.wordpress.org/trunk@49840 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-19 20:43:49 +00:00
Sergey Biryukov
6bd2959638 Twenty Twenty-One: Clarify a sentence in readme.txt.
Props gkibria69.
Fixes #52120.

git-svn-id: https://develop.svn.wordpress.org/trunk@49838 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-19 20:34:44 +00:00
Sergey Biryukov
eddd3ae02d Docs: Update the reference to Appearance → Theme Editor admin menu item in the inline documentation.
Follow-up to [42685].

See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49837 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 15:44:26 +00:00
Jonathan Desrosiers
3109b32fc9 Build/Test Tools: Support the use of MariaDB in the local Docker environment.
In addition to MySQL, WordPress also supports MariaDB for databases. This makes changes to the local Docker environment to allow MariaDB to be used instead, if desired.

The `LOCAL_DB_TYPE` environment variable will now be used to determine which type of database container to use. This will default to `mysql`, but will also accept `mariadb`.

The `LOCAL_MYSQL` environment variable (which previously held the version of MySQL to use) has been replaced with the new, more generic `LOCAL_DB_VERSION` environment variable.

This change will make it possible to perform automated testing on a wider array of supported database types and versions.

Props davidbaumwald.
Fixes #51744. See #30462.

git-svn-id: https://develop.svn.wordpress.org/trunk@49836 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 15:27:33 +00:00
Jonathan Desrosiers
3723941a9c Build/Test Tools: Run the Ajax test group for multisite.
This will help catch issues with Ajax related functionality on multisite.

A few tests have also been marked as `skipWithMultisite()` as they require network admin level capabilities when performing the same operations on a multisite install.

Props garrett-eclipse, netweb.
Fixes #46567.

git-svn-id: https://develop.svn.wordpress.org/trunk@49835 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 14:38:28 +00:00
Jonathan Desrosiers
8bc7e0c0e5 Build/Test Tools: Generate a code coverage report using GitHub Actions.
This introduces a new GitHub Action workflow to generate a code coverage report when running the PHPUnit test suite as both a single and multisite install.

The workflow will run once per week on Sunday at 00:00 UTC.

For now, the reports are not submitted anywhere, but they will be uploaded to the workflow run as ZIP file artifacts where they will persist for 90 days.

Making code coverage reports more readily available will hopefully better highlight areas of Core with poor coverage, and encourage more contributors to help increase test coverage of those areas.

Props ocean90, johnbillion.
Fixes #52034.

git-svn-id: https://develop.svn.wordpress.org/trunk@49834 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 00:28:27 +00:00
Peter Wilson
c0f76faef8 Coding Standards: Minor fixes following [49830].
Fixes the fixes missed in [49832]. They are fixed now.

See #13509, #48968, #48556.


git-svn-id: https://develop.svn.wordpress.org/trunk@49833 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 00:26:21 +00:00
Peter Wilson
1930427d30 Coding Standards: Minor fixes following [49830].
See #13509, #48968, #48556.


git-svn-id: https://develop.svn.wordpress.org/trunk@49832 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-18 00:17:32 +00:00
Sergey Biryukov
5fa4c984fd Twenty Nineteen: Add "Continue reading" link for post excerpts.
This ensures that archive pages have a meaningful link text after the excerpts.

Props metalandcoffee, alex27, sabernhardt, mdrockwell, laurelfulford.
Fixes #46177.

git-svn-id: https://develop.svn.wordpress.org/trunk@49831 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-17 18:19:48 +00:00
Boone Gorges
f7ced48ad8 Query: Respect post-type specific capabilities when querying for multiple post types.
After this change, the relevant `read_private_posts` capability is checked for
each queried post type. This ensures that private posts appear in search and
archive queries for users who have the ability to view those posts.

Props leogermani.

Fixes #13509, #48968, #48556.

git-svn-id: https://develop.svn.wordpress.org/trunk@49830 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-17 16:15:38 +00:00