Commit Graph

41727 Commits

Author SHA1 Message Date
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
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