Commit Graph

39249 Commits

Author SHA1 Message Date
Sergey Biryukov
8ea4da0826 Privacy: Update default privacy policy text to match the current behavior of setting a temporary cookie on visiting the login page.
Props mechter, subrataemfluence, garrett-eclipse.
Fixes #44175.
Built from https://develop.svn.wordpress.org/trunk@44987


git-svn-id: http://core.svn.wordpress.org/trunk@44818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 10:54:53 +00:00
Gary Pendergast
0a9d61ab63 Admin: Introduce the Site Health screens.
The Site Health tool serves two purposes:
- Provide site owners with information to improve the performance, reliability, and security of their site.
- Collect comprehensive debug information about the site.

By encouraging site owners to maintain their site and adhere to modern best practices, we ultimately improve the software hygeine of both the WordPress ecosystem, and the open internet as a whole.

Props Clorith, hedgefield, melchoyce, xkon, karmatosed, jordesign, earnjam, ianbelanger, wpscholar, desrosj, pedromendonca, peterbooker, jcastaneda, garyj, soean, pento, timothyblynjacobs, zodiac1978, dgroddick, garrett-eclipse, netweb, tobifjellner, pixolin, afercia, joedolson, birgire.
See #46573.

Built from https://develop.svn.wordpress.org/trunk@44986


git-svn-id: http://core.svn.wordpress.org/trunk@44817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-23 03:55:53 +00:00
Adam Silverstein
cd67264bb2 Multisite: add new sites_pre_query and networks_pre_query filters to short circuit WP_Site_Query and WP_Network_Query queries.
Similar to the `posts_pre_query` filter for WP_Query added in #36687. These filters lets you short circuit the queries to return your own results.

Add a new filter `sites_pre_query` - which returns null by default. Return a non-null value to bypass WordPress's default `get_sites` queries.

Developers should note that filtering functions that require pagination information are encouraged to set the `found_sites` property of the `WP_Site_Query` object, passed to the filter by reference. If `WP_Site_Query` does not perform a database query, it will not have enough information to generate these values itself.

Add a new filter `networks_pre_query` - which returns null by default. Return a non-null value to bypass WordPress's default `get_networks` queries.

Developers should note that filtering functions that require pagination information are encouraged to set the `found_networks` property of the `WP_Network_Query` object, passed to the filter by reference. If `WP_Network_Query` does not perform a database query, it will not have enough information to generate these values itself.

Props spacedmonkey.
Fixes #45749.


Built from https://develop.svn.wordpress.org/trunk@44983


git-svn-id: http://core.svn.wordpress.org/trunk@44814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 17:26:51 +00:00
Aaron Jorbin
bd83b90f1e PHP: Bump minimum version
95% of 5.6 sites are on 5.6.30 or higher, hence this specific minimum version.

Fixes #46594.



Built from https://develop.svn.wordpress.org/trunk@44982


git-svn-id: http://core.svn.wordpress.org/trunk@44813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 15:47:51 +00:00
Sergey Biryukov
50bb3c689f Plugins: Remove wp_is_wp_compatible() and wp_is_php_compatible() functions added in [44978] for now, to discuss use cases and better naming.
See #46599, #43992.
Built from https://develop.svn.wordpress.org/trunk@44981


git-svn-id: http://core.svn.wordpress.org/trunk@44812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 13:00:52 +00:00
Sergey Biryukov
79e9aa9ed6 Plugins: Use <em> instead of <span> for PHP annotation in wp_plugin_update_row(), for consistency with other instances.
Props afragen.
Fixes #46598. See #43987.
Built from https://develop.svn.wordpress.org/trunk@44980


git-svn-id: http://core.svn.wordpress.org/trunk@44811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 01:08:51 +00:00
Sergey Biryukov
8954465943 PHPCS: Fix WPCS violations in [44978].
See #43992.
Built from https://develop.svn.wordpress.org/trunk@44979


git-svn-id: http://core.svn.wordpress.org/trunk@44810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 01:00:52 +00:00
Sergey Biryukov
75a3e484ec Plugins: Block plugin activation if it requires a higher version of PHP or WordPress.
Introduce `validate_plugin_requirements()` for validating a plugin's WordPress and PHP version requirements.

Introduce `wp_is_wp_compatible()` and `wp_is_php_compatible()` for checking compatibility with the current WordPress or PHP version.

Props afragen, joyously, DrewAPicture, TimothyBlynJacobs, desrosj, flixos90, SergeyBiryukov.
See #43992.
Built from https://develop.svn.wordpress.org/trunk@44978


git-svn-id: http://core.svn.wordpress.org/trunk@44809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-22 00:37:50 +00:00
desrosj
36af5473be Networks and Sites: Introduce the ms_user_list_site_class filter.
In the network admin user table on multisite installs (`WP_MS_Users_List_Table`), this filter allows the classes for the `<span>` tag surrounding each site link to be modified.

Props kraftbj, flixos90, johnjamesjacoby.
Fixes #41146.
Built from https://develop.svn.wordpress.org/trunk@44977


git-svn-id: http://core.svn.wordpress.org/trunk@44808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 23:55:51 +00:00
Sergey Biryukov
8dcd3a09a8 I18N: Move the strings for default user roles to wp-includes/capabilities.php, to make the translations available on the front end as well.
Props keraweb, ocean90.
Fixes #37539.
Built from https://develop.svn.wordpress.org/trunk@44976


git-svn-id: http://core.svn.wordpress.org/trunk@44807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:23:52 +00:00
Sergey Biryukov
30491f2410 Customize: Add a link to theme reviews in the theme details modal in the Customizer and on Add Themes screen.
Props celloexpressions, Travel_girl, Ixium, marco-peralta, dd32.
Fixes #36612.
Built from https://develop.svn.wordpress.org/trunk@44975


git-svn-id: http://core.svn.wordpress.org/trunk@44806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:02:51 +00:00
Felix Arntz
964d328768 Bootstrap/Load: Fix WPCS violation in a new test following [44973].
See #46130.

Built from https://develop.svn.wordpress.org/trunk@44974


git-svn-id: http://core.svn.wordpress.org/trunk@44805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 22:00:51 +00:00
Felix Arntz
3a77265148 Bootstrap/Load: Introduce a recovery mode for fixing fatal errors.
Using the new fatal handler introduced in [44962], an email is sent to the admin when a fatal error occurs. This email includes a secret link to enter recovery mode. When clicked, the link will be validated and on success a cookie will be placed on the client, enabling recovery mode for that user. This functionality is executed early before plugins and themes are loaded, in order to be unaffected by potential fatal errors these might be causing.

When in recovery mode, broken plugins and themes will be paused for that client, so that they are able to access the admin backend despite of these errors. They are notified about the broken extensions and the errors caused, and can then decide whether they would like to temporarily deactivate the extension or fix the problem and resume the extension.

A link in the admin bar allows the client to exit recovery mode.

Props timothyblynjacobs, afragen, flixos90, nerrad, miss_jwo, schlessera, spacedmonkey, swissspidy.
Fixes #46130, #44458.

Built from https://develop.svn.wordpress.org/trunk@44973


git-svn-id: http://core.svn.wordpress.org/trunk@44804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:53:51 +00:00
Sergey Biryukov
1e925a5ae3 PHPCS: Remove extra tabs added in [44970].
See #44237.
Built from https://develop.svn.wordpress.org/trunk@44972


git-svn-id: http://core.svn.wordpress.org/trunk@44803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:36:51 +00:00
Sergey Biryukov
5299c763ca Privacy: Use a consistent URL for Privacy Policy guide.
Props garrett-eclipse, mukesh27, birgire, desrosj.
Fixes #44876.
Built from https://develop.svn.wordpress.org/trunk@44971


git-svn-id: http://core.svn.wordpress.org/trunk@44802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:17:50 +00:00
Sergey Biryukov
3de93dbc99 Comments: Introduce comment_flood_message and comment_duplicate_message filters for comment flood and duplicate comment error messages.
Props odminstudios, Katyatina, mukesh27.
Fixes #44237.
Built from https://develop.svn.wordpress.org/trunk@44970


git-svn-id: http://core.svn.wordpress.org/trunk@44801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:10:51 +00:00
Adam Silverstein
19c4841fb6 Media: introduce a "Heading" view for improved accessibility.
* Add a new media view: `wp.media.view.Heading` designed to add accessibility friendly headers in the media library/modal.
* Add an initial "Attachments list" heading above the attachments list.

Props afercia.
Fixes #36925.

Built from https://develop.svn.wordpress.org/trunk@44969


git-svn-id: http://core.svn.wordpress.org/trunk@44800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 21:05:52 +00:00
Sergey Biryukov
2876ef7d01 PHPCS: Remove extra spaces added in [44966].
See #44005.
Built from https://develop.svn.wordpress.org/trunk@44968


git-svn-id: http://core.svn.wordpress.org/trunk@44799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 20:20:50 +00:00
Sergey Biryukov
1fc763e85e Users: Introduce users_have_additional_content filter to indicate whether the users being deleted have additional content associated with them outside of the post_author and link_owner relationships.
Props garrett-eclipse, xkon, birgire.
Fixes #36860.
Built from https://develop.svn.wordpress.org/trunk@44967


git-svn-id: http://core.svn.wordpress.org/trunk@44798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 20:12:50 +00:00
Sergey Biryukov
7d74080b80 Privacy: Introduce Privacy Policy page helpers:
* `is_privacy_policy()` template tag
* `privacy-policy.php` template
* `.privacy-policy` body class
* `.menu-item-privacy-policy` menu item class

Props garrett-eclipse, birgire, xkon, Clorith.
Fixes #44005.
Built from https://develop.svn.wordpress.org/trunk@44966


git-svn-id: http://core.svn.wordpress.org/trunk@44797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 19:48:50 +00:00
K. Adam White
fac9f5f9fb REST API: Avoid undefined-property notice when setting parent term to 0.
Only try to access `term_id` once `$parent_term` is known to be a `WP_Term`.

Props dlh, earnjam.
Fixes #44983.

Built from https://develop.svn.wordpress.org/trunk@44965


git-svn-id: http://core.svn.wordpress.org/trunk@44796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 18:59:52 +00:00
Andrea Fercia
03bd75f053 Upgrade/Install: Add missing opening curly bracket after [44513].
Props WebFactory.
Fixes #46563.

Built from https://develop.svn.wordpress.org/trunk@44964


git-svn-id: http://core.svn.wordpress.org/trunk@44795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 18:03:51 +00:00
Sergey Biryukov
78f8073a72 Post Formats: Remove CSS transition effect on post format icons in the Posts list table.
Props afercia, melchoyce.
See #46591, #35497.
Built from https://develop.svn.wordpress.org/trunk@44963


git-svn-id: http://core.svn.wordpress.org/trunk@44794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 16:36:51 +00:00
Felix Arntz
dcb9d7cc7b Bootstrap/Load: Introduce fatal error handler.
This changeset introduces a `WP_Fatal_Error_Handler` class that detects fatal errors and displays a more user-friendly message about the site experiencing technical difficulties.

Websites that have custom requirements in that regard can implement their own fatal error handler by adding a `fatal-error-handler.php` drop-in that returns the handler instance to use, which must be based on a class that inherits `WP_Fatal_Error_Handler`. That handler will then be used in place of the default one. Alternatively, the fatal error handler feature can be completely disable through a constant `WP_DISABLE_FATAL_ERROR_HANDLER`.

Websites that would like to modify specifically the error template displayed in the frontend can add a `php-error.php` drop-in that works similarly to the existing `db-error.php` drop-in. For more granular customization, the fatal error handler also includes new filters `wp_should_handle_php_error`, `wp_php_error_message` and `wp_php_error_args`.

Props afragen, bradleyt, flixos90, ocean90, schlessera, SergeyBiryukov, spacedmonkey, timothyblynjacobs.
See #46130, #44458.

Built from https://develop.svn.wordpress.org/trunk@44962


git-svn-id: http://core.svn.wordpress.org/trunk@44793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 16:03:51 +00:00
Sergey Biryukov
99b929cbbc Accessibility: Remove post format filter links from format icons in the Posts list table.
Introduce a dedicated 'Formats' drop-down filter as a replacement.

Keep the icons as a simple visual indicator of the post format for now.

Props afercia, melchoyce, GaryJ, chiaralovelaces, SergeyBiryukov.
Fixes #35497.
Built from https://develop.svn.wordpress.org/trunk@44961


git-svn-id: http://core.svn.wordpress.org/trunk@44792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 15:32:01 +00:00
Ella Iseulde Van Dorpe
2aa1b8ff48 Block Editor: Update the WordPress Packages from Gutenberg 5.3
- @wordpress/a11y@2.2.0
 - @wordpress/annotations@1.2.0
 - @wordpress/api-fetch@3.1.0
 - @wordpress/autop@2.2.0
 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0
 - @wordpress/babel-preset-default@4.1.0
 - @wordpress/blob@2.3.0
 - @wordpress/block-editor@1.1.0
 - @wordpress/block-library@2.4.0
 - @wordpress/block-serialization-default-parser@3.1.0
 - @wordpress/blocks@6.2.0
 - @wordpress/components@7.2.0
 - @wordpress/compose@3.2.0
 - @wordpress/core-data@2.2.0
 - @wordpress/data@4.4.0
 - @wordpress/date@3.2.0
 - @wordpress/deprecated@2.2.0
 - @wordpress/docgen@1.1.0
 - @wordpress/dom-ready@2.2.0
 - @wordpress/dom@2.2.0
 - @wordpress/e2e-test-utils@1.1.0
 - @wordpress/e2e-tests@1.1.0
 - @wordpress/edit-post@3.3.0
 - @wordpress/edit-widgets@0.2.0
 - @wordpress/editor@9.2.0
 - @wordpress/element@2.3.0
 - @wordpress/escape-html@1.2.0
 - @wordpress/eslint-plugin@2.1.0
 - @wordpress/format-library@1.4.0
 - @wordpress/hooks@2.2.0
 - @wordpress/html-entities@2.2.0
 - @wordpress/i18n@3.3.0
 - @wordpress/keycodes@2.2.0
 - @wordpress/list-reusable-blocks@1.3.0
 - @wordpress/notices@1.3.0
 - @wordpress/nux@3.2.0
 - @wordpress/plugins@2.2.0
 - @wordpress/priority-queue@1.1.0
 - @wordpress/redux-routine@3.2.0
 - @wordpress/rich-text@3.2.0
 - @wordpress/scripts@3.1.0
 - @wordpress/shortcode@2.2.0
 - @wordpress/url@2.5.0
 - @wordpress/viewport@2.3.0
 - @wordpress/wordcount@2.2.0


Built from https://develop.svn.wordpress.org/trunk@44960


git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 12:48:00 +00:00
desrosj
899e7d3800 Posts, Post Types: Add type parameter to post_exists().
This allows post exists checks scoped to a specific post type.

Props sgarza, birgire, swissspidy.
Fixes #37406.
Built from https://develop.svn.wordpress.org/trunk@44959


git-svn-id: http://core.svn.wordpress.org/trunk@44790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 12:44:54 +00:00
Sergey Biryukov
26a90ce462 Menus: Use esc_url() for the href value of page link attributes in Walker_Page::start_el(), for consistency with Walker_Nav_Menu and Walker_Category.
See #40666, #40359.
Built from https://develop.svn.wordpress.org/trunk@44958


git-svn-id: http://core.svn.wordpress.org/trunk@44789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 10:45:51 +00:00
Sergey Biryukov
bbf36b6521 Accessibility: Introduce category_list_link_attributes filter in Walker_Category::start_el() for the HTML attributes applied to a category list item's anchor element.
This complements the `page_menu_link_attributes` filter in `Walker_Page::start_el()` and the `nav_menu_link_attributes` filter in `Walker_Nav_Menu::start_el()`.

Props pbiron, audrasjb, afercia.
Fixes #40666. See #40359.
Built from https://develop.svn.wordpress.org/trunk@44957


git-svn-id: http://core.svn.wordpress.org/trunk@44788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 10:37:57 +00:00
Sergey Biryukov
eb5c0abc00 Accessibility: Add ability to pass an ARIA label for the <form> element returned by get_search_form().
This allows screen readers to properly announce each search landmark region independently.

Introduce `search_form_args` filter for the arguments used when generating the search form.

Props afercia, williampatton.
Fixes #42057.
Built from https://develop.svn.wordpress.org/trunk@44956


git-svn-id: http://core.svn.wordpress.org/trunk@44787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 09:20:59 +00:00
tellyworth
34e297ea6b Coding Standards: exclude sodium_compat library.
Props dd32.
See #45806.

Built from https://develop.svn.wordpress.org/trunk@44955


git-svn-id: http://core.svn.wordpress.org/trunk@44786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 05:56:50 +00:00
tellyworth
e38814f359 Upgrade/Install: Add experimental package signing to some updates.
This adds code for soft verification of signatures for theme and plugin installs and updates, when provided by the update server. This experimental version does not reject unverified packages or failed signatures; it simply reports anonymous errors so we can evaluate its feasibility and detect incompatibilities.

This code relies on the new sodium_compat library for PHP versions prior to 7.2.

Props dd32, paragoninitiativeenterprises.
See #39309, #45806.

Built from https://develop.svn.wordpress.org/trunk@44954


git-svn-id: http://core.svn.wordpress.org/trunk@44785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 05:49:50 +00:00
tellyworth
cb01bbf97b General: Add sodium_compat library for crypto APIs in PHP < 7.2
This adds a pure PHP implementation of the cryptographic functions supported in PHP 7.2+. It provides the necessary backwards compatibility required to support signature verification and other security features going forward across all supported PHP versions.

Props paragoninitiativeenterprises
Fixes #45806. See #39309.

Built from https://develop.svn.wordpress.org/trunk@44953


git-svn-id: http://core.svn.wordpress.org/trunk@44784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 04:56:52 +00:00
desrosj
217849aab3 Menus: Ensure consistent padding in the menu structure form.
Props shital-patel, welcher, hardik-amipara, audrasjb.
Fixes #42596.
Built from https://develop.svn.wordpress.org/trunk@44952


git-svn-id: http://core.svn.wordpress.org/trunk@44783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 02:56:51 +00:00
Adam Silverstein
32dadd49eb Build: correct some linting errors.
Fix linting failures after r44948 by running `composer run format`.

Built from https://develop.svn.wordpress.org/trunk@44951


git-svn-id: http://core.svn.wordpress.org/trunk@44782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 22:06:52 +00:00
Aaron Jorbin
7b5cb15eca PHP: End official support for PHP5.2 -> 5.5
For the time being, we are ok with failures rather than not running the tests at all on these old versions. We will make decisions on fixes on a case by case basis.

Props chanthaboune.
See: https://make.wordpress.org/core/2018/12/08/updating-the-minimum-php-version/


Built from https://develop.svn.wordpress.org/trunk@44950


git-svn-id: http://core.svn.wordpress.org/trunk@44781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 22:04:51 +00:00
aduth
9cf4ee65a7 Scripts: Assign api-fetch nonce with corrected rest_nonce.
As of `@wordpress/api-fetch@3.0.0` (introduced in 44812), the `apiFetch` nonce middleware must have its nonce value assigned explicitly, and will no longer listen for heartbeat ticks automatically. This changeset adds an inline script for the default registration of the `api-fetch` script handle to assign the nonce value in response to the heartbeat action. In doing so, it removes the now-unused, misnamed `rest-nonce` property from the heartbeat response, whose original introduction served as temporary compatibility with earlier versions of `@wordpress/api-fetch`.

See https://github.com/WordPress/gutenberg/pull/13451
See #45113

Props adamsilverstein, nerrad .
Fixes #46107 .

Built from https://develop.svn.wordpress.org/trunk@44949


git-svn-id: http://core.svn.wordpress.org/trunk@44780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:53:50 +00:00
Adam Silverstein
4268033aaf Feeds: ensure build/update date matches current query.
Displaying the correct build date in feeds is as important today as it was twelve years ago when this ticket was opened.

Fix an issue where all feeds in WordPress showed the same date for their last build date (the datapoint is `lastBuildDate`, `updated` or `dc:date` depending on the feed type). 

Introduce a new `get_last_build_date` filter to adjust the date used for `lastBuildDate`. Developers who previously filtered `get_lastcommentmodified` to alter feed dates should use this filter instead.

* `get_last_build_date` extracts the latest post (or comment) in the current WP_Query object.
* In all feed templates, use `get_last_build_date` vs `get_lastpostmodified( 'GMT' );`.

Props stevenkword, spacedmonkey, ryanshoover, mauteri, nacin, jorbin, MikeNGarrett, Denis-de-Bernardy, peaceablewhale.
Fixes #4575.


Built from https://develop.svn.wordpress.org/trunk@44948


git-svn-id: http://core.svn.wordpress.org/trunk@44779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:39:00 +00:00
Adam Silverstein
b07bafba7e Media: grid view attachment filter drop down - only show available mime types.
In the media library gird view, properly limit the media attachment filter to available mime types, matching the list view.

Props itzmekhokan.
Fixes #43658.

Built from https://develop.svn.wordpress.org/trunk@44947


git-svn-id: http://core.svn.wordpress.org/trunk@44778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 20:07:51 +00:00
desrosj
289233ee46 I18N: Remove admin notice when the WPLANG constant is no longer necessary.
Introduced in [29630], this admin notice informs administrators (or network administrators on multisite installs) that the `WPLANG` constant is no longer needed when the locale returned by `get_locale()` does not match. After 5 years, the notice is being removed to avoid causing confusion for non-technical users.

The `_deprecated_argument()` call will persist to inform developers of the issue within log files.

Props flixos90, iworks, ocean90.
Fixes #39675.
Built from https://develop.svn.wordpress.org/trunk@44946


git-svn-id: http://core.svn.wordpress.org/trunk@44777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 18:58:50 +00:00
desrosj
18754216be Administration: Ensure consistent alignment for time and date fields across edit screens.
This change ensures that the values of time and date fields for comments and posts (both Classic Editor and quick edit) are consistently aligned in the center of the input fields. The block editor already enforces this alignment separately.

Props birgire, jainnidhi, melchoyce.
Fixes #43675.
Built from https://develop.svn.wordpress.org/trunk@44945


git-svn-id: http://core.svn.wordpress.org/trunk@44776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 18:29:53 +00:00
John Blackbourn
685811da6c Build/Test tools: Add support for passing a WP_Error object to wp_die() during tests.
This brings the functionality inline with `wp_die()` during non-test usage.

Fixes #46460

Built from https://develop.svn.wordpress.org/trunk@44944


git-svn-id: http://core.svn.wordpress.org/trunk@44775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 18:23:51 +00:00
desrosj
5e23c8d077 Tests: Fix failing tests for privacy export/erase requests when running the ajax group for multisite.
Props davidbinda, garrett-eclipse.
Fixes #43438.
Built from https://develop.svn.wordpress.org/trunk@44943


git-svn-id: http://core.svn.wordpress.org/trunk@44774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 17:41:50 +00:00
Andrea Fercia
b2ae00cd21 Accessibility: Ensure embed iframes have a title attribute.
Screen reader users rely on the iframe title attribute to describe the contents of iframes. A meaningful title attribute allows to quickly identify the iframe content, so users can determine which iframe to enter and explore in detail or skip if desired.
Note: this is the only case where a title attribute is required for compliance with the W3C Web Content Accessibility Guidelines (WCAG).

- checks for oEmbed response of type `video` or `rich`
- checks if they use an iframe
- fetches the title (if any) from the oEmbed response
- adds the title to the embed iframe

Props bamadesigner, TomHarrigan, swissspidy, jrf, afercia.
Fixes #40245.

Built from https://develop.svn.wordpress.org/trunk@44942


git-svn-id: http://core.svn.wordpress.org/trunk@44773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 17:22:51 +00:00
Boone Gorges
05fa2363ab Posts: Avoid the use of globals in get_the_content() and related functions.
This changeset introduces `$post` parameters to `get_the_content()` and
`wp_trim_excerpt()`. When a `$post` object is passed to one of these functions,
the functions will operate on the data from that object, rather than from the
post globals (`$authordata`, `$page`, etc). This ensures that the functions work
in a predictable manner when used outside of the regular post loop.

The global-mismatch problem is surfaced in cases where `get_the_excerpt()` is
called outside of the post loop, on posts that don't have a defined excerpt. In
these cases, the post globals - used to generate a fallback excerpt - may refer
to the incorrect object, resulting in PHP notices or other unpredictable
behavior. See #36934 for a related issue.

Props spacedmonkey, kraftbj, Shital Patel.
Fixes #42814.
Built from https://develop.svn.wordpress.org/trunk@44941


git-svn-id: http://core.svn.wordpress.org/trunk@44772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 15:49:49 +00:00
desrosj
8baa737840 Administration: Update Dashicons to the latest version.
This change introduces the following new icons to the Dashicon font:

- `.dashicons-admin-site-alt (f11d)`
- `.dashicons-admin-site-alt2 (f11e)`
- `.dashicons-admin-site-alt3 (f11f)`
- `.dashicons-buddicons-activity (f452)`
- `.dashicons-buddicons-bbpress-logo (f12b)`
- `.dashicons-buddicons-buddypress-logo (f448)`
- `.dashicons-buddicons-community (f453)`
- `.dashicons-buddicons-forums (f449)`
- `.dashicons-buddicons-friends (f454)`
- `.dashicons-buddicons-groups (f456)`
- `.dashicons-buddicons-pm (f457)`
- `.dashicons-buddicons-replies (f451)`
- `.dashicons-buddicons-topics (f450)`
- `.dashicons-buddicons-tracking (f455)`
- `.dashicons-businessperson (f12e)`
- `.dashicons-businesswoman (f12f)`
- `.dashicons-color-picker (f131)`
- `.dashicons-editor-ltr (f129)`
- `.dashicons-editor-ol-rtl (f12c)`
- `.dashicons-email-alt2 (f10a)`
- `.dashicons-instagram (f12d)`
- `.dashicons-menu-alt (f10b)`
- `.dashicons-rest-api (f124)`
- `.dashicons-yes-alt (f12a)`
- `.dashicons-tide (f10d)`

These icons were added to the `.ttf, ` and `.eot` font files, as well as the SVG sprite. However, they were not added to the `.woff` font file. The new `dashicons.woff2` file should be utilized instead.

For instances where IE<11 needs to be supported, the `.woff` file will remain for backwards compatibility. However, if the new icons are needed in those scenarios, the WOFF format is now included as embedded within the `dashicons.css`.

Props EmpireOfLight, liljimmi, jaymanpandya, netweb, melchoyce, joen, folletto, nateallen, bahia0019, JeffPaul, desrosj, cathibosco1.
Fixes #41074. 
Built from https://develop.svn.wordpress.org/trunk@44940


git-svn-id: http://core.svn.wordpress.org/trunk@44771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 15:44:00 +00:00
desrosj
22d61857fc Plugins: Block plugin updates on the update screen if required PHP version is not supported.
This brings the changes in [44937] to the WordPress Updates page in the admin. Now, when a site does not meet the minimum PHP version requirements for a plugin update, the user will not be able to update. Instead, they will be presented with educational information to guide them through the process of updating PHP.

Props afragen, miyauchi, TimothyBlynJacobs, desrosj.
Fixes #44350. 
Built from https://develop.svn.wordpress.org/trunk@44939


git-svn-id: http://core.svn.wordpress.org/trunk@44770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 14:59:50 +00:00
Dominik Schilling
c32bc04fdc Meta Boxes: Use a unique name for the nonce of the meta box loader.
Fixes a case where saving in the block editor fails if there are two `_wpnonce` arguments in the request, one overriding the other so that `use_block_editor_for_post()` wasn't able to check the nonce properly.

Props Chouby.
See #45253.
Built from https://develop.svn.wordpress.org/trunk@44938


git-svn-id: http://core.svn.wordpress.org/trunk@44769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 08:12:51 +00:00
desrosj
fae24d54fe Plugins: Block plugin updates if required PHP version is not supported.
When a plugin states it requires a specific minimum PHP version (as defined in the `requires_php` field included in the plugin update API response), a user should not be allowed to update that plugin when the server does not satisfy the minimum PHP version.

When this scenario is encountered, the update buttons and links are disabled and links to educational resources about PHP are displayed to the user with a notice.

Props afragen, schlessera, desrosj.
Fixes #43987. 
Built from https://develop.svn.wordpress.org/trunk@44937


git-svn-id: http://core.svn.wordpress.org/trunk@44768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 01:44:51 +00:00
desrosj
612a0c8c80 General: Prevent nested paragraph tags when displaying PHP update annotations.
This change utilizes the new parameters accepted by `wp_update_php_annotation()` introduced in [44935] to prevent nested `<p>` tags when displaying the PHP update annotation.

Props afragen, desrosj.
Fixes #46269.
Built from https://develop.svn.wordpress.org/trunk@44936


git-svn-id: http://core.svn.wordpress.org/trunk@44767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-19 20:41:53 +00:00