Commit Graph

6768 Commits

Author SHA1 Message Date
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
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
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
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
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
Andrea Fercia
8d9f1ae0d5 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 16:25:21 +00:00
Andrew Ozz
b044b4053e 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.
Built from https://develop.svn.wordpress.org/trunk@43012


git-svn-id: http://core.svn.wordpress.org/trunk@42841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 19:54:21 +00:00
Andrew Ozz
e9eb7518c0 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 17:31:22 +00:00
Andrew Ozz
f1703c0e70 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 10:12:22 +00:00
Felix Arntz
6b2e34f703 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-26 14:31:24 +00:00
Andrew Ozz
41a82d6078 Privacy: add better docs for wp_add_privacy_policy_content() and WP_Privacy_Policy_Content::add().
See #43620.
Built from https://develop.svn.wordpress.org/trunk@43003


git-svn-id: http://core.svn.wordpress.org/trunk@42832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 18:10:21 +00:00
Andrew Ozz
13875fbddb Privacy: fix styling of counts on the list tables for user requests.
Props allendav.
Fixes #43846.
Built from https://develop.svn.wordpress.org/trunk@43000


git-svn-id: http://core.svn.wordpress.org/trunk@42829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 21:35:21 +00:00
Andrew Ozz
11e315ca23 Make the string WordPress translatable.
Props mnelson4.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42999


git-svn-id: http://core.svn.wordpress.org/trunk@42828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 21:23:21 +00:00
Felix Arntz
c1efc2519b Plugins: Show the required PHP version in the plugin details view, if specified.
Props xkon.
Fixes #43650.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 11:41:25 +00:00
Andrew Ozz
891deab7c5 Privacy: make the sections in the suggested privacy policy text postbox foldable. Add Read More/Read Less buttons. Fix copying of the suggested text by pressing the button.
Props melchoyce, xkon, azaozz.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42992


git-svn-id: http://core.svn.wordpress.org/trunk@42821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 12:39:21 +00:00
Andrew Ozz
b4fdb9ebf2 Privacy: add means to erase personal data by username or email address. First run.
Props allendav, coreymckrill, ericdaams, azaozz.
See #43637, #43602.
Built from https://develop.svn.wordpress.org/trunk@42986


git-svn-id: http://core.svn.wordpress.org/trunk@42815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-18 22:30:22 +00:00
Andrew Ozz
8d9e4937f8 Fix typo in 'wp_get_default_privacy_policy_content' filter.
Props claudiu.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42985


git-svn-id: http://core.svn.wordpress.org/trunk@42814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-17 21:09:20 +00:00
Sergey Biryukov
acd3f4cb10 I18N: Use consistent pattern for placeholder references in a translator comment in media_upload_max_image_resize().
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42984


git-svn-id: http://core.svn.wordpress.org/trunk@42813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:37:20 +00:00
Sergey Biryukov
3957635dfb I18N: Correct placeholder references in a translator comment in wp_print_file_editor_templates().
Props afercia.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42983


git-svn-id: http://core.svn.wordpress.org/trunk@42812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:36:24 +00:00
Andrew Ozz
280aeff5d2 Fix typo (missing !).
See #43491.
Built from https://develop.svn.wordpress.org/trunk@42982


git-svn-id: http://core.svn.wordpress.org/trunk@42811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 10:14:21 +00:00
Andrew Ozz
f1e065b13b Privacy: automatically create a Privacy Policy page when installing WordPress.
Props fclaussen, azaozz.

Fixes #43491.
Built from https://develop.svn.wordpress.org/trunk@42981


git-svn-id: http://core.svn.wordpress.org/trunk@42810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 09:00:20 +00:00
Andrew Ozz
3108d2ffb2 Privacy: add a postbox that is shown when editing the privacy policy page, and where plugins and core will output suggested content and additional privacy info. First run.
Props melchoyce, azaozz.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42980


git-svn-id: http://core.svn.wordpress.org/trunk@42809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 08:53:20 +00:00
Andrew Ozz
600c5082a3 Privacy: fix error message and list table sorting errors on the Export Personal Data and Remove Personal Data screens.
See #43481.
Built from https://develop.svn.wordpress.org/trunk@42977


git-svn-id: http://core.svn.wordpress.org/trunk@42806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 16:15:21 +00:00
Dominik Schilling
3b76937ec8 Administration: Avoid an extra space in the admin body class.
Props jainnidhi, rhetorical, birgire, mathieuhays.
Fixes #43465.
Built from https://develop.svn.wordpress.org/trunk@42974


git-svn-id: http://core.svn.wordpress.org/trunk@42803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 14:03:20 +00:00
Andrew Ozz
5493d8b253 Privacy: add helper function for anonymizing data in a standardized way.
Props jesperher, allendav, iandunn, birgire, azaozz.
Fixes #43545.
Built from https://develop.svn.wordpress.org/trunk@42971


git-svn-id: http://core.svn.wordpress.org/trunk@42800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-12 21:20:23 +00:00
iandunn
057cef802a Dashboard: Strip more extraneous IP parts to prevent PHP warnings.
This iterates on earlier versions of the code, in order to handle more edge cases. An arbitrary string like `or=\"` will now be stripped, as well as reachability scopes like `%eth0`.

Props eamax, soulseekah, iandunn.
Fixes #41083.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 23:19:30 +00:00
Andrew Ozz
108578a8ec Privacy: add new wp-admin screens for exporting and removing of personal data.
Props @melchoyce, @mikejolley, @allendav, @xkon.
See #43481.
Built from https://develop.svn.wordpress.org/trunk@42967


git-svn-id: http://core.svn.wordpress.org/trunk@42796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 18:02:30 +00:00
Adam Silverstein
d1d6e8864e Revisions: improve show_split_view=false support for title.
* When show_split_view argument false, show title changes in a single column and only show title once if title is unchanged.

Props johnbillion, mbelchev.
Fixes #42402.  


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


git-svn-id: http://core.svn.wordpress.org/trunk@42795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 16:12:30 +00:00
Felix Arntz
921e131eae General: Improve wording for PHP version nag.
This changeset adjusts the tone of the message to fit the usual core voice better and addresses accessibility concerns.

Props schlessera.
See #41191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-02 10:15:33 +00:00
Andrew Ozz
a4beb40d0b Privacy: add support for exporting multiple pages of personal data.
Props allendav.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@42889


git-svn-id: http://core.svn.wordpress.org/trunk@42719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 19:28:31 +00:00
Sergey Biryukov
ff314fd156 Media: Pass EXIF data to the wp_read_image_metadata filter.
Props desrosj.
Fixes #43624.
Built from https://develop.svn.wordpress.org/trunk@42879


git-svn-id: http://core.svn.wordpress.org/trunk@42709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 20:45:29 +00:00
Sergey Biryukov
079cfd60a9 Media: In wp_read_image_metadata(), rename $sourceImageType variable to $image_type to match coding standards.
See #43624.
Built from https://develop.svn.wordpress.org/trunk@42878


git-svn-id: http://core.svn.wordpress.org/trunk@42708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 20:41:29 +00:00
John Blackbourn
bbcb4300a3 Docs: Correct and improve various inline documentation.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 19:35:29 +00:00
John Blackbourn
b13e73d05c Docs: Document more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 18:10:32 +00:00
Sergey Biryukov
0895f04705 Docs: Correct method reference in a comment for Bulk_Plugin_Upgrader_Skin::$plugin_info.
See [42677] for `Bulk_Theme_Upgrader_Skin::$theme_info`.

See #42505.
Built from https://develop.svn.wordpress.org/trunk@42873


git-svn-id: http://core.svn.wordpress.org/trunk@42703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-23 00:34:29 +00:00
John Blackbourn
18169f0ae1 Docs: Revert some sneaky debugging code.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:29:30 +00:00
John Blackbourn
1b5d6c6971 Docs: Document many more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
Dominik Schilling
61ba57abb7 Users: Use promote_users for role updates in edit_user().
`edit_user()` can also update user roles but was still using the `edit_users` capability instead of the newer `promote_users` capability introduced in [14176].
This makes the role handling consistent with the bulk dropdown menu for role changes.

Props flixos90, johnjamesjacoby, ocean90.
Fixes #42564.
Built from https://develop.svn.wordpress.org/trunk@42855


git-svn-id: http://core.svn.wordpress.org/trunk@42685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-19 20:29:34 +00:00
Dominik Schilling
5c291d49de Pinking shears.
See #41057.
Built from https://develop.svn.wordpress.org/trunk@42843


git-svn-id: http://core.svn.wordpress.org/trunk@42673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 14:23:33 +00:00
Felix Arntz
176a289050 Multisite: Introduce metadata for sites.
A new global multisite table `wp_blogmeta` is added to the database schema, and a set of `*_site_meta()` API functions are introduced.

The implementation fails gracefully when the new table is not yet available, which may happen especially shortly after the core update, before the network has been upgraded to the new database schema. The presence of the table is detected once and stored as a global setting on the main network.

Core does not yet use site metadata, but there are several use-cases to be implemented or explored in the near future, and it allows plugins to extend sites with arbitrary data, which will come in particularly handy with the upcoming REST API endpoint for sites.

Props spacedmonkey, johnjamesjacoby, jeremyfelt, flixos90.
Fixes #37923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 02:15:31 +00:00
Felix Arntz
ed1df81bba General: Introduce dashboard widget to inform administrators about outdated PHP versions.
This new dashboard widget is shown on WordPress sites which are powered by a PHP version which WordPress considers outdated, in order to inform site owners about the resulting problems and to explain how to upgrade to a supported version. An education page for that purpose has been previously created that the widget links to. The link is translatable so that localized versions of the page can be referred to as they become available.

The nag follows the example of the Browse Happy dashboard widget and is only visible for administrators, or network administrators when using multisite. To determine whether it needs to be displayed, a new wordpress.org API introduced prior is called that handles the version logic in a centralized location.

Props flixos90, hedgefield, schlessera.
Fixes #41191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 16:43:31 +00:00
John Blackbourn
d7025e7787 Security: Loosen the admin referrer policy header value to allow the referring host to be sent from the admin area in all cases.
This allows referrer-restricted content from third parties (such as images and fonts) to continue working in the admin area.

Props aranwer104, qcmiao

Fixes #43285

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


git-svn-id: http://core.svn.wordpress.org/trunk@42660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 10:57:35 +00:00
Dion Hulse
42b03122b5 Plugins: Add support for plugins having an active_installs value larger than 1 million.
WordPress.org currently supports up to 5 million, and with the growth of WordPress, it's expected that that upper bound will increase in the future.

Fixes #43193.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 01:57:31 +00:00
Sergey Biryukov
4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +00:00
Sergey Biryukov
fab939595d Docs: Fix typo in a comment in WP_Community_Events::trim_events().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42826


git-svn-id: http://core.svn.wordpress.org/trunk@42656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 10:35:31 +00:00