Commit Graph

38254 Commits

Author SHA1 Message Date
Sergey Biryukov a7cdcb9725 Login and Registration: Send `nocache_headers()` on Multisite account activation pages.
Props herregroen.
Fixes #43917.

git-svn-id: https://develop.svn.wordpress.org/trunk@43065 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 22:07:21 +00:00
Sergey Biryukov 31ed6e771e Privacy: Move "Mine" filter for media items above "Trash".
See #43820.

git-svn-id: https://develop.svn.wordpress.org/trunk@43063 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 21:46:52 +00:00
Sergey Biryukov 0c848f5503 I18N: Add context for "Mine" string added in [43056].
See #43820.

git-svn-id: https://develop.svn.wordpress.org/trunk@43062 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 21:36:41 +00:00
Andrew Ozz 87b81f220c Privacy: improve `wp_privacy_erase_personal_data()`, return boolean values.
Props ericdaams.
See #43602.

git-svn-id: https://develop.svn.wordpress.org/trunk@43061 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 19:26:53 +00:00
Andrew Ozz e7420e62a5 Privacy: translate error messages, some fixes and improvements for the AJAX actions for exporting and erasing user data.
Props desrosj, birgire.
See #43438.

git-svn-id: https://develop.svn.wordpress.org/trunk@43060 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 18:59:48 +00:00
Ian Dunn cbfbadc99b Privacy: Include `wp-admin/includes/file.php` to avoid fatal error.
`list_files()` is defined in `wp-admin/includes/file.php`, which is not included by `wp-cron.php`, so it needs to be included by the caller in order to avoid a fatal PHP error.

This bug was not detected during testing because the file _is_ included when executing jobs via `wp cron event run`.

Props mikejolley, iandunn.
See #43546.
See https://wordpress.slack.com/archives/C9695RJBW/p1525190405000860.


git-svn-id: https://develop.svn.wordpress.org/trunk@43059 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 17:42:50 +00:00
Andrew Ozz a7f1665396 Privacy: docs fixes and improvements for `wp_comments_personal_data_exporter()`.
Props desrosj.
See #43440.

git-svn-id: https://develop.svn.wordpress.org/trunk@43058 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 17:17:49 +00:00
Andrew Ozz 429aaa4a57 Privacy: make the emails in export and erasure list-tables clickable.
Props birgire.
See #43911.

git-svn-id: https://develop.svn.wordpress.org/trunk@43057 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 17:11:43 +00:00
Andrew Ozz 7f6f84606f Privacy: add "Mine" filter for media similarly to posts and comments.
Props audrasjb.
See #43820.

git-svn-id: https://develop.svn.wordpress.org/trunk@43056 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 15:42:38 +00:00
Andrew Ozz 16bd4bede2 Privacy: add user information to the personal data export file.
Props TZ-Media, desrosj.
See #43547.


git-svn-id: https://develop.svn.wordpress.org/trunk@43055 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 13:58:02 +00:00
Andrew Ozz ef14780ff0 Privacy: add attachments to the personal data export file.
Props allendav.
See #43883.

git-svn-id: https://develop.svn.wordpress.org/trunk@43054 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 13:44:50 +00:00
Andrew Ozz 3b98427140 Privacy: fix and improve the help text about adding a privacy policy page.
Props idea15, xkon.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/trunk@43053 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 11:42:18 +00:00
Andrew Ozz dfd77631ac Privacy: only fold the sections in the privacy policy poxtbox when more than one.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43052 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 09:47:53 +00:00
Ian Dunn c07f5272f2 Bundled Themes: Add link to privacy policy page in footer.
If a privacy policy has been set, then a link to it will automatically be shown in the footer.

The element containing the "Proudly powered by WordPress" link was chosen for the new policy link, in order to minimize visual conflicts with custom CSS that was written before the new link existed. Unfortunately, some minor conflicts are expected and unavoidable. Adding this link is required as part of GDPR compliance, and the benefits outweigh the downsides. 

To further mitigate the conflicts, a new `imprint` class was added to the "Proudly powered..." link, in order to facilitate targeting each link invididually with custom styles.

Props xkon, laurelfulford, birgire, azaozz, iandunn.
See #43715.


git-svn-id: https://develop.svn.wordpress.org/trunk@43051 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 06:27:45 +00:00
Peter Wilson e73af26e92 Cron API: Return meaningful values from cron functions.
Return values added to Cron API functions to indicate outcome:

* `wp_schedule_single_event()`, `wp_schedule_event()`, `wp_reschedule_event()` and `wp_unschedule_event()`: boolean indicating success or failure,
* `wp_clear_scheduled_hook()`: integer indicating number of jobs cleared (zero or more), `false` if one or more jobs fail to clear,
* `wp_unschedule_hook()`: integer indicating number of jobs cleared (zero or more), `false` if the jobs fail to clear,
* `spawn_cron()`: boolean indicating whether job spawned,
* `wp_cron()`: integer indicating number of jobs spawned (zero or more), `false` if one or more jobs fail to spawned,
* `_set_cron_array()`: boolean outcome of `update_option()`.

Props evansolomon, jrf, peterwilsoncc, pento for code review.
Fixes #21072.



git-svn-id: https://develop.svn.wordpress.org/trunk@43050 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-01 02:04:25 +00:00
Boone Gorges 4c36079299 Taxonomy: Ensure that invalid term objects are discarded in `WP_Term_Query`.
The `get_term()` mapping may result in term objects that are `null` or
`WP_Error` when plugins use `get_term` or a related filter. Since `null`
and error objects are not valid results for a term query, we discard
them.

Props GM_Alex.
See #42691.

git-svn-id: https://develop.svn.wordpress.org/trunk@43049 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 21:07:16 +00:00
Andrew Ozz 360d8701aa Privacy: edits and improvements for the default text for a privacy policy.
Props idea15, allendav.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43048 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 21:05:34 +00:00
Ian Dunn a159bf4e16 Privacy: Add `wp_privacy_personal_data_export_file_created` filter.
This runs immediately after the data export file has been successfully created, allowing plugins to introduce some workflow customizations. For example, a plugin could password-protect the export file, for peace of mind, even though the CSPRN in the filename makes brute force attacks nearly impossible.

See #43546.


git-svn-id: https://develop.svn.wordpress.org/trunk@43047 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 21:03:31 +00:00
Ian Dunn a1fe96576f Privacy: Add cron to delete expired export files to protect privacy.
The primary means of protecting the files is the CSPRN appended to the filename, but there is no reason to keep the files after the data subject has downloaded them, so deleting them provides an additional layer of protection. Previously this was done from `wp_privacy_generate_personal_data_export_file()`, but that does not guarantee that it will be run regularly, and on smaller sites that could result in export files being exposed for much longer than necessary.

`wp_privacy_delete_old_export_files()` was moved to a front end file, so that it can be called from `cron.php`.

This introduces the `wp_privacy_export_expiration` filter, which allows plugins to customize how long the exports are kept before being deleted.

`index.html` was added to the `$exclusions` parameter of `list_files()` to make sure that it isn't deleted. If it were, then poorly-configured servers would allow the directory to be traversed, exposing all of the exported files.

Props iandunn, desrosj.
See #43546.


git-svn-id: https://develop.svn.wordpress.org/trunk@43046 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 20:08:37 +00:00
Ian Dunn 953e094719 Privacy: Use a CSPRNG in export filenames for more security.
`rand()` is deterministic and therefore offers much less protection in this context. `wp_generate_password()` is a convenient wrapper around `wp_rand()`, which uses `random_int()` to generate cryptographically-secure psuedorandom numbers.

See #43546.


git-svn-id: https://develop.svn.wordpress.org/trunk@43045 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 18:52:59 +00:00
Andrew Ozz 75000c03b7 Privacy: add default text for a privacy policy. First run.
Props xkon, idea15, allendav, azaozz.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43044 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 14:46:25 +00:00
John Blackbourn a3c31fcebc Docs: Update the inline docs for `is_protected_meta()`.
See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43043 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 14:38:56 +00:00
John Blackbourn 37916c2a5f Comments: Update the inline docs following [42772].
See #43436


git-svn-id: https://develop.svn.wordpress.org/trunk@43042 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 13:09:21 +00:00
Andrea Fercia 2e08b275a6 Coding standards: Change a few occurrences of font weight 700 to 600 in multisite signup and activate.
Props chetan200891.
Amends [43018].
See #43897.


git-svn-id: https://develop.svn.wordpress.org/trunk@43041 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 07:04:12 +00:00
Sergey Biryukov a2b95a643f Themes: Avoid a PHP 7.2 warning in `get_theme_roots()` when `$wp_theme_directories` is an uncountable value.
See [41174] for `wp_get_themes()` and `get_raw_theme_root()`.

Props burlingtonbytes, teddytime, lbenicio, desrosj.
Fixes #43374. See #40109.

git-svn-id: https://develop.svn.wordpress.org/trunk@43039 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 04:50:52 +00:00
Sergey Biryukov 451ba4c401 General: Introduce a polyfill for `is_iterable()` function added in PHP 7.1.
Props jrf, schlessera, desrosj.
See #43619.

git-svn-id: https://develop.svn.wordpress.org/trunk@43036 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 04:14:30 +00:00
Sergey Biryukov 8edb00171c General: Introduce a polyfill for `is_countable()` function added in PHP 7.3.
Props jrf, ayeshrajans, desrosj.
See #43583.

git-svn-id: https://develop.svn.wordpress.org/trunk@43034 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 03:42:46 +00:00
Sergey Biryukov a1327b5eb6 Help/About: Move "Get involved" link on Credits screen to the top of the page for better visibility.
Props bridgetwillard, desrosj.
See #23348.

git-svn-id: https://develop.svn.wordpress.org/trunk@43032 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-30 03:15:23 +00:00
Sergey Biryukov 0041e393c1 Login and Registration: Send `nocache_headers()` on Multisite signup pages.
Props herregroen.
Fixes #43843.

git-svn-id: https://develop.svn.wordpress.org/trunk@43030 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 23:04:28 +00:00
Sergey Biryukov a6fa935244 Docs: Update `@since` version for `theme_templates` filter added in [43025].
See #43872.

git-svn-id: https://develop.svn.wordpress.org/trunk@43027 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 22:42:00 +00:00
Sergey Biryukov a0a8246734 Themes: Introduce `theme_templates` filter for page templates of all post types.
This complements the `theme_{$post_type}_templates` dynamic filter added in [38951].

Props desrosj.
Fixes #43872.

git-svn-id: https://develop.svn.wordpress.org/trunk@43025 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 22:17:20 +00:00
Sergey Biryukov a8a0adbaf7 Docs: Remove backtick-escaping around a core function in the hook docs for the `pre_prepare_themes_for_js` filter.
This allows the function to be auto-linked in the Developer Reference. Added in [42877].

See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@43024 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 21:46:54 +00:00
Sergey Biryukov dffed6639e Docs: Remove backtick-escaping around a core function in the hook docs for the `comment_form_submit_button` filter.
This allows the function to be auto-linked in the Developer Reference. See [32037] for `comment_form_submit_field`.

See #42505, #31888.

git-svn-id: https://develop.svn.wordpress.org/trunk@43023 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 21:43:17 +00:00
Sergey Biryukov 9192d7ab71 Docs: Add missing verb in `is_admin()`, `is_blog_admin()`, `is_network_admin()`, `is_user_admin()` descriptions.
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@43022 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 21:13:49 +00:00
Andrea Fercia 518c7ab6ac Coding standards: Change one occurrence of font weight 700 to 600.
Props chetan200891.
Amends [43018].
See #43897.


git-svn-id: https://develop.svn.wordpress.org/trunk@43021 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 18:03:29 +00:00
Andrea Fercia 52e28b4085 Accessibility: Improve the Themes Installer navigation buttons accessibility.
- really disables buttons when they look disabled (when navigation is at the first or last theme)
- when navigation is at the first or last theme, moves focus to the other navigation button, to avoid a focus loss
- improves the buttons visually hidden accessibility text

Props walbo, afercia.
Fixes #36627.


git-svn-id: https://develop.svn.wordpress.org/trunk@43020 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 17:03:56 +00:00
Andrea Fercia 75ca3d6386 Accessibility: Better color contrast for the tables pagination links.
By making the pagination links use the default style for buttons, color contrast
is improved and the CSS is simplified. Improves consistency with other UI controls.
Also, slightly increases the white space below the pagination links.

Props benoitchantre, afercia.
Fixes #41858.


git-svn-id: https://develop.svn.wordpress.org/trunk@43019 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 16:24:41 +00:00
Andrea Fercia b3836882ef Coding standards: Use numeric font weights instead of keywords.
Fixes #43897.


git-svn-id: https://develop.svn.wordpress.org/trunk@43018 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-29 11:36:53 +00:00
John Blackbourn 6eef5a6234 Docs: Correct the possible return types for the `wpdb::query()` method.
Props isabel104

See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43017 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-28 14:43:36 +00:00
John Blackbourn c71a898f78 Formatting: Begin the process of improving the docs for KSES related functions.
See #33801


git-svn-id: https://develop.svn.wordpress.org/trunk@43016 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-28 13:57:32 +00:00
Andrew Ozz 6173287317 Privacy: fix unit tests after [43012].
Props iandunn.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/trunk@43015 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-28 12:10:13 +00:00
Andrew Ozz bf1ddda65f Fix docs and white space.
Props desrosj.
See #43443.

git-svn-id: https://develop.svn.wordpress.org/trunk@43014 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-28 12:03:09 +00:00
John Blackbourn 790f1ef5da Build/Test Tools: Don't trigger the global variable override PHPCS sniff for core.
Props jrf

Fixes #43776


git-svn-id: https://develop.svn.wordpress.org/trunk@43013 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-28 00:44:50 +00:00
Andrew Ozz da5dc711a5 Privacy: add means to export personal data by username or email address. Generate a zipped export file containing all data. First run.
Props allendav.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/trunk@43012 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 19:53:37 +00:00
Andrew Ozz a0c3fab75b Privacy: update and enhance the method to confirm user requests by email. Introduce WP_User_Request to hold all request vars similarly to WP_Post.
Props mikejolley.
See #43443.


git-svn-id: https://develop.svn.wordpress.org/trunk@43011 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 17:30:28 +00:00
Felix Arntz f9d314aaf7 Multisite: Add meta query functionality to `WP_Site_Query`.
After the introduction of site metadata in [42836], it should be possible to query sites by that data.

Fixes #40229.


git-svn-id: https://develop.svn.wordpress.org/trunk@43010 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 11:40:35 +00:00
Felix Arntz 1e9d46387c Bootstrap: Load `class-wp-meta-query.php` earlier in `wp-settings.php`.
This change is necessary to enable multisite-specific meta query functionality during the multisite bootstrap process.

Fixes #40948. See #40229.


git-svn-id: https://develop.svn.wordpress.org/trunk@43009 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 11:36:47 +00:00
Andrew Ozz 11d594e3a8 Privacy: update the method to confirm user requests by email. Use a single CPT to store the requests and to allow logging/audit trail.
Props mikejolley.
See #43443.


git-svn-id: https://develop.svn.wordpress.org/trunk@43008 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 10:12:01 +00:00
Gary Pendergast 0907ed4894 REST API: Include `viewable` attribute on Post Type resource for `edit` context
For the block editor to be able to expose the Preview button correctly, it needs to know the `is_post_type_viewable()` setting, this change adds it to the Post Type response.

Props danielbachhuber.
Fixes #43739.



git-svn-id: https://develop.svn.wordpress.org/trunk@43007 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-27 03:05:40 +00:00
Felix Arntz 41b6e0da34 General: Implement editorial, design and accessibility feedback for the PHP version nag.
The updated version of the nag is shorter, more on point and less aggressive than the previous one. It integrates better with the other dashboard widgets and fixes several accessibility concerns. A yellow warning color is used when the current PHP version is outdated, a red error color is used when it is also insecure.

Props afercia, birgire, danieltj, flixos90, johnjamesjacoby, karmatosed, Luciano Croce, nerrad, pento, schlessera, SergeyBiryukov, sonjaleix.

Fixes #41191.


git-svn-id: https://develop.svn.wordpress.org/trunk@43006 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-26 14:30:24 +00:00