Commit Graph

41685 Commits

Author SHA1 Message Date
Ella van Durpe
33438e0658 Editor: Update default block categories
See https://github.com/WordPress/gutenberg/pull/19279.

Props aduth, gziolo.
Fixes #50278.


git-svn-id: https://develop.svn.wordpress.org/trunk@48119 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-22 14:05:36 +00:00
Greg Ziółkowski
9b2b8cad20 Editor: Remove default "layout" block attribute from WP_Block_Type::get_attributes
The merging behavior which assigns the `layout` attribute in `WP_Block_Type` gets removed.

Props aduth, TimothyBlynJacobs.
Fixes #50257.



git-svn-id: https://develop.svn.wordpress.org/trunk@48118 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-22 12:20:20 +00:00
Greg Ziółkowski
699c8557f9 Blocks: Add context fields to WP_Block_Type
New block context related fields were added as part of https://github.com/WordPress/gutenberg/pull/22686. This changest backports them to WP_Block_Type class.

Props aduth, spacedmonkey, mcsf, epiqueras.
Fixes #47656.  



git-svn-id: https://develop.svn.wordpress.org/trunk@48117 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-22 10:24:42 +00:00
afercia
8e0e6bc3aa Accessibility: Improve readability by removing unnecessary italic font style.
Continues the removal of italic text where unnecessary or where used on whole lines and big chunks of text.
Removes italic type from:
- all the `howto` text e.g. the "Tags" meta box, the "Featured image" meta box, the "Insert/edit link" modal dialog in the Classic Editor 
- the Taxonomies list pages
- the edit Taxonomies pages
- the Menus page
- the Settings pages

Props audrasjb.
See #47327.


git-svn-id: https://develop.svn.wordpress.org/trunk@48116 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-21 18:01:02 +00:00
Andrea Fercia
98d22d5d3d I18N: Restore the "Error:" prefix for error messages.
Partially reverts [48059] as there's no full consensus on the removal of the text prefix. Further actions should be taken to improve consistency and accessibility of the admin notices. Keeps some improvements to the translatable strings from [48059].

Fixes #47656.


git-svn-id: https://develop.svn.wordpress.org/trunk@48115 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-21 13:58:46 +00:00
Sergey Biryukov
e8176a19e2 Posts, Post Types: Avoid a PHP warning when get_the_content() is called outside of the loop.
This ensures that `$pages` and other globals are only used after they have been set up in `setup_postdata()`.

Follow-up to [44941].

Props tessawatkinsllc, dontdream, spacedmonkey, squarecandy, davidbaumwald, SergeyBiryukov.
Fixes #47824. See #42814.

git-svn-id: https://develop.svn.wordpress.org/trunk@48114 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-21 10:34:35 +00:00
Sergey Biryukov
a7264f196d Posts, Post Types: Simplify test_setup_postdata_loop().
The important part here is calling `the_content()` after setting up post data for another post without updating global `$post`.

The `foreach()` loop is not necessary.

Follow-up to [UT1289].

See #47824, #24330.

git-svn-id: https://develop.svn.wordpress.org/trunk@48113 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-21 10:28:52 +00:00
Timothy Jacobs
0c1a49c728 REST API: Add "Link" to the list of exposed cors headers.
Currently, only the X-WP-Total and X-WP-TotalPages headers are exposed which means that clients have to manually construct the URL to implement pagination instead of using the "prev" and "next" Links.

Additionally, a filter "rest_exposed_cors_headers" is introduced to make it simpler for plugins to expose additional headers.

Props Toro_Unit, ayeshrajans.
Fixes #50369.


git-svn-id: https://develop.svn.wordpress.org/trunk@48112 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 23:54:32 +00:00
Sergey Biryukov
8909a914c7 Coding Standards: Replace echo sprintf() with printf().
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48111 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 13:16:45 +00:00
Sergey Biryukov
738144bd05 Docs: Remove extra spaces from @param tags.
Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48110 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:57:00 +00:00
Sergey Biryukov
cdf3431ac9 Docs: Remove @staticvar tags from core.
The tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.

Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs.

Props alishanvr, jrf.
Fixes #50426.

git-svn-id: https://develop.svn.wordpress.org/trunk@48109 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:38:55 +00:00
Sergey Biryukov
b28cafc333 Docs: Correct DocBlock placement for allow_subdirectory_install filter.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48108 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:21:30 +00:00
Sergey Biryukov
fd652234c4 Docs: Miscellaneous DocBlock corrections for email filters in wp-includes/user.php.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48107 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:20:24 +00:00
Sergey Biryukov
c682da9190 Docs: Use a hyphen with the "non" prefix in a more consistent way.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48106 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:13:58 +00:00
Sergey Biryukov
e27ad0f007 Docs: Miscellaneous DocBlock corrections for plugin and theme installation and updates.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48105 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:12:39 +00:00
Sergey Biryukov
5e2ef3d937 Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48104 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:00:07 +00:00
Sergey Biryukov
7179459b79 Docs: Synchronize and correct the documentation for wp_nav_menu() arguments in bundled themes.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48103 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 11:20:25 +00:00
Sergey Biryukov
806c94fe0a Docs: Remove an empty line between @param and @return tags, per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48102 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 11:16:12 +00:00
John Blackbourn
bcdaf86a42 Docs: Fix some documentation errors in bundled themes.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48101 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 07:22:31 +00:00
John Blackbourn
1db25e3d38 Docs: Remove unnecessary variables names from @return tags.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48100 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 22:53:54 +00:00
John Blackbourn
b34efdd38a Docs: Misc improvements to inline docs.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48099 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 22:25:47 +00:00
John Blackbourn
4b1b525f31 Docs: Corrections and improvements to inline docs related to XML sitemaps.
See #50117, #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48098 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 22:24:14 +00:00
John Blackbourn
c7f03167a7 Docs: Corrections and improvements to inline docs related to plugin and theme auto-updates.
See #50052, #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48097 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 22:15:36 +00:00
Sergey Biryukov
44def76306 Build/Test Tools: Replace the banner text from wp-emoji-loader.min.js in formatting.php during build process.
This ensures that `/*! This file is auto-generated */` comment is not included on front end as part of the inline Emoji detection script.

Follow-up to [41271], [46589].

Props superpoincare, SergeyBiryukov.
Fixes #49861.

git-svn-id: https://develop.svn.wordpress.org/trunk@48096 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 22:06:28 +00:00
Sergey Biryukov
82cfc3f62d Help/About: Move "Learn more: Auto-updates documentation" link about "Support", for consistency with other screens.
Follow-up to [48062].

See #50215.

git-svn-id: https://develop.svn.wordpress.org/trunk@48095 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 21:12:34 +00:00
Sergey Biryukov
17354cb06b Sitemaps: Rename the wp_sitemaps_is_enabled filter to wp_sitemaps_enabled.
This makes it more consistent with the other filters of the similar purpose.

Props arpitgshah.
Fixes #50428. See #50117.

git-svn-id: https://develop.svn.wordpress.org/trunk@48094 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 17:58:17 +00:00
Sergey Biryukov
7bf879af49 Docs: Document globals in WP_Sitemaps_* classes the same way they are documented in the rest of core.
See #49572, #50117.

git-svn-id: https://develop.svn.wordpress.org/trunk@48093 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 17:54:56 +00:00
Andrew Ozz
52ce85d0a5 Plugins and Themes Auto-Updates:
- Fix displaying of errors on the Themes screen.
- Correct the classes used for the error messages, and use `notice-alt` as notices are mostly shown on a white background.

Props afercia, azaozz.
Fixes #50405.

git-svn-id: https://develop.svn.wordpress.org/trunk@48092 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 16:49:58 +00:00
desrosj
65bc801eba Docs: Add missing return type for _remove_theme_support().
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48091 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 14:44:02 +00:00
Sergey Biryukov
19a99901e1 Filesystem API: Expicitly set directory permissions in WP_Filesystem_SSH2::mkdir().
This ensures the permissions are correct after a directory is created with `ssh2_sftp_mkdir()`, which appears to be affected by system `umask` settings.

Props bbrdaric.
Fixes #49218.

git-svn-id: https://develop.svn.wordpress.org/trunk@48090 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 10:36:05 +00:00
Sergey Biryukov
d4f4f4232c Coding Standards: Add some space around control structures in WP_Filesystem_* classes for consistency and better readability.
Additionally, synchronize `$tempfile` and `$temphandle` variable names in `WP_Filesystem_FTPext` and `WP_Filesystem_ftpsockets`.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48089 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 10:34:26 +00:00
Jake Spurlock
13614f7dc9 Privacy: Revert use relative paths for exported personal data.
Tests need to be updated to pass.

See: #44038.

Unprops: whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48088 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 23:00:31 +00:00
Jake Spurlock
634a3542d1 Privacy: Use relative paths for exported personal data.
Ensures back-compat while moving to paths off of the `/exports` directory.

Fixes: #44038.

Props: allendav, mrTall, desrosj, garrett-eclipse, cameronamcintyre, nmenescardi, xkon, whyisjake. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48087 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 21:38:51 +00:00
Adam Silverstein
a1fd329682 Formatting: new filter safecss_filter_attr_allow_css on css parts.
Enables developers to determine whether a section of CSS should be allowed or discarded. By default, the value will be false if the part contains \ ( & } = or comments. Returning true allows the CSS part to be included in the output.

Replaces the `safe_style_disallowed_chars` filter introduced in r47891.

Props azaozz.
Fixes #37134.



git-svn-id: https://develop.svn.wordpress.org/trunk@48086 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 20:59:43 +00:00
Sergey Biryukov
901d9c69f9 Docs: Add missing $user_data parameter name to lostpassword_post and lostpassword_errors filter DocBlocks.
Follow-up to [48084].

See #49521, #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48085 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 20:27:48 +00:00
Sergey Biryukov
f31a966c9f Login and Registration: Introduce lostpassword_errors filter in retrieve_password() for errors encountered on a password reset request.
This complements the `registration_errors` filter in `register_new_user()`.

Props wpdo5ea, dilipbheda.
Fixes #49521.

git-svn-id: https://develop.svn.wordpress.org/trunk@48084 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 20:22:16 +00:00
Sergey Biryukov
d6b5fbf9ba Coding Standards: Use strict comparison for JS fragment in wp-admin/admin-header.php.
Props subrataemfluence.
Fixes #45810.

git-svn-id: https://develop.svn.wordpress.org/trunk@48083 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 20:06:42 +00:00
Sergey Biryukov
95ca14cf16 Administration: Combine the styles for <p> and .wp-die-message, instead of duplicating.
This brings some consistency with `_default_wp_die_handler()`, where they are already combined.

Follow-up to [45909].

See #47580.

git-svn-id: https://develop.svn.wordpress.org/trunk@48082 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 15:05:58 +00:00
Sergey Biryukov
ce955603cb Coding Standards: Fix WPCS issues in wp-includes/sitemaps/.
Some of these were not caught when running `composer lint:errors`, but are fixed when running `phpcbf` directly.

Follow-up to [48072], [48080].

See #49542, #50117.

git-svn-id: https://develop.svn.wordpress.org/trunk@48081 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 14:43:31 +00:00
Sergey Biryukov
74967e46ab Coding Standards: Remove unused variable in WP_Sitemaps_Provider::get_sitemap_entries().
Follow-up to [48072].

See #49542, #50117.

git-svn-id: https://develop.svn.wordpress.org/trunk@48080 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 14:42:36 +00:00
Pascal Birchler
c55d9d0159 Sitemaps: Bump $wp_db_version to flush rewrite rules after [48072].
Props ocean90.
See #50117.


git-svn-id: https://develop.svn.wordpress.org/trunk@48079 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 11:24:31 +00:00
Andrew Ozz
2cb1a61c69 Fix empty line phpcs error.
See #50280.

git-svn-id: https://develop.svn.wordpress.org/trunk@48078 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-18 00:44:41 +00:00
Andrew Ozz
8ca76ddd0a Plugins and Themes Auto-Updates: allow overriding of the HTML for the auto-update setting link. This will let plugins show better/specific information when they are overriding the auto-update settings, for example "Updates are managed by ... plugin".
Introduces: `theme_auto_update_setting_html`, `plugin_auto_update_setting_html`, and `theme_auto_update_setting_template` filters.

Props audrasjb, pbiron, azaozz.
Fixes #50280.

git-svn-id: https://develop.svn.wordpress.org/trunk@48077 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 23:58:15 +00:00
Sergey Biryukov
dbceb01b83 Menus: Check the correct variable in Walker_Nav_Menu_Edit::start_el() when menu item is a taxonomy term.
Follow-up to [45891].

Props ashour.
Fixes #50415.

git-svn-id: https://develop.svn.wordpress.org/trunk@48076 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 19:45:56 +00:00
Sergey Biryukov
fbb42b017b External Libraries: Update Moment.js to 2.26.0.
Changelog: https://github.com/moment/moment/compare/2.22.2...2.26.0

This commit also fixes a deprecation warning regarding the usage of `moment.locale()` to set locale properties.

As of Moment.js 2.12.0, `moment.locale()` is deprecated and `moment.updateLocale()` should be used instead.

Additionally, minimize `moment.js` as part of build process to remove the source map reference.

This avoids a `sourceMappingURL` being in the minified file, as we don't ship source maps.

Props yoancutillas, SergeyBiryukov.
Fixes #50408.

git-svn-id: https://develop.svn.wordpress.org/trunk@48075 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 17:38:40 +00:00
Ian Belanger
6ce65a2207 Bundled Themes: Twenty Sixteen table border extends beyond table.
Fixes issues where tables created by the table block have an extra border on the left side which extends below the table.

Props gsmumbo, mukesh27, JavierCasares.
Fixes #50180.

git-svn-id: https://develop.svn.wordpress.org/trunk@48074 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 17:25:19 +00:00
Ian Belanger
6ce58a4bac Bundled Themes: Twenty Nineteen horizontal rule is very narrow.
Fixes the issue by adding specific styles for the `<hr>` tag.

Props laurelfulford, nielslange, kjellr, samful, leprincenoir.
Fixes #45912.

git-svn-id: https://develop.svn.wordpress.org/trunk@48073 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 15:46:47 +00:00
Pascal Birchler
b58973554d Sitemaps: Add XML sitemaps functionality to WordPress.
While web crawlers are able to discover pages from links within the site and from other sites, XML sitemaps supplement this approach by allowing crawlers to quickly and comprehensively identify all URLs included in the sitemap and learn other signals about those URLs using the associated metadata.

See https://make.wordpress.org/core/2020/06/10/merge-announcement-extensible-core-sitemaps/ for more details.

This feature exposes the sitemap index via `/wp-sitemap.xml` and exposes a variety of new filters and hooks for developers to modify the behavior. Users can disable sitemaps completely by turning off search engine visibility in WordPress admin.

This change also introduces a new `esc_xml()` function to escape strings for output in XML, as well as XML support to `wp_kses_normalize_entities()`.

Props Adrian McShane, afragen, adamsilverstein, casiepa, flixos90, garrett-eclipse, joemcgill, kburgoine, kraftbj, milana_cap, pacifika, pbiron, pfefferle, Ruxandra Gradina, swissspidy, szepeviktor, tangrufus, tweetythierry.
Fixes #50117.
See #3670. See #19998.


git-svn-id: https://develop.svn.wordpress.org/trunk@48072 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 15:22:49 +00:00
Jonathan Desrosiers
92456a8d4b Site Health: Verify PHP version requirements when auto-updating themes.
Follow up of [47819].
See #49653.
Fixes #50411.

git-svn-id: https://develop.svn.wordpress.org/trunk@48071 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 14:46:23 +00:00
Sergey Biryukov
9c04110b46 Script Loader: Include the script or style handle in _wp_scripts_maybe_doing_it_wrong() message.
This makes the message more helpful and allows for easier debugging.

Props janthiel.
Fixes #50406.

git-svn-id: https://develop.svn.wordpress.org/trunk@48070 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 10:14:36 +00:00