Commit Graph

18123 Commits

Author SHA1 Message Date
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
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
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
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
Jonathan Desrosiers
a100f27473 Twenty Twenty-One: Correct @since inline documentation tags.
Previously, `1.0.0` was used for the version. This is inconsistent with the versioning used in the other default themes, which use use X.X and not X.X.X.

This change corrects all `1.0.0` occurrences to `1.0`, and adds the additional context of `Twenty Twenty-One` to avoid confusion with `WordPress 1.0`.

Props SergeyBiryukov, poena.
Fixes #51958.

git-svn-id: https://develop.svn.wordpress.org/trunk@49826 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-17 14:55:37 +00:00
Jonathan Desrosiers
3d9c9b9447 Twenty Twenty-One: Make text within code blocks readable in Dark Mode.
This change ensures that the primary text color specific to Dark Mode is used instead of the one specified for normal mode. The latter is not legible in Dark Mode.

Props slaFFik, poena, mukesh27, justinahinon.
Fixes #51985.

git-svn-id: https://develop.svn.wordpress.org/trunk@49825 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-17 14:20:22 +00:00
Jonathan Desrosiers
a35f9fda65 Twenty Twenty-One: Prevent <iframe> embeds from being too narrow.
This fixes an issue where `<iframe>` embeds were being pushed to the side of the screen and compressed to the point of being unusable.

Props helen, mukesh27, poena, thorlentz.
Fixes #52004.

git-svn-id: https://develop.svn.wordpress.org/trunk@49823 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-17 14:03:37 +00:00
Felix Arntz
8505c99a1b Media: Enable lazy-loading of iframes by adding the loading="lazy" attribute to iframe tags on the front-end.
* Expands the capabilities of `wp_filter_content_tags()` to add the attribute to iframe tags if enabled.
* Modifies the default behavior of `wp_lazy_loading_enabled()` so that it returns `true` for `iframe` tags.
* Introduces a `wp_iframe_tag_add_loading_attr()` function.
* Introduces a `wp_iframe_tag_add_loading_attr` filter.

Like for images, the attribute is only added to iframes which have both `width` and `height` specified (see related #50367).

Props azaozz, flixos90, westonruter.
Fixes #50756.


git-svn-id: https://develop.svn.wordpress.org/trunk@49808 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-16 21:17:24 +00:00
Andrew Ozz
3f12f0e77c Editor: Fix improper triggering of the "Are you sure" prompt when navigating away from the old, "classic" Edit Post screen and there are no changes. Was triggered when there is an instance of TinyMCE in the Excerpt postbox.
Props rodrigosprimo, jonathanstegall, kevin940726, azaozz.
Fixes #52038.

git-svn-id: https://develop.svn.wordpress.org/trunk@49807 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-16 15:23:35 +00:00
Ian Dunn
2ea3033c0d Feed: Replace join() with implode() for safety.
Canonical functions should be used instead of aliases, because aliases can be deprecated or removed withough much notice. See r49193.

Props SergeyBiryukov.
See #51056.


git-svn-id: https://develop.svn.wordpress.org/trunk@49805 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-16 14:03:56 +00:00
Andrew Ozz
55c1f81e49 Media: Fix the template for the "Align" and "Link To" fields in the media modal when inserting an image from URL.
Props noisysocks, mukesh27.
Fixes #52065.

git-svn-id: https://develop.svn.wordpress.org/trunk@49804 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-16 12:43:44 +00:00
Ian Dunn
4595dcf7f9 Feed: Merge multiple header values to avoid fatal error.
When SimplePie parses HTTP headers, it combines multiple values for the same header into a comma-separated string. `WP_SimplePie_File` overrides the parsing, but was leaving them as an array instead.

That lead to a fatal error in PHP 8, because other parts of the codebase ended up passing an array to a function that expected a string.

Props david.binda, litemotiv, inc2734, NicolasKulka, hellofromTonya, mbabker, skithund, SergeyBiryukov, desrosj, timothyblynjacobs.
Fixes #51056. See #51956.



git-svn-id: https://develop.svn.wordpress.org/trunk@49803 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-16 00:49:32 +00:00
John Blackbourn
378c2058a0 Docs: Correct the documentation for the map_meta_cap() function and its filter.
See #51800


git-svn-id: https://develop.svn.wordpress.org/trunk@49802 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-15 22:16:03 +00:00
Sergey Biryukov
34dff0e768 Twenty Twenty-One: Fix typos in some inline comments.
Props manzurahammed, mukesh27.
Fixes #52071.

git-svn-id: https://develop.svn.wordpress.org/trunk@49801 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-15 13:26:07 +00:00
Kelly Choyce-Dwan
8eda4984e1 Twenty Twenty-One: Bring back PostCSS config.
Twenty Twenty-One uses PostCSS to convert the custom properties for Internet Explorer. Without a config file, the postcss command does nothing, causing issues in IE. This brings back the config from GitHub, which replaces all custom properties with the default values.

Props t-p, poena.
Fixes #52040.



git-svn-id: https://develop.svn.wordpress.org/trunk@49800 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-14 16:47:37 +00:00
Sergey Biryukov
6bd675869c Twenty Twenty-One: Correct the DocBlock for map-deep-set() Sass function.
Props mukesh27.
Fixes #52064.

git-svn-id: https://develop.svn.wordpress.org/trunk@49799 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-14 15:20:33 +00:00
Sergey Biryukov
ce8da7e6e3 Twenty Twenty-One: Use a more specific link for Dark Mode instructions.
Make both instances of the link translatable, for consistency.

Props engahmeds3ed, justinahinon.
Fixes #52010.

git-svn-id: https://develop.svn.wordpress.org/trunk@49798 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-13 18:38:25 +00:00
Sergey Biryukov
11e82a441b Twenty Twenty-One: Fix typos in some inline comments.
Props tanvirul, mukesh27.
Fixes #52042.

git-svn-id: https://develop.svn.wordpress.org/trunk@49795 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-12 15:01:52 +00:00
Sergey Biryukov
5928678ab9 Twenty Twenty-One: Correct version in file-header.scss.
Fixes #52044.

git-svn-id: https://develop.svn.wordpress.org/trunk@49794 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-12 14:55:27 +00:00
Kelly Choyce-Dwan
f4f7afb65a Twenty Nineteen: Add images for use in block patterns.
The block patterns were added in #51099, but the images were not included in the commit. This adds the images to the expected folder.

Props transl8or, mukesh27.
Fixes #51996.



git-svn-id: https://develop.svn.wordpress.org/trunk@49793 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-11 16:53:12 +00:00
Sergey Biryukov
c167a9425c Docs: Document the usage of $wpdb global in WP_Query::get_posts() and ::set_found_posts().
Props jontyravi.
Fixes #52027.

git-svn-id: https://develop.svn.wordpress.org/trunk@49792 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-11 16:51:15 +00:00
Jonathan Desrosiers
24f6120e90 Build/Test Tools: Update several NPM packages.
These were updated using `npm audit fix`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@49791 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-11 14:03:50 +00:00
John Blackbourn
37f8276a18 Docs: Various docblock improvements.
See #51800


git-svn-id: https://develop.svn.wordpress.org/trunk@49790 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-10 23:57:29 +00:00
John Blackbourn
81b89682c3 Docs: Various docblock corrections.
See #51800


git-svn-id: https://develop.svn.wordpress.org/trunk@49789 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-10 23:51:52 +00:00
John Blackbourn
6267e412f1 Upgrade/Install: Remove a duplicate description for the upgrader_overwrote_package action.
See #51800, #9757


git-svn-id: https://develop.svn.wordpress.org/trunk@49788 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-10 23:36:11 +00:00
John Blackbourn
f92fdb1f78 Docs: Fix some docblock issues introduced in 5.6.
See #51800


git-svn-id: https://develop.svn.wordpress.org/trunk@49787 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-10 23:25:26 +00:00
Sergey Biryukov
fe1a25f89f Docs: Fix typo in some DocBlocks.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49785 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-10 18:10:12 +00:00
Helen Hou-Sandi
83d9b86dc6 Update $_old_files for 5.6.
See #39943.


git-svn-id: https://develop.svn.wordpress.org/trunk@49774 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-08 21:48:22 +00:00
Timothy Jacobs
ee7ba3a9f0 App Passwords: Ensure redirection description is shown on mobile devices.
Props #core.
Fixes #51970.


git-svn-id: https://develop.svn.wordpress.org/trunk@49772 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-08 20:26:12 +00:00
Kelly Choyce-Dwan
804db75453 Help/About: Use CDN URLs for About page images.
See #51415.



git-svn-id: https://develop.svn.wordpress.org/trunk@49770 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-08 17:00:37 +00:00
Sergey Biryukov
e328e26de3 Docs: Fix typo in references to WP_Error in some DocBlocks.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49769 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-08 11:49:23 +00:00
Timothy Jacobs
34e25034dd App Passwords: Store the "in use" option in the main network options.
Whether App Passwords are being used is a global featurel, not a per-network feature. This fixes issues on Multi Network installs if App Passwords are used on a different network from where they were created.

Props spacedmonkey.
Fixes #51939.
See [49752].


git-svn-id: https://develop.svn.wordpress.org/trunk@49764 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-07 15:57:03 +00:00
Sergey Biryukov
ae9911c355 Bundled Themes: Bump theme versions ahead of WordPress 5.6.
The following theme versions will be released in coordination with WordPress 5.6:

* Twenty Ten: 3.2
* Twenty Eleven: 3.6
* Twenty Twelve: 3.3
* Twenty Thirteen: 3.2
* Twenty Fourteen: 3.0
* Twenty Fifteen: 2.8
* Twenty Sixteen: 2.3
* Twenty Seventeen: 2.5
* Twenty Nineteen: 1.8
* Twenty Twenty: 1.6
* Twenty Twenty-One: 1.0

Props peterwilsoncc, hareesh-pillai, dkarfa, sabernhardt, poena, aristath, SergeyBiryukov.
Fixes #51919.

git-svn-id: https://develop.svn.wordpress.org/trunk@49763 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-07 15:53:19 +00:00
Sergey Biryukov
175b23e00a Twenty Twenty-One: Use esc_url() for the WordPress.org link in footer.php.
Props mukesh27, poena.
Fixes #51954.

git-svn-id: https://develop.svn.wordpress.org/trunk@49762 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-07 14:15:24 +00:00
Sergey Biryukov
92f14987fb Twenty Twenty-One: Use consistent HTML comments after closing HTML tags.
Follow-up to [45209] for other bundled themes.

Props arcangelini, audrasjb.
Fixes #51950.

git-svn-id: https://develop.svn.wordpress.org/trunk@49761 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-07 14:05:44 +00:00
Sergey Biryukov
f51bcff2f1 Twenty Twenty-One: Fix the nesting of the main element.
The `main` element must not appear as a descendant of the `section` element. Correct markup is the first requirement to make user agents and assistive technologies work properly.

Changes the `<section>` element that was wrapping the `<main>` element to a `<div>`.

Follow-up to [45942] for Twenty Nineteen.

Props albertomake, poena.
Fixes #51944.
}}}

git-svn-id: https://develop.svn.wordpress.org/trunk@49759 602fd350-edb4-49c9-b593-d223f7449a82
2020-12-06 16:20:10 +00:00