Commit Graph

41859 Commits

Author SHA1 Message Date
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
TimothyBlynJacobs
2b42ac5a12 REST API: Only register one block renderer route.
Every block has a different set of attributes. These attributes are specified as a JSON Schema object. Previously, every block registered its own block renderer route using its attributes for the schema. This allowed for the attributes to be validated using the built in endpoint validation rules. It had the unfortunate side effect, however, of creating a large number of nearly identical REST API routes, one for each dynamic block. Each registered route has a performance impact. As the number of server side blocks goes up, this becomes more and more of an issue.

Now, we register a single block renderer route and dynamically validate the attributes based on the selected block.

Fixes #48079.
Props gziolo, TimothyBlynJacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@48069 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-17 03:20:02 +00:00
Sergey Biryukov
34b6e12529 Docs: List the expected return type first for size_format() and wp_get_original_referer().
Follow-up to [46696], [47060].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48068 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 21:22:09 +00:00
Sergey Biryukov
3bdf8b7b02 Docs: Consistently include an empty line between @since tag and @see, @link, or @global, per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48067 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 21:05:20 +00:00
Sergey Biryukov
9f11a8414f Text Changes: Replace "webmaster" with "site admin" in register_new_user().
Follow-up to [48049], accidentally reverted in [48059].

Props kebbet.
See #50394.

git-svn-id: https://develop.svn.wordpress.org/trunk@48066 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 20:03:13 +00:00
Sergey Biryukov
eff94648d7 Coding Standards: Rename the $clean or $ids variable in several functions to $non_cached_ids for clarity.
* `_get_non_cached_ids()`
* `update_meta_cache()`
* `update_object_term_cache()`

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48065 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 19:07:04 +00:00
Ian Belanger
e4937bc7dd Bundled Themes: Twenty Seventeen pagination links don't appear for home pages.
Fixes issues where pagination does not work on the page that is set to the home page.

Props dimitris.m, laurelfulford, poena, ianbelanger, samful.
Fixes #39685.

git-svn-id: https://develop.svn.wordpress.org/trunk@48064 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 18:38:53 +00:00
Sergey Biryukov
f30b219147 Coding Standards: Fix WPCS issues in wp-admin/nav-menus.php.
Includes minor code layout fixes for better readability.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48063 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 18:36:42 +00:00
Jake Spurlock
092f79ab7a Help/About: Add help tabs to provide informations about plugin & themes auto-updates.
Adds language around how the feature works and includes links to the WordPress HelpHub pages.

Fixes: #50215.
Props: audrasjb, garrett-eclipse, paaljoachim, marybaum, pbiron, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48062 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 17:27:05 +00:00
Ian Belanger
b139654684 Bundled Themes: Twenty Seventeen Navbar z-index issue.
Fixes navbar z-index issue by upping the z-index value to 1000 from 7.

Props halgatewood, justnorris, poena, sinatrateam.
Fixes #39384.

git-svn-id: https://develop.svn.wordpress.org/trunk@48061 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 17:14:05 +00:00
Jake Spurlock
d17a57a945 Themes: Add additional later escaping to post_class() and body_class() functions.
Additionally, this adds a few tests to test output.

Fixes #20009.

Props mfields, scribu, azaozz, obenland, dd32, nacin, jrf, jdgrimes, garyj, whyisjake. 
 


git-svn-id: https://develop.svn.wordpress.org/trunk@48060 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 16:55:45 +00:00
Andrea Fercia
50ece6d31c I18N: Remove the "Error:" prefix from error messages.
For a number of years, most of the WordPress error messages have been prefixed with "Error:". However, these messages appear in a context where it's already clear an error occurred. Whether it's an error, a warning, or any other classification, that's not so relevant for users. The content of the message is the relevant part. The "Error:" prefix doesn't add great value while it does add unnecessary complexity for the message readability.

Also, revises some of these messages to improve clarity and removes HTML from translatable strings.

Props garrett-eclipse, ramiy, SergeyBiryukov, afercia, sabernhardt, quadthemes, audrasjb. 
See #47003, #43037, #42945, #15887.
Fixes #47656.


git-svn-id: https://develop.svn.wordpress.org/trunk@48059 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 15:33:37 +00:00
Jonathan Desrosiers
6334056f65 Build/Test Tools: Prevent double /s when including PHPMailer files.
`ABSPATH` includes a trailing slash already.

Follow up of [48033].
Props desrosj.
See #50377, #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48058 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 13:57:05 +00:00
Sergey Biryukov
727249cfc6 Customize: Introduce get_custom_logo_image_attributes filter for the list of custom logo image attributes.
Props achbed, dlh, westonruter.
Fixes #36640.

git-svn-id: https://develop.svn.wordpress.org/trunk@48057 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 11:47:31 +00:00
Jake Spurlock
cbc71bb1a1 Administration: Remove wp-auth-check from the Heartbeat API.
As of [27153], wp-auth-check is returned on all heartbeats without the need for data from client-side. This also means that the timing and scheduling of this request data is ineffectual.

Fixes #50305.

Props dsixinetu, azaozz, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48056 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 07:07:54 +00:00
Jake Spurlock
def933ced7 Cache API: Add wp_cache_get_multiple() to core functions.
* `update_object_term_cache`
* `update_meta_cache`
* `_get_non_cached_ids`

See [47938].

Fixes #50352.

Props spacedmonkey, tillkruss, lukecavanagh. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48055 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 06:28:57 +00:00
Jake Spurlock
acf0f67a43 I18N: Add i18n to size_format().
Add translatable strings to the units of the `size_format()` function.

Props Rahe, audrasjb, ocean90.

Fixes #50194.



git-svn-id: https://develop.svn.wordpress.org/trunk@48054 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 06:08:07 +00:00
Jake Spurlock
78747f9353 REST API: Allow queries other than the main query to be is_home.
Ensure that REST API calls can match the main query of the page. 

See #34373.

Fixes #50213.

Props: dlh, TimothyBlynJacobs, boonebgorges, joemcgill, whyisjake. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48053 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 06:02:55 +00:00
Jake Spurlock
5f49b025aa Code Standards: Cleanup some code spacing.
See: #37826 and #44286.


git-svn-id: https://develop.svn.wordpress.org/trunk@48052 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 00:54:28 +00:00
Jake Spurlock
5cb54881e8 Menus: Provide menu settings when creating a new menu.
This simplifies the steps in the process of adding new menus.

Props: garrett-eclipse, audrasjb, ianjvr. 


git-svn-id: https://develop.svn.wordpress.org/trunk@48051 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 23:20:18 +00:00
Jake Spurlock
1d5e59c538 Comments: Don't display edit links to trashed post comments.
If a post is in the trash, the comments bubble won't link to the comments list.

Fixes: #37826.
Props: swissspidy, helen, FolioVision, DrewAPicture, stevenlinx, donmhico, birgire, garrett-eclipse, andraganescu, johnbillion. 




git-svn-id: https://develop.svn.wordpress.org/trunk@48050 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 23:04:27 +00:00
Sergey Biryukov
00c0913c1f Text Changes: Replace "Webmaster" in output messages with more appropriate terms:
* "All at `###SITENAME###`" in `wp-admin/ms-delete-site.php`, for consistency with other Multisite emails.
* "Site admin" in `register_new_user()`, for clarity.

Props Presskopp, marybaum.
Fixes #50394.

git-svn-id: https://develop.svn.wordpress.org/trunk@48049 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 19:39:32 +00:00
Jonathan Desrosiers
dfcbff2db0 Emoji: Upgrade Twemoji to version 13.0.0.
🥸

Props kraftbj, desrosj, otto42.
Fixes #50148.

git-svn-id: https://develop.svn.wordpress.org/trunk@48048 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 18:02:14 +00:00
Ian Belanger
5b69998102 Bundled Themes: Twenty Nineteen dropcap appears higher than expected in Firefox.
Fixes the issue by adding moz specific top margin for the dropcap.

Props kjellr, joseph.dickson, maxpertici, samful.
Fixes #45876.

git-svn-id: https://develop.svn.wordpress.org/trunk@48047 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 15:11:01 +00:00
Jonathan Desrosiers
69c92a64aa Coding Standards: Remove the PHP Compatibility scanning job from the allowed_failures list.
All pre-existing compatibility warnings and errors as flagged by the PHPCompatibilityWP ruleset have been addressed.

Fixes #49922.

git-svn-id: https://develop.svn.wordpress.org/trunk@48046 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 15:02:32 +00:00
Jonathan Desrosiers
6d10290267 General: Continuing to work towards a passing PHP Compatibility scan.
- Add `phpcs:ignore` statements to compatibility checks in PHPMailer.
- Remove quotes around the assertion in an `assert()` call. This will trigger a deprecated notice under certain conditions on PHP 7.2.

Props jrf, desrosj.
See #49922, #48033.

git-svn-id: https://develop.svn.wordpress.org/trunk@48045 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 14:54:23 +00:00
Sergey Biryukov
d9c53241dc Networks and Sites: Don't unnecessarily switch to the current blog in get_blog_details().
Props arpitgshah, djennez, acsnaterse, joostdevalk, SergeyBiryukov.
Fixes #50391.

git-svn-id: https://develop.svn.wordpress.org/trunk@48044 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 12:29:13 +00:00