42876 Commits

Author SHA1 Message Date
Sergey Biryukov
f717424287 Build/Tests Tools: Restore [49491], accidentally reverted in [49566].
See #39210.

git-svn-id: https://develop.svn.wordpress.org/trunk@49570 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 17:13:56 +00:00
Sergey Biryukov
fd3ef484ec Build/Tests Tools: Restore [49535], accidentally reverted in [49566].
See #39210.

git-svn-id: https://develop.svn.wordpress.org/trunk@49569 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 17:06:48 +00:00
Anthony Burchell
d70214528e Media: Allow users to switch from media grid to list mode in media library.
Fixes issue where media modal would open when switching from grid to list mode.

Props mista-flo, mukesh27.

Fixes #51396.


git-svn-id: https://develop.svn.wordpress.org/trunk@49568 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 15:44:58 +00:00
Anthony Burchell
4afa79feed Media: Improve count in Media Library pagination.
Deleting all visible items on the last page of the media library previously left a blank page with no media items available. Using `wp_count_attachements` instead of `found_posts` solves the problem.

Props donsony, karmatosed, desrosj, mista-flo, justinahinon.

Fixes #39968.


git-svn-id: https://develop.svn.wordpress.org/trunk@49567 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 15:38:32 +00:00
Dominik Schilling
4006c07417 I18N: Revert [49236] for now to investigate alternative implementations.
See #39210, #51678, #26511.

git-svn-id: https://develop.svn.wordpress.org/trunk@49566 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 14:41:19 +00:00
Sergey Biryukov
e8e031d2dd Feeds: Register transient feed cache handler using the recommended method for SimplePie 1.3 or later.
This fixes a "Non-static method cannot be called statically" fatal error when calling `fetch_feed()` on PHP 8.

Follow-up to [21644], [21652], [22366], [22599].

Props dd32, afragen, Senning, markoheijnen, ComputerGuru, useStrict, Ipstenu, nacin, l3rady, HoaSi, NathanAtmoz, fabifott, jfoulquier, thefarlilacfield, subscriptiongroup, rogerlos, Mte90, mopsyd, dossy, stulab, MadtownLems, roikles, justlevine, joostdevalk, OptimizingMatters, hellofromTonya, bph, ayeshrajans, SergeyBiryukov.
Fixes #29204.

git-svn-id: https://develop.svn.wordpress.org/trunk@49565 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 14:34:33 +00:00
Sergey Biryukov
ea136a3af6 Coding Standards: Pass an empty string instead of null as the $replacement parameter to _deprecated_file().
Follow-up to [48327].

See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@49564 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 11:15:49 +00:00
Peter Wilson
8b2aa594e3 Canonical: Prevent ID enumeration of private post slugs.
Add check to `redirect_canonical()` to ensure the destination post is not using a private post status.

Props dd32, Denis-de-Bernardy, donmhico, helen, nacin, peterwilsoncc, pishmishy, TimothyBlynJacobs, tzafrir, Viper007Bond, whyisjake.
Fixes #5272.



git-svn-id: https://develop.svn.wordpress.org/trunk@49563 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-12 04:14:44 +00:00
Sergey Biryukov
fc29c9e623 I18N: Add trailing punctuation to some translator comments.
Follow-up to [49549].

See #51580.

git-svn-id: https://develop.svn.wordpress.org/trunk@49562 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-11 10:39:52 +00:00
Sergey Biryukov
98e774ee2e Docs: Clarify sprintf() usage for the before_widget argument of register_sidebar().
Follow-up to [49203], [49560].

See #19709.

git-svn-id: https://develop.svn.wordpress.org/trunk@49561 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-11 10:37:33 +00:00
Helen Hou-Sandi
9a14f55ace Widgets: Do not use wrapping container in the admin.
This is due to the new `before|after_sidebar` args, which are empty by default, but can introduce markup that causes admin JS to stop working.

Also adds documentation for the `sprintf()` on `before_sidebar`.

Props audrasjb, lpointet.
See #19709.


git-svn-id: https://develop.svn.wordpress.org/trunk@49560 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-10 20:38:59 +00:00
Helen Hou-Sandi
2a7d1e2394 Editor: Display short description from block directory in results.
Props dd32, ryelle.
Fixes #51212.


git-svn-id: https://develop.svn.wordpress.org/trunk@49559 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-10 20:24:38 +00:00
Sergey Biryukov
bde89301fd Help/About: Add Site Health Status dashboard widget to the Help → Content tab.
Reorder the items in the help tab to align with their default position on the Dashboard screen.

Follow-up to [47063], [47300].

Props nlpro.
Fixes #51745.

git-svn-id: https://develop.svn.wordpress.org/trunk@49558 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-10 19:03:12 +00:00
Sergey Biryukov
4a5c2857da TinyMCE: Update to 4.9.11.
Changelog:
https://www.tiny.cloud/docs-4x/changelog/#version4911july132020
https://github.com/tinymce/tinymce/blob/4.x/changelog.txt

A full list of changes in this update can be found on GitHub:
https://github.com/tinymce/tinymce/compare/4.9.10...4.9.11

See #51051.

git-svn-id: https://develop.svn.wordpress.org/trunk@49557 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-10 10:42:04 +00:00
Andrew Ozz
60516115ed Tests QUnit: Remove restriction on running the TinyMCE Textpattern WP plugin tests in PhantomJS.
Props @desrosj.
Fixes #42009.

git-svn-id: https://develop.svn.wordpress.org/trunk@49556 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-10 09:16:53 +00:00
Anthony Burchell
3d583b8c67 Media: Removes duplicate alignment fix for browser uploader.
See #41648


git-svn-id: https://develop.svn.wordpress.org/trunk@49555 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 23:41:01 +00:00
Jonathan Desrosiers
92c6723c24 Tests: Remove duplicate fields key in WP_Query test.
Introduced in [46188].

See #51344.

git-svn-id: https://develop.svn.wordpress.org/trunk@49554 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 23:39:25 +00:00
Anthony Burchell
98a0e0eeed Media: Adjusts alignment of file name text in browser uploader.
Sets a defined size for text alongside the media browser uploader button fixing alignment on popular browsers.

Props krupajnanda, mikeschroder, aaroncampbell, lucagrandicelli, andraganescu, samful, sabernhardt, andystitt829, kburgoine.
Fixes #41648


git-svn-id: https://develop.svn.wordpress.org/trunk@49553 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 23:32:21 +00:00
Helen Hou-Sandi
6411c0953c Feeds: Don't treat media URLs with fragments as unique for enclosures.
Props archduck, dshanske.
Fixes #47421.


git-svn-id: https://develop.svn.wordpress.org/trunk@49552 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 20:26:18 +00:00
Jonathan Desrosiers
a85803a7ba Build/Test Tools: Remove PHP >= 5.3 check.
WordPress no longer supports PHP < 5.6.20. This check is no longer necessary.

Fixes #51737.

git-svn-id: https://develop.svn.wordpress.org/trunk@49551 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 19:40:41 +00:00
Anthony Burchell
907936209a Media: Adjust box-sizing for audio players.
Fix cropped container around playhead time in audio player.

Props ravipatel, sabernhardt, audrasjb, SergeyBiryukov, 
Fixes #51685


git-svn-id: https://develop.svn.wordpress.org/trunk@49550 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 19:32:16 +00:00
Timothy Jacobs
d519284b5c App Passwords: Further accessibility improvements.
- Add a label to the readonly password input.
- Handle focus loss after revoking app passwords.
- Handle focus loss after dismissing notices.
- Mark app name as `aria-required`.
- Use `aria-label` for detailed revoke button text instead of `title`.
- Use `-1` for `tabindex` instead of `0`.

Props alexstine, afercia, sabernhardt, audrasjb, joedolson, TimothyBlynJacobs.
Fixes #51580.


git-svn-id: https://develop.svn.wordpress.org/trunk@49549 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 18:03:57 +00:00
Jonathan Desrosiers
63db886240 Build/Test Tools: Clean up the new contributor welcome message.
Props ocean90, jeffpaul.
See #50401.

git-svn-id: https://develop.svn.wordpress.org/trunk@49548 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 17:29:21 +00:00
Sergey Biryukov
4eee0d2fb7 Tests: Use assertSame() in some newly introduced tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [48937], [48939], [48940], [48944].

See #38266.

git-svn-id: https://develop.svn.wordpress.org/trunk@49547 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 15:43:14 +00:00
Sergey Biryukov
2e01c76841 Coding Standards: Use consistent formatting for error messages in WP_Image_Editor_Imagick::write_image() and ::strip_meta().
See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@49546 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 15:33:51 +00:00
Sergey Biryukov
1bba686ca0 General: Set svn:eol-style for some new files in phpunit/includes.
Follow-up to [48845], [49037], [49226], [49230].

See #51113.

git-svn-id: https://develop.svn.wordpress.org/trunk@49545 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 15:23:02 +00:00
John Blackbourn
8e25b92b63 Docs: Docblock corrections relating to WP_Post objects.
See #51373, #50768


git-svn-id: https://develop.svn.wordpress.org/trunk@49544 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 15:13:56 +00:00
Sergey Biryukov
062db1e092 Tests: Remove empty export directory.
Follow-up to [30518], [31253], [34328].

See #51344.

git-svn-id: https://develop.svn.wordpress.org/trunk@49543 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 15:09:52 +00:00
John Blackbourn
e4f47125ab Media: Restore the ability of WP_Image_Editor_Imagick->save() to create a missing directory when needed.
Props eemitch, mikeschroder, hellofromTonya, p00ya, johnbillion

Fixes #51665


git-svn-id: https://develop.svn.wordpress.org/trunk@49542 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 13:16:54 +00:00
Sergey Biryukov
6b76c5222d I18N: Merge duplicate "Column" strings, remove unnecessary context.
Props ramiy, justinahinon, garrett-eclipse, audrasjb.
Fixes #47259.

git-svn-id: https://develop.svn.wordpress.org/trunk@49541 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 11:15:06 +00:00
Sergey Biryukov
52f6f7b64f Coding Standards: Adjust formatting in WP_Block::render() for better readability.
Follow-up to [49310], [49539].

See #51606.

git-svn-id: https://develop.svn.wordpress.org/trunk@49540 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 10:59:06 +00:00
Sergey Biryukov
aac637dcdc Text Changes: Unify various "Back to..." vs. "Return to..." vs. "Go to..." strings.
Standardize on "Go to..." as a more appropriate option for most cases.

Props garrett-eclipse, kharisblank, audrasjb, ramiy, valentinbora.
Fixes #47235.

git-svn-id: https://develop.svn.wordpress.org/trunk@49539 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-09 10:51:52 +00:00
Sergey Biryukov
31831c74d9 Networks and Sites: Assign the array of site or network data returned from filters to the respective class property:
* The array of network data returned from the `networks_pre_query` filter is assigned to the `networks` property of the current `WP_Network_Query` instance.
* The array of site data returned from the `sites_pre_query` filter is assigned to the `sites` property of the current `WP_Site_Query` instance.

This avoids the performance overhead of calling `WP_Network_Query::get_networks()` or `WP_Site_Query::get_sites()` twice: first when creating the object instance, then to retrieve the filtered results.

This also makes the filters a bit more consistent with other similar filters, e.g. `posts_pre_query`, `terms_pre_query`, `comments_pre_query`, or `users_pre_query`.

Follow-up to [46086], [48990].

Props yakimun, spacedmonkey.
Fixes #51333.

git-svn-id: https://develop.svn.wordpress.org/trunk@49538 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-08 11:45:36 +00:00
Sergey Biryukov
8f86eb9550 Site Health: Validate the test result data format in JS before using it.
This will discard any invalid responses instead of causing fatal errors.

It also makes badges optional, on the same basis as actions are optional. They are expected, but there may be situations where they are not present.

Props Clorith, dogwithblog, kraftbj, whyisjake, SergeyBiryukov.
Fixes #50145.

git-svn-id: https://develop.svn.wordpress.org/trunk@49537 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-08 09:50:07 +00:00
Sergey Biryukov
0ecd258cf1 REST API: Use _n() in some error messages for proper plural forms support.
Follow-up to [47923], [49053].

Props audrasjb, tobifjellner, TimothyBlynJacobs, SergeyBiryukov.
Fixes #51727.

git-svn-id: https://develop.svn.wordpress.org/trunk@49536 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-07 21:57:54 +00:00
Sergey Biryukov
f2302a3112 Build/Test Tools: Check if all the required PHP extensions are loaded before running the test suite.
Add the GD extension as a hard requirement.

This improves the reliability of the test suite and ensures that if the test infrastructure changes in the future and a platform requirement such as GD accidentally gets removed, the tests fail with an appropriate error message.

Follow-up to [48592].

Props ayeshrajans, jrf, johnbillion.
Fixes #50640.

git-svn-id: https://develop.svn.wordpress.org/trunk@49535 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-07 13:18:24 +00:00
Timothy Jacobs
a104c26283 App Passwords: Bump database version to flush rewrite rules.
Application Passwords introduced a new Rewrite Rule to handle the Authorization header on certain systems. This bumps the database version so the change is applied to sites upon upgrading to 5.6.

Fixes #51723.


git-svn-id: https://develop.svn.wordpress.org/trunk@49534 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 22:13:41 +00:00
Sergey Biryukov
da1763cf5b Docs: Add a @see reference to esc_url() from esc_url_raw().
Follow-up to [49512].

See #50585.

git-svn-id: https://develop.svn.wordpress.org/trunk@49513 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 14:14:50 +00:00
Sergey Biryukov
73d785a307 Docs: Improve return value description for esc_url().
Add a reference to `esc_url()` from `esc_url_raw()` return value description.

Props stevenlinx, audrasjb, helen.
Fixes #50585.

git-svn-id: https://develop.svn.wordpress.org/trunk@49512 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 14:01:06 +00:00
Sergey Biryukov
c95968a640 Bundled Themes: Correct list block alignment in editor styles.
Additionally:
* Indent nested lists in list and category blocks.
* Match ordered and unordered indentation for the classic block's lists.

This applies to:
* Twenty Ten
* Twenty Eleven
* Twenty Thirteen
* Twenty Fourteen
* Twenty Fifteen
* Twenty Sixteen
* Twenty Seventeen

Props sabernhardt, amolv, kjellr, audrasjb, francina.
Fixes #51157.

git-svn-id: https://develop.svn.wordpress.org/trunk@49511 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 11:51:12 +00:00
Sergey Biryukov
1e06d3511d Twenty Twenty: Correctly indent nested unordered lists in RTL editor styles.
Props sabernhardt.
Fixes #51574.

git-svn-id: https://develop.svn.wordpress.org/trunk@49510 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-06 11:36:14 +00:00
Sergey Biryukov
b4a488b650 Docs: Fix typo in a comment in Walker::display_element().
Props david.binda, sabernhardt.
Fixes #51713.

git-svn-id: https://develop.svn.wordpress.org/trunk@49509 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-05 18:44:48 +00:00
Sergey Biryukov
31af0afd4f Twenty Thirteen: Correct alignment of blocks inside a full-width or wide-width group block.
Props sabernhardt.
Fixes #51440.

git-svn-id: https://develop.svn.wordpress.org/trunk@49508 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-05 15:03:41 +00:00
Sergey Biryukov
691408de7f Twenty Twenty: Correct heading blocks alignment in editor styles.
This explicitly sets top and bottom margins instead of defining all four sides in shorthand notation.

Props sabernhardt, Lumne.
Fixes #51148.

git-svn-id: https://develop.svn.wordpress.org/trunk@49507 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-05 15:00:18 +00:00
Sergey Biryukov
33111495b2 Docs: Improve documentation for WP_Query::is_archive() per the documentation standards.
Follow-up to [49504].

See #50545.

git-svn-id: https://develop.svn.wordpress.org/trunk@49506 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-05 09:42:49 +00:00
Sergey Biryukov
e38410c2fd Docs: Consistently place @see tags after @since in WP_Query methods, per the documentation standards.
See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@49505 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-05 09:40:38 +00:00
Helen Hou-Sandi
7a16c4d580 Improve documentation for is_archive().
Props stevenlinx.
Fixes #50545.


git-svn-id: https://develop.svn.wordpress.org/trunk@49504 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-04 17:01:28 +00:00
Sergey Biryukov
da97d6779a Docs: Change the @since entry for template and template_lock post type arguments to 5.0.0.
These arguments were introduced with the initial block editor, but not documented previously.

Follow-up to [49495].

Props TimothyBlynJacobs.
See #46261.

git-svn-id: https://develop.svn.wordpress.org/trunk@49496 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-04 02:45:26 +00:00
Sergey Biryukov
1d2ecc5b6e Docs: Add documentation for the template_lock argument to register_post_type().
Add a `@since` entry for `template` and `template_lock` arguments.

Follow-up to [49041], [49492], [49494].

See #46261.

git-svn-id: https://develop.svn.wordpress.org/trunk@49495 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-04 02:30:24 +00:00
Sergey Biryukov
4d30852307 Docs: Adjust documentation for some WP_Post_Type properties:
* Split the summary for `$template` per the documentation standards. The summary should be a single sentence.
* Change the type for `$template_lock` to `string|false`, to clarify that `true` is not supported.
* Fix typo in `$delete_with_user` description, adjust for better readability.

Follow-up to [49041], [49492].

See #46261.

git-svn-id: https://develop.svn.wordpress.org/trunk@49494 602fd350-edb4-49c9-b593-d223f7449a82
2020-11-04 02:28:55 +00:00