Commit Graph

38200 Commits

Author SHA1 Message Date
iandunn
41d6b9dd79 Privacy: Revise Privacy Policy page text to avoid misunderstanding.
The previous sentence was gramatically awkward, and using the term "compliance" could accidentally be mistaken by a site owner for a promise by WordPress that their site will be compliant after using the tool, which is not necessarily true.

Props idea15, allendav, azaozz, iandunn.
See #43435.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 00:07:22 +00:00
Andrew Ozz
0d2eb27a5d Privacy: do not fold a single section in the privacy policy poxtbox.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43126


git-svn-id: http://core.svn.wordpress.org/trunk@42955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 22:10:21 +00:00
iandunn
aa01cbe691 Comments: Move comment consent input outside the label for a11y.
Non-wrapping `label`s are more widely supported by assitive technologies. The CSS changes account for the element re-ordering, and tweak the formatting for improved readability.

Props afercia, xkon, laurelfulford, azaozz.
Fixes #43436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 22:00:49 +00:00
iandunn
753d4f10cd Privacy: Use "website" in comment cookie consent text for clarity.
The term "URL" is technical jargon which will not be familiar to all commenters. "Website" is more universal, and matches the label on the `url` input field.

Props johnjamesjacoby, allendav, azaozz.
See #43436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 21:31:21 +00:00
Andrew Ozz
dd68722112 Privacy: fix typo.
Props casiepa.
Fixes #43939.
Built from https://develop.svn.wordpress.org/trunk@43121


git-svn-id: http://core.svn.wordpress.org/trunk@42950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 20:07:22 +00:00
iandunn
b1cf176f6e Privacy: Add policy link to login screen.
Personal data collection is more likely for registered users than casual visitors, and the privacy policy might have been updated since a user last logged in. Those changes could impact the collection of personal data from registered users, so it makes sense to provide a link to the policy before users log in.

Props voneff, xkon, melchoyce, chetan200891, desrosj.
Fixes #43721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 19:48:21 +00:00
Andrew Ozz
3a43a64c20 Privacy: fix inconsistencies in new strings.
Props audrasjb.
Fixes #43925.
Built from https://develop.svn.wordpress.org/trunk@43118


git-svn-id: http://core.svn.wordpress.org/trunk@42947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 18:42:21 +00:00
Sergey Biryukov
64192e967e Privacy: Correct unit test for wp_user_personal_data_exporter() added in [43055].
`user_status` is not considered personal data, so the total number of exported user properties is 11.

See #43547.
Built from https://develop.svn.wordpress.org/trunk@43116


git-svn-id: http://core.svn.wordpress.org/trunk@42945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 04:11:21 +00:00
Sergey Biryukov
6145ef6dea Docs: Correct DocBlock formatting for wp_privacy_personal_data_erasers filter.
See #43637.
Built from https://develop.svn.wordpress.org/trunk@43104


git-svn-id: http://core.svn.wordpress.org/trunk@42933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 03:14:21 +00:00
Sergey Biryukov
18e8f75ee0 I18N: Use consistent pattern for placeholder references in translator comments in wp-admin/privacy.php.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@43091


git-svn-id: http://core.svn.wordpress.org/trunk@42920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:58:21 +00:00
Sergey Biryukov
a53d6b9cb9 I18N: Use consistent pattern for placeholder references in a translator comment in wp-admin/update-core.php.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@43090


git-svn-id: http://core.svn.wordpress.org/trunk@42919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:55:21 +00:00
Sergey Biryukov
eca2bf8545 I18N: Correct translator comment in wp_privacy_generate_personal_data_export_file().
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43089


git-svn-id: http://core.svn.wordpress.org/trunk@42918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:52:22 +00:00
Sergey Biryukov
14ab38be27 I18N: Use consistent pattern for placeholder references in translator comments in wp_ajax_wp_privacy_erase_personal_data().
See #43438.
Built from https://develop.svn.wordpress.org/trunk@43088


git-svn-id: http://core.svn.wordpress.org/trunk@42917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:39:21 +00:00
Gary Pendergast
2f792d442b REST API: Filter responses based on the _fields parameter, before data is processed.
Historically, the REST API would generate the entire response object, including running expensive filters, then it would apply the `_fields` parameter, discarding the fields that weren't specificed.

This change causes `_fields` to be applied earlier, so that only requested fields are processed.

Props danielbachhuber.
See #43874.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:25:21 +00:00
iandunn
93a90a9aa4 Privacy: Limit export and erasure to super admins on Multisite.
Multisite networks have a variety of use cases, and in many of them single-site administrators are not trusted to take actions that affect the whole network, require making decisions about legal compliance, etc. By default, those actions should require super admin capabilities. Plugins can be used to override that behavior if a particular site's use case calls for it.

Props allendav, jeremyfelt, iandunn.
Fixes #43919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:07:22 +00:00
Sergey Biryukov
ae8d70c06c Docs: Update @since version numbers for wp_privacy_anonymize_ip() and wp_privacy_anonymize_data().
Props joemcgill.
See #43545.
Built from https://develop.svn.wordpress.org/trunk@43081


git-svn-id: http://core.svn.wordpress.org/trunk@42910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 00:41:21 +00:00
Sergey Biryukov
ac0bf9d352 Login and Registration: Send nocache_headers() on Multisite account activation pages.
Props herregroen.
Fixes #43917.
Built from https://develop.svn.wordpress.org/trunk@43065


git-svn-id: http://core.svn.wordpress.org/trunk@42894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 22:08:20 +00:00
Sergey Biryukov
8e01f9f99b Privacy: Move "Mine" filter for media items above "Trash".
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43063


git-svn-id: http://core.svn.wordpress.org/trunk@42892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 21:47:21 +00:00
Sergey Biryukov
6c2470a091 I18N: Add context for "Mine" string added in [43056].
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43062


git-svn-id: http://core.svn.wordpress.org/trunk@42891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 21:37:23 +00:00
Andrew Ozz
2f321e234e Privacy: improve wp_privacy_erase_personal_data(), return boolean values.
Props ericdaams.
See #43602.
Built from https://develop.svn.wordpress.org/trunk@43061


git-svn-id: http://core.svn.wordpress.org/trunk@42890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 19:27:22 +00:00
Andrew Ozz
f376b6b0c9 Privacy: translate error messages, some fixes and improvements for the AJAX actions for exporting and erasing user data.
Props desrosj, birgire.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@43060


git-svn-id: http://core.svn.wordpress.org/trunk@42889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 19:00:20 +00:00
iandunn
9bb0e18c82 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:43:22 +00:00
Andrew Ozz
e0d2de94e7 Privacy: docs fixes and improvements for wp_comments_personal_data_exporter().
Props desrosj.
See #43440.
Built from https://develop.svn.wordpress.org/trunk@43058


git-svn-id: http://core.svn.wordpress.org/trunk@42887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:18:21 +00:00
Andrew Ozz
2aa8414d09 Privacy: make the emails in export and erasure list-tables clickable.
Props birgire.
See #43911.
Built from https://develop.svn.wordpress.org/trunk@43057


git-svn-id: http://core.svn.wordpress.org/trunk@42886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:12:22 +00:00
Andrew Ozz
3266b10d04 Privacy: add "Mine" filter for media similarly to posts and comments.
Props audrasjb.
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43056


git-svn-id: http://core.svn.wordpress.org/trunk@42885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 15:43:22 +00:00
Andrew Ozz
f4e6b7a29c Privacy: add user information to the personal data export file.
Props TZ-Media, desrosj.
See #43547.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 13:59:21 +00:00
Andrew Ozz
c77a8ed2fc Privacy: add attachments to the personal data export file.
Props allendav.
See #43883.
Built from https://develop.svn.wordpress.org/trunk@43054


git-svn-id: http://core.svn.wordpress.org/trunk@42883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 13:45:21 +00:00
Andrew Ozz
5133e5131b Privacy: fix and improve the help text about adding a privacy policy page.
Props idea15, xkon.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@43053


git-svn-id: http://core.svn.wordpress.org/trunk@42882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 11:43:22 +00:00
Andrew Ozz
237df3367b Privacy: only fold the sections in the privacy policy poxtbox when more than one.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43052


git-svn-id: http://core.svn.wordpress.org/trunk@42881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 09:48:21 +00:00
iandunn
b4290211f4 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 06:28:21 +00:00
Peter Wilson
2e43234f3f 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 02:05:23 +00:00
Boone Gorges
0dc6bd7c04 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.
Built from https://develop.svn.wordpress.org/trunk@43049


git-svn-id: http://core.svn.wordpress.org/trunk@42878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:08:22 +00:00
Andrew Ozz
d1ab641d16 Privacy: edits and improvements for the default text for a privacy policy.
Props idea15, allendav.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43048


git-svn-id: http://core.svn.wordpress.org/trunk@42877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:06:21 +00:00
iandunn
9abc0fe73e 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:04:22 +00:00
iandunn
23bf0c7535 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 20:09:23 +00:00
iandunn
5b4aa26436 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 18:53:25 +00:00
Andrew Ozz
c21c4e25b3 Privacy: add default text for a privacy policy. First run.
Props xkon, idea15, allendav, azaozz.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43044


git-svn-id: http://core.svn.wordpress.org/trunk@42873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 14:47:21 +00:00
John Blackbourn
d488e773b0 Docs: Update the inline docs for is_protected_meta().
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 14:39:21 +00:00
John Blackbourn
cf02373b39 Comments: Update the inline docs following [42772].
See #43436

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


git-svn-id: http://core.svn.wordpress.org/trunk@42871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 13:10:20 +00:00
Andrea Fercia
eac393b6f1 Coding standards: Change a few occurrences of font weight 700 to 600 in multisite signup and activate.
Props chetan200891.
Amends [43018].
See #43897.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 07:05:21 +00:00
Sergey Biryukov
4b6794ba57 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.
Built from https://develop.svn.wordpress.org/trunk@43039


git-svn-id: http://core.svn.wordpress.org/trunk@42868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 04:51:22 +00:00
Sergey Biryukov
94cbb2a3f6 General: Introduce a polyfill for is_iterable() function added in PHP 7.1.
Props jrf, schlessera, desrosj.
See #43619.
Built from https://develop.svn.wordpress.org/trunk@43036


git-svn-id: http://core.svn.wordpress.org/trunk@42865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 04:15:21 +00:00
Sergey Biryukov
5813ccec07 General: Introduce a polyfill for is_countable() function added in PHP 7.3.
Props jrf, ayeshrajans, desrosj.
See #43583.
Built from https://develop.svn.wordpress.org/trunk@43034


git-svn-id: http://core.svn.wordpress.org/trunk@42863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 03:43:21 +00:00
Sergey Biryukov
70a214c186 Help/About: Move "Get involved" link on Credits screen to the top of the page for better visibility.
Props bridgetwillard, desrosj.
See #23348.
Built from https://develop.svn.wordpress.org/trunk@43032


git-svn-id: http://core.svn.wordpress.org/trunk@42861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 03:16:22 +00:00
Sergey Biryukov
bc5a539c4d Login and Registration: Send nocache_headers() on Multisite signup pages.
Props herregroen.
Fixes #43843.
Built from https://develop.svn.wordpress.org/trunk@43030


git-svn-id: http://core.svn.wordpress.org/trunk@42859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 23:05:21 +00:00
Sergey Biryukov
95071b2ea1 Docs: Update @since version for theme_templates filter added in [43025].
See #43872.
Built from https://develop.svn.wordpress.org/trunk@43027


git-svn-id: http://core.svn.wordpress.org/trunk@42856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 22:42:22 +00:00
Sergey Biryukov
0c071471d6 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.
Built from https://develop.svn.wordpress.org/trunk@43025


git-svn-id: http://core.svn.wordpress.org/trunk@42854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 22:18:22 +00:00
Sergey Biryukov
00ae0a1097 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.
Built from https://develop.svn.wordpress.org/trunk@43024


git-svn-id: http://core.svn.wordpress.org/trunk@42853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:47:22 +00:00
Sergey Biryukov
f8177e3a73 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.
Built from https://develop.svn.wordpress.org/trunk@43023


git-svn-id: http://core.svn.wordpress.org/trunk@42852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:44:22 +00:00
Sergey Biryukov
9a8f48c9bc Docs: Add missing verb in is_admin(), is_blog_admin(), is_network_admin(), is_user_admin() descriptions.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@43022


git-svn-id: http://core.svn.wordpress.org/trunk@42851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:14:22 +00:00