Commit Graph

41644 Commits

Author SHA1 Message Date
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
Sergey Biryukov
eb06a59f53 Posts, Post Types: Introduce default_category_post_types filter.
The filter allows custom post types associated with the `category` taxonomy to opt in to requiring a default category, same as regular posts.

Props enrico.sorcinelli.
Fixes #43516.

git-svn-id: https://develop.svn.wordpress.org/trunk@48043 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 21:40:10 +00:00
Dominik Schilling
90d8fdb5bb Users: On the 'Add New User' screen, don't show the roles dropdown if the current user can't promote other users.
Fixes #50345.

git-svn-id: https://develop.svn.wordpress.org/trunk@48042 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 17:01:51 +00:00
Dominik Schilling
5b31b4eee4 Coding Standards: Fix code indentation in post_submit_meta_box() to improve readability.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48041 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 16:29:33 +00:00
Sergey Biryukov
9c0fd94558 Coding Standards: Use strict comparison in js/_enqueues/lib/ajax-response.js.
Props ankitmaru.
Fixes #50320.

git-svn-id: https://develop.svn.wordpress.org/trunk@48040 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 11:26:22 +00:00
Sergey Biryukov
d7b5385f04 Accessibility: Themes: Don't link to the home page in get_custom_logo() when it's displayed on the home page.
Props Soean, audrasjb, sabernhardt, FlorianBrinkmann, rianrietveld, afercia, joedolson, samful, knutsp, SergeyBiryukov.
See #37011.

git-svn-id: https://develop.svn.wordpress.org/trunk@48039 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 10:00:47 +00:00
Sergey Biryukov
73280035e6 External Libraries: Update Masonry to 4.2.2 and imagesLoaded to 4.1.4.
Notable changes include dropping support for IE 8 & 9, which are no longer supported by WordPress core either.

Release notes:
https://github.com/desandro/masonry/releases
https://github.com/desandro/imagesloaded/releases

Changelogs:
https://github.com/desandro/masonry/compare/v3.3.2...v4.2.2
https://github.com/desandro/imagesloaded/compare/v3.2.0...v4.1.4

Props pierlo, hareesh-pillai, grapplerulrich, pderksen, desrosj, garrett-eclipse, SergeyBiryukov.
Fixes #37675, #48031.

git-svn-id: https://develop.svn.wordpress.org/trunk@48038 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 18:51:07 +00:00
Sergey Biryukov
d0268ece09 Themes: Ensure the theme slug is set before checking if the theme is installed or active.
This fixes an issue with every installed theme being marked as active on Themes screen.

The slug is set on Add Themes screen, but not on Themes.

Follow-up to [47924].

Props BackuPs, mukesh27, SergeyBiryukov.
Fixes #50381. See #50334.

git-svn-id: https://develop.svn.wordpress.org/trunk@48037 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 14:24:30 +00:00
Sergey Biryukov
a0742854fa Coding Standards: Exclude the whole PHPMailer directory from WPCS checks, for consistency with other external libraries in their own directory.
Follow-up to [48033].

See #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48036 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 12:34:12 +00:00
Sergey Biryukov
de4d6b454b External Libraries: Add class aliases for phpmailerException and SMTP to deprecated files to account for the new namespace.
This ensures backward compatibility with plugins using the old `class-phpmailer.php` or `class-smtp.php` files.

Follow-up to [48033].

Props Otto42.
Fixes #50379. See #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48035 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 21:40:52 +00:00
Timothy Jacobs
eddef0565c External Libraries: Skip deprecated file warning for PHPMailer if the API is not loaded.
In [48033] the "class-phpmailer.php" file was deprecated. In test suites, this file is loaded before WordPress in order to setup a mock PHPMailer instance. This means that for test suites that are still loading that file, they'll experience fatal errors due to the undefined "_deprecated_file" function.

This commit skips issuing the deprecated file warning if the "_deprecated_file" function is not available.

Fixes #50380.


git-svn-id: https://develop.svn.wordpress.org/trunk@48034 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 21:08:08 +00:00
Jonathan Desrosiers
0933882c6e External Libraries: Upgrade PHPMailer to version 6.1.6.
Now that WordPress Core supports PHP >= 5.6, the PHPMailer library can be updated to the latest version.

The PHPMailer files now reside in a new directory, `wp-includes/PHPMailer`. These files are copied verbatim from the library upstream and will make updating in the future easier. For backwards compatibility, the old files will remain and trigger deprecated file warnings.

The PHPMailer class is also now under the `PHPMailer\PHPMailer\PHPMailer` namespace. The `PHPMailer` class in the global namespace has been aliased for a seamless transition.

This upgrade also clears up a handful of PHP compatibility issues detailed in #49922.

For a full list of changes, see the PHPMailer GitHub: https://github.com/PHPMailer/PHPMailer/compare/v5.2.27...v6.1.6.

Props Synchro, SergeyBiryukov, desrosj, donmhico, ayeshrajans.
Fixes #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48033 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 15:45:30 +00:00
Ian Belanger
55f0a18c02 Bundled Themes: Twenty Nineteen long submenu item titles do not wrap.
Fixes the issue of long submenu item titles that do not wrap by adding a `max-width: 20rem;` and removing `white-space: nowrap;`.

Props kjellr, mukesh27, mohsinrasool, samful.
Fixes #45866.

git-svn-id: https://develop.svn.wordpress.org/trunk@48032 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 15:09:35 +00:00
Sergey Biryukov
d32ec3352b Filesystem API: Avoid a PHP notice in WP_Filesystem_Direct::owner() and ::group() methods and their WP_Filesystem_SSH2 counterparts.
Although not officially documented in the PHP manual, `posix_getpwuid()` and `posix_getgrgid()` can return `false` in some circumstances.

Props logig.
Fixes #50373.

git-svn-id: https://develop.svn.wordpress.org/trunk@48031 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-12 12:33:12 +00:00
Ian Belanger
73669965a6 Bundled Themes: Twenty Seventeen CSS issue when using rowspan in tables.
Fixes CSS issue when using rowspan in tables. This issue does not apply to the Table Block, just tables inserted as custom html.

Props aussi, subrataemfluence, jainnidhi.
Fixes #44004.

git-svn-id: https://develop.svn.wordpress.org/trunk@48028 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-11 17:13:05 +00:00
Ian Belanger
d5c3483f8c Bundled Themes: Twenty Seventeen add Telegram and Whatsapp support to Social Media Menu.
Adds Telegram and Whatsapp support and SVG's to Social Media Menu.

Props cpasqualini, audrasjb, laurelfulford, karmatosed, ibdz.
Fixes #43999.

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