Commit Graph

5907 Commits

Author SHA1 Message Date
flixos90
88b725e1cb Upgrade/Install: Introduce populate_network_meta(), moving logic out of populate_network().
Fixes #44895. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43628 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 10:44:02 +00:00
Felix Arntz
f1e1b6299e Upgrade/Install: Add support for an optional $options parameter to populate_options().
Fixes #44893. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43627 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 09:38:04 +00:00
Sergey Biryukov
39c97a768a Docs: Correct parameter type for WP_Privacy_Policy_Content::notice().
Props burhandodhy.
Fixes #44877.

git-svn-id: https://develop.svn.wordpress.org/trunk@43609 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 14:14:15 +00:00
jrf
1730443206 I18n: Improve translators comments [3].
* Add missing translators comments.
* Fix placement of some translators comments.
  Translators comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools.
  The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translators comments.

Includes minor code layout fixes.

Patch `44360-wp-admin-includes-dir.patch` of the series.

Props flipkeijzer, alvarogois, michielatyoast
See #44360


git-svn-id: https://develop.svn.wordpress.org/trunk@43598 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 13:35:27 +00:00
John Blackbourn
5af7160563 Docs: Correct and improve various inline documentation.
See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@43582 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-27 14:27:22 +00:00
Andrew Ozz
fa35f06219 Script loader: remove (PHP based) compression from load-styles.php and load-scripts.php. WIth the amount of scripts and stylesheets grown a lot over the years, it has become pretty slow and consumes a lot of server resources. Also, most servers are set to compress PHP output anyway.
Props LucasRolff, azaozz.

Fixes #44815.
See #43308.

git-svn-id: https://develop.svn.wordpress.org/trunk@43580 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-20 13:50:49 +00:00
John Blackbourn
8454fd7918 Customize: Increase the colour contrast of the line numbers in CodeMirror.
Props earnjam, abdullahramzan, audrasjb, Luminus

Fixes #44763


git-svn-id: https://develop.svn.wordpress.org/trunk@43574 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-19 11:00:46 +00:00
Sergey Biryukov
8bbae6aeb1 Administration: Remove $title_class variable, unused since [18683].
Props hitendra-chopda, torontodigits.
Fixes #44812.

git-svn-id: https://develop.svn.wordpress.org/trunk@43573 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-19 10:17:50 +00:00
Gary Pendergast
a75d153eee Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
Gary Pendergast
cb3d1777b1 Coding Standards: Prepare for upgrading WPCS to 1.0.0.
In order to get the best result when running `phpcbf` across the codebase, there are some manual tweaks we need to make.

These fall into three categories:
- Fixing incorrectly indented code which has flow-on effects when auto-fixing.
- Tweaking the layout of inline PHP inside HTML tags.
- Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43569 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-15 06:22:00 +00:00
Sergey Biryukov
c5d013bf95 Privacy: Ensure the user request email is sent in the requested user's locale (or the site's default locale if they are not a registered user) when the administrator creating the request uses a different locale.
Props desrosj, Chouby, iandunn, lbenicio, birgire, earnjam, swissspidy, garrett-eclipse.
Fixes #43985.

git-svn-id: https://develop.svn.wordpress.org/trunk@43568 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-13 16:31:31 +00:00
Felix Arntz
c29d019762 Multisite: Complete the new CRUD API for managing sites.
New functions `wp_insert_site( $data )`, `wp_update_site( $id, $data )` and `wp_delete_site( $id )` are introduced to manage site rows in the `wp_blogs` table, forming the new CRUD API together with the existing `get_site()` / `get_sites()`. The new API provides various benefits over the previously existing API, fixing several cache invalidation issues and being hook-driven so that normalization and validation of the passed data can be fully customized.

New hooks introduced as part of this are the actions `wp_insert_site`, `wp_update_site`, `wp_delete_site`, `wp_validate_site_data` and the filter `wp_normalize_site_data`.

At this point, `wp_insert_site()` does not handle setting up the site's database tables, and `wp_delete_site()` does not handle dropping the site's database tables, so the two can not yet be used directly as full replacements of `wpmu_create_blog()` and `wpmu_delete_blog()`. Managing the site's database tables will be added via hooks as part of the follow-up ticket #41333.

The existing functions `wpmu_create_blog()`, `update_blog_details()`, and `wpmu_delete_blog()` make use of the respective new counterpart and will be obsolete once #41333 has been completed.

Props flixos90, jeremyfelt, spacedmonkey.
Fixes #40364.


git-svn-id: https://develop.svn.wordpress.org/trunk@43548 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-01 13:05:44 +00:00
Aaron Jorbin
df9dd119a5 Gutenbeg: you can't remove call outs that don't exist
This commit should have just gone into the 4.9 branch. It did in [43544].

See: #44680
Unprops jorbin
props ocean90


git-svn-id: https://develop.svn.wordpress.org/trunk@43545 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 15:15:31 +00:00
Aaron Jorbin
8ed24bbbda Gutenberg: Restrict "Try Gutenberg" based on capability and gutenstatus
When Gutenberg is either not installed, or not activated, only show the callout to users with the install_plugins capability.
When Gutenberg is activated, expand that to include all users with the edit_posts capability.

Props pento.
Fixes #44680.


git-svn-id: https://develop.svn.wordpress.org/trunk@43543 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 14:41:46 +00:00
Sergey Biryukov
ddc8f803c6 Privacy: Revert [43525].
The commenter cookies checkbox is not legally required, so should be disabled by default.

Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43531 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 17:05:56 +00:00
Sergey Biryukov
6c32fcd011 I18N: Separate two "About" strings with different context.
Props desrosj, XpertOne, Nao.
Fixes #44139.

git-svn-id: https://develop.svn.wordpress.org/trunk@43527 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 15:03:19 +00:00
Sergey Biryukov
335b69cedc Privacy: Remove the setting to enable comment cookies consent added in [43469].
This needs some more work to ensure expected behaviour.

See #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43525 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 12:50:55 +00:00
Sergey Biryukov
e7d9ee5051 Privacy: Improve grammar on Privacy Settings screen.
Props ianbelanger, garrett-eclipse.
Fixes #44612.

git-svn-id: https://develop.svn.wordpress.org/trunk@43513 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 20:13:29 +00:00
Sergey Biryukov
ffdc5e6827 Privacy: Use a consistent case for "Privacy Policy page" on Privacy Settings screen.
Props XpertOne, idea15, garrett-eclipse.
Fixes #44130.

git-svn-id: https://develop.svn.wordpress.org/trunk@43508 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 12:09:31 +00:00
Sergey Biryukov
7e4f59b28e I18N: Update list of continents and cities for the timezone selection.
Props soulseekah, dyrer.
Fixes #44574.

git-svn-id: https://develop.svn.wordpress.org/trunk@43504 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:20:28 +00:00
Sergey Biryukov
df7b163a31 Privacy: Mark Privacy Policy page as such in the Pages list table.
Props desrosj, subrataemfluence, ianbelanger, danieltj.
Fixes #44006.

git-svn-id: https://develop.svn.wordpress.org/trunk@43495 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:45:04 +00:00
Sergey Biryukov
f75b58113d Privacy: Enable pagination screen options for privacy requests list tables.
Props birgire, pbiron.
Fixes #44025.

git-svn-id: https://develop.svn.wordpress.org/trunk@43486 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:03:59 +00:00
Sergey Biryukov
d25cf1c907 Privacy: Rename username_or_email_to_export POST variable on Erase Personal Data screen to a more generic username_or_email_for_privacy_request.
Props ianbelanger, allendav.
Fixes #44181.

git-svn-id: https://develop.svn.wordpress.org/trunk@43478 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:14:47 +00:00
Andrew Ozz
d8869384be Privacy: Add a setting to disable comment cookie consent.
Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43469 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:07:29 +00:00
Gary Pendergast
8c55028c90 Privacy: Remove some unnecessary code comments.
[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.

Props burhandodhy.
Fixes #44590.



git-svn-id: https://develop.svn.wordpress.org/trunk@43465 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:42:23 +00:00
Sergey Biryukov
018779aca1 Docs: Change @since entry for add_inline_data action added in [42676] to 4.9.8.
See #36085.

git-svn-id: https://develop.svn.wordpress.org/trunk@43460 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 15:26:57 +00:00
Sergey Biryukov
dec7594a9b Privacy: Change @since entry for _wp_privacy_settings_filter_draft_page_titles() added in [43376] to 4.9.8.
See #44100.

git-svn-id: https://develop.svn.wordpress.org/trunk@43454 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 13:47:36 +00:00
Aaron Jorbin
f673d1851c Privacy: Silence is golden and invisible.
"Be more discrete." declared matt in [3155], and since then, "Silence is Golden" has been the calling card of placeholder index files. Historically, these have been php files, but [43012] changed that and added index.html files for privacy export generated folders.

The php silence files produce no visible content. This adds consistency with these new html files in that there will be no visible content. Silence will fall when the question is asked.

Fixes #44195.
Props audrasjb, rafsuntaskin, Ov3rfly, johnbillion, pento



git-svn-id: https://develop.svn.wordpress.org/trunk@43446 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-15 23:38:14 +00:00
Sergey Biryukov
7569772234 Plugins: Disable "Install Now" button for plugins that require a higher version of PHP or WordPress.
Display a notice with an explanation and the steps required to resolve the issue.

Props afragen, schlessera, flixos90, nerrad, melchoyce, boemedia, hedgefield, joyously, johnalarcon, lakenh, afercia, acirujano, ibantxillo, SergeyBiryukov.
Fixes #43986.

git-svn-id: https://develop.svn.wordpress.org/trunk@43436 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-09 13:44:53 +00:00
Felix Arntz
3d85e311ef Privacy: Fix a further inconsistency of site name and URL usage in notification emails.
This is a follow-up to [43388].

Props desrosj.
Fixes #44396.


git-svn-id: https://develop.svn.wordpress.org/trunk@43435 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-08 13:54:02 +00:00
Felix Arntz
d3a198df34 Taxonomy: Introduce is_taxonomy_viewable().
This utility function allows for easy detection whether terms for a taxonomy are considered publicly viewable.

Props andizer.
Fixes #44466.


git-svn-id: https://develop.svn.wordpress.org/trunk@43386 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-03 10:28:39 +00:00
Felix Arntz
0a9c044283 Multisite: Count users in a more performant way when listing sites in the network admin.
Props spacedmonkey.
Fixes #44368.


git-svn-id: https://develop.svn.wordpress.org/trunk@43382 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-26 16:29:33 +00:00
Felix Arntz
d399bcce30 Role/Capability: Rename upgrade_php capability to more suitable update_php.
This brings the name in line with user-facing language and similar names of existing related capabilities. Since the capability has not been part of any WordPress release, it can be renamed without any backward-compatibility implications.

Also missing props benhuberman for [43006].

Fixes #44457.


git-svn-id: https://develop.svn.wordpress.org/trunk@43381 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-26 15:04:26 +00:00
Andrew Ozz
1ebcb33c3c Privacy: append (Draft) to draft page titles in the page drop-down on the Privacy Settings screen.
Props allendav, desrosj.
Fixes #44100.

git-svn-id: https://develop.svn.wordpress.org/trunk@43376 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-19 12:11:46 +00:00
Andrew Ozz
b2830c15e6 Privacy: on the Privacy Settings screen change view to preview when a draft page is selected for the privacy policy.
Props garrett-eclipse, desrosj.
Fixes #44131.

git-svn-id: https://develop.svn.wordpress.org/trunk@43374 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-18 16:36:18 +00:00
John Blackbourn
102422679d Security: Harden the random aspect of the hash used for user profile and admin email address changes.
Props BjornW

Fixes #43771


git-svn-id: https://develop.svn.wordpress.org/trunk@43367 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 14:09:58 +00:00
John Blackbourn
e42ce4a603 Options, Meta APIs: Use the correct escaping function when outputting the meta box context.
Props khaihong, abdullahramzan, leanderiversen, aryamaaru, lbenicio, palmiak

Fixes #44274


git-svn-id: https://develop.svn.wordpress.org/trunk@43365 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:49:23 +00:00
Sergey Biryukov
c8cbd26cb3 Docs: Correct inline comment added in [43361] for consistency with other comments.
See #44142.

git-svn-id: https://develop.svn.wordpress.org/trunk@43363 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:09:46 +00:00
Sergey Biryukov
3de54cc930 Docs: Add missing @return value for save_mod_rewrite_rules() and iis7_save_url_rewrite_rules().
See #44142.

git-svn-id: https://develop.svn.wordpress.org/trunk@43362 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:03:39 +00:00
Sergey Biryukov
d99d403030 Privacy: Make sure wp_add_privacy_policy_content() does not cause a fatal error by unintentionally flushing rewrite rules outside of the admin context.
Add a `_doing_it_wrong()` message describing the correct usage of the function.

Props kraftbj, azaozz, SergeyBiryukov, YuriV.
Fixes #44142.

git-svn-id: https://develop.svn.wordpress.org/trunk@43361 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:01:42 +00:00
Sergey Biryukov
4d5b00da46 Docs: Update @since versions in Community Events class added in [42726].
See #41112.

git-svn-id: https://develop.svn.wordpress.org/trunk@43356 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:38:27 +00:00
Sergey Biryukov
51b94c3262 Privacy: Remove unnecessary This email has been sent to ###EMAIL### from privacy emails.
The line was copied from the emails that get sent when an email address changes, without considering if it made sense in the new context.

Props iandunn, ianbelanger, desrosj.
Fixes #44030.

git-svn-id: https://develop.svn.wordpress.org/trunk@43353 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:24:30 +00:00
Sergey Biryukov
a7435b7a04 Privacy: Fix typo in default privacy policy text.
Props garetharnold, abdullahramzan.
Fixes #44166.

git-svn-id: https://develop.svn.wordpress.org/trunk@43350 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:06:41 +00:00
Weston Ruter
802139d185 Privacy: Only link to menus panel in Customizer if selected privacy page can be accessed there.
Props dlh.
Fixes #44117.


git-svn-id: https://develop.svn.wordpress.org/trunk@43343 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-14 11:39:35 +00:00
Andrew Ozz
d3014a47b4 Move scheduling of old auto-draft posts deletion to get_default_post_to_edit() (where auto-drafts are created).
Fixes #44337.

git-svn-id: https://develop.svn.wordpress.org/trunk@43338 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-08 15:52:22 +00:00
Sergey Biryukov
ecb3302b45 Build/Test Tools: Replace Codex home page link in "Read more about setting up your local development environment" with a more specific handbook link.
Props abdullahramzan, johnbillion.
Fixes #44228.

git-svn-id: https://develop.svn.wordpress.org/trunk@43328 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-30 14:55:10 +00:00
Gary Pendergast
ef37f002ee Once upon a midnight dreary, while I coded, weak and weary,
In many a strange and curious file of forgotten lore—
While I pondered, blaming Nacin, my notifications suddenly awakened,
As of someone quietly DMing;—DMing me, I can’t ignore.
“’Tis some contributor,” I muttered, “DMing me an idea or four—
            Only this and nothing more.”

Ah, distinctly I remember, at WordCamp US, last December;
A mad proposal nearly laid me—down out cold—upon the floor.
Curious, I listened closely;—to a plan I agreed with, mostly—
A way to make our JavaScript—JavaScript which was a chore—
Maintainable, extendable, for the future, is what I saw.
            Guten-ready for evermore.

Open here I switch to Slack, when, with many a patch and hack,
In there stepped Omar, a JavaScript developer hardcore;
Pronouncing all the changes fit; ready now to be commit;
“There’s nothing else for us to do,” DMing me, “It’s done!” he swore—
“No longer random guessing at which file need next be explored—
            Let’s move on, we’re all aboard.”

Moved all together, grouped and managed, in folders all is packaged,
The code had all been cleaned and tidied, important parts moved to the fore,
“Though this change be useful here,” I said, “it is too large, I fear,
We couldn’t manage such a patch, we’ve done nothing like this before—
Tell me where doth go this change, change to make our codebase soar!”
            Quoth Omar, “In WordPress Core.”

Props omarreis for shepherding this significant change.
Props adamsilverstein, aduth, atimmer, dingo_bastard, frank-klein, gziolo, herregroen, jaswrks, jeremyfelt, jipmoors, jorbin, netweb, ocean90, pento, tjnowell, and youknowriad for testing, feedback, discussion, encouragement, commiserations, etc.
I make no apologies for this commit message.
Fixes #43055.



git-svn-id: https://develop.svn.wordpress.org/trunk@43309 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-23 10:04:22 +00:00
Sergey Biryukov
d612af2e5e Docs: Add missing documentation and duplicate hook references for wp_privacy_personal_data_export_file, wp_privacy_personal_data_exporters, and wp_privacy_personal_data_erasers hooks.
Props birgire.
See #44125.

git-svn-id: https://develop.svn.wordpress.org/trunk@43303 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 13:02:55 +00:00
Sergey Biryukov
0e067ab91e Privacy: Correct the error check when creating an export folder in wp_privacy_generate_personal_data_export_file().
`wp_mkdir_p()` returns `false` on error, not a `WP_Error` object.

Props birgire.
Fixes #44158.

git-svn-id: https://develop.svn.wordpress.org/trunk@43299 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 11:58:19 +00:00
Ian Dunn
ac4d875f94 Comments: Escape permalink values on edit screen to prevent XSS.
There doesn't appear to be any way for an attacker to introduce malicious input into the URL, unless a plugin is filtering the URL to add it, but it's better to be safe than sorry.

Props 1naveengiri, joyously.
Fixes #44115.


git-svn-id: https://develop.svn.wordpress.org/trunk@43290 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-16 22:38:20 +00:00
Ian Dunn
3e3db8af66 Privacy: Rename exports folder to avoid deleting other files.
Previously, personal data exports were stored in `wp-content/uploads/exports`, which is generic enough that it's likely there are existing folders with that name, either created by plugins or manually by administrators. If that folder were reused by Core, then `wp_privacy_delete_old_export_files()` would delete all of the existing files inside it, which is almost certainly not what the site owner wants or expects.

To avoid that, the folder is being renamed to include a specific reference to Core, and a more verbose description of its purpose. With those factored in, it's very unlikely that there will be any conflicts with existing folders.

The `wp_privacy_exports_dir()` and `wp_privacy_exports_url()` functions were introduced to provide a canonical source for the location, and the `wp_privacy_exports_dir` and `wp_privacy_exports_url` filters were introduced to allow plugins to customize it.

Props johnjamesjacoby, allendav.
Fixes #44091.


git-svn-id: https://develop.svn.wordpress.org/trunk@43284 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 20:21:37 +00:00
Andrew Ozz
ced82abf66 Privacy: use the more compatible word-break: break-all;, see [43278].
See #44092.

git-svn-id: https://develop.svn.wordpress.org/trunk@43282 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 20:06:39 +00:00
Andrew Ozz
6ab60cb0b6 Privacy: fix styling of the Privacy Settings buttons on mobile/small screens.
Props ianbelanger, azaozz.
Fixes #44093.

git-svn-id: https://develop.svn.wordpress.org/trunk@43279 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 19:26:04 +00:00
Andrew Ozz
b8810cc225 Privacy: fix styling of the "next steps" buttons on the Export/Erase tools screens when text is long.
Props audrasjb, ianbelanger.
Fixes #44092.

git-svn-id: https://develop.svn.wordpress.org/trunk@43278 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 18:58:29 +00:00
Ian Dunn
f822373476 Privacy: Reposition log in policy link to avoid overlapping elements.
Previously, the link used absolute positioning, in order to stick it at the bottom of the page. That was done in order to create visual separation between it and the "action" links, like "Lost Your Password?"

The absolute positioning can cause conflicts in some situations, though. For example, if extra text or error notices are added above the form, then the login link would be positioned on top of other elements.

Switching to relative positioning with extra margins avoids those issues, while maintaining the visual separation between the "action" links and the privacy policy link.

Props imath, melchoyce, desrosj, xkon, iandunn.
Fixes #44046.


git-svn-id: https://develop.svn.wordpress.org/trunk@43274 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 16:26:12 +00:00
Andrew Ozz
e72d503702 Privacy: only remove the "Suggested text has changed" bubble when an admin visits the Privacy Policy Guide screen.
Fixes #44063.

git-svn-id: https://develop.svn.wordpress.org/trunk@43269 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 17:51:04 +00:00
Andrew Ozz
cc66df9b5c Privacy: add wp_page_for_privacy_policy to populate_options().
Props ocean90.
Fixes #44076.

git-svn-id: https://develop.svn.wordpress.org/trunk@43267 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 16:59:46 +00:00
Andrew Ozz
d9e0a41c20 Privacy: fix markup for the table of contents on privacy policy guide screen.
Props ocean90, azaozz.
Fixes #44056.

git-svn-id: https://develop.svn.wordpress.org/trunk@43265 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 16:45:57 +00:00
Andrew Ozz
3ef1d8a2c9 Privacy: fix the "Privacy Policy Guide updated" message and add a link to the guide.
Props birgire, azaozz.
Fixes #44057.

git-svn-id: https://develop.svn.wordpress.org/trunk@43263 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 16:20:53 +00:00
Dominik Schilling (ocean90)
8288241045 Privacy: Remove is-dismissible class from notice when privacy info has changed.
The notice isn't dismissible as it only gets removed once you visit the privacy guide, see #44057 and #44063.

Fixes #44065.


git-svn-id: https://develop.svn.wordpress.org/trunk@43261 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 15:54:22 +00:00
Dominik Schilling (ocean90)
2865e6f324 Privacy: Don't show privacy feature pointer to new users.
Fixes #44062.

git-svn-id: https://develop.svn.wordpress.org/trunk@43259 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 15:49:55 +00:00
Andrew Ozz
b69237ecda Privacy: improve inline documentation.
Props desrosj.
Fixes #44075.

git-svn-id: https://develop.svn.wordpress.org/trunk@43256 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 14:52:49 +00:00
Andrew Ozz
76d97c7695 Privacy: fix Export and Erase Personal Data list-tables on small screens.
Props ianbelanger, subrataemfluence, desrosj.
Fixes #44026.

git-svn-id: https://develop.svn.wordpress.org/trunk@43251 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 09:20:37 +00:00
Andrew Ozz
ad88d64eb9 Privacy: define $title and $parent_file in privacy.php. Fixes showing the proper document title.
Props ocean90.
Fixes #44064.

git-svn-id: https://develop.svn.wordpress.org/trunk@43250 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 08:28:18 +00:00
Andrew Ozz
805b2761a9 Privacy: fix two typos in WP_Privacy_Policy_Content::get_default_content().
Props dlh.
Fixes #44050.

git-svn-id: https://develop.svn.wordpress.org/trunk@43249 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-13 11:14:19 +00:00
Andrew Ozz
155f8fd99a Privacy: require manage_privacy_options capability for showing WP_Privacy_Policy_Content::notice().
Props ocean90.
Fixes #44055.

git-svn-id: https://develop.svn.wordpress.org/trunk@43248 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-13 11:03:57 +00:00
Ian Dunn
4773a48012 Privacy: Reposition pointer to ensure dismiss link is always visible.
r43158 introduced a new admin pointer for the privacy tools added in 4.9.6. With the previous positioning, though, sometimes the `Dismiss` link would be fixed off screen, making it impossible for the user to dismiss the pointer. This happened when there were enough extra menu items, or when the viewport height was short enough.

This commit repositions the pointer to work around that problem. One down side of this workaround is that the arrow will not always be positioned next to the `Tools` menu, where it should be. That's an acceptable compromise given the current time constraints, though. A long term solution would be to make `WP_Pointer` robust enough to handle this use case.

Props imath, audrasjb, desrosj.
Fixes #44045.


git-svn-id: https://develop.svn.wordpress.org/trunk@43246 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-12 17:28:30 +00:00
Weston Ruter
5e9a39baa7 Customize: Hide expansion arrows in Customizer's available widgets list.
Fixes regression introduced by [42794].

Props dlh.
See #40677.
Fixes #43983.


git-svn-id: https://develop.svn.wordpress.org/trunk@43244 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-11 17:34:40 +00:00
Andrew Ozz
6508ab45cd Privacy: make creating a privacy policy page on install multisite compatible.
See #43491.

git-svn-id: https://develop.svn.wordpress.org/trunk@43243 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-11 15:43:36 +00:00
Andrew Ozz
d7e8ec62c5 Privacy: exclude the wrapper from the default policy content.
Fixes #44048.

git-svn-id: https://develop.svn.wordpress.org/trunk@43242 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-11 15:07:00 +00:00
Sergey Biryukov
2dbb76084d Privacy: On Privacy Settings screen, check if any pages exist before displaying the page selector.
Props abdullahramzan, desrosj, melchoyce.
Fixes #43940.

git-svn-id: https://develop.svn.wordpress.org/trunk@43238 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 21:38:45 +00:00
Sergey Biryukov
33b742f7d1 Privacy: Normalize file paths in wp_privacy_generate_personal_data_export_file() to make sure Windows paths don't have their backslashes stripped.
Props xkon, pmbaldha.
Fixes #43908.

git-svn-id: https://develop.svn.wordpress.org/trunk@43234 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 21:11:00 +00:00
Sergey Biryukov
0a56b67b52 Privacy: Update request confirmation notice text for clarity.
Props desrosj, melchoyce, garrett-eclipse.
Fixes #43970.

git-svn-id: https://develop.svn.wordpress.org/trunk@43232 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:52:54 +00:00
Sergey Biryukov
bc5ecec3fc Privacy: Send an email notification to the user once their personal data erasure request is fulfilled.
Props desrosj, allendav, garrett-eclipse.
Fixes #43973.

git-svn-id: https://develop.svn.wordpress.org/trunk@43230 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:42:15 +00:00
Sergey Biryukov
8adbf40bc2 Privacy: Avoid a PHP notice in wp_ajax_wp_privacy_erase_personal_data(), make sure $eraser_key is always defined.
Props allendav.
Fixes #44040.

git-svn-id: https://develop.svn.wordpress.org/trunk@43228 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:23:33 +00:00
Ian Dunn
6d4c88a057 Privacy: Replace intrusive policy update notice with menu bubbles.
Previously, when a plugin updated its suggested privacy policy text, an admin notice was shown on all screens in the Administration Panels. That was done in order to make sure that administrators were aware of it, so that they could update their policy if needed. That was a very heavy-handed and intrusive approach, though, which leads to a poor user experience, and notice fatigue. 

An alternative approach is to use bubble notifications in the menu, similar to when plugins have updates that need to be installed. That still makes it obvious that something needs the administrator's attention, but is not as distracting as a notice.

The notice will still appear on the Privacy page, though, since it is relevant to that screen, and provides an explanation of why the bubble is appearing.

Props azaozz, xkon, iandunn.
Fixes #43954. See #43953.


git-svn-id: https://develop.svn.wordpress.org/trunk@43223 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 19:51:58 +00:00
Sergey Biryukov
a322b9479d Privacy: Tweak Privacy Policy page intro text for clarity.
Props macbookandrew, allendav.
See #43933.

git-svn-id: https://develop.svn.wordpress.org/trunk@43218 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 16:11:38 +00:00
Andrew Ozz
512fe2b90f Privacy: fix styling on personal data tables.
Props melchoyce, allendav.
Fixes #43909.

git-svn-id: https://develop.svn.wordpress.org/trunk@43216 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 16:01:50 +00:00
Andrew Ozz
56079a45fd Privacy: cleanup of the "Export Personal Data" and "Erase Personal Data" screens.
Props desrosj, xkon.
See #43929.

git-svn-id: https://develop.svn.wordpress.org/trunk@43212 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 10:00:19 +00:00
Ian Dunn
59e58199e5 Privacy: Reposition admin pointer to avoid covering collapsed menu.
Previously the pointer overlapped the menu in order to draw attention to the fact that it applies to both the `Tools` and `Settings` menus. That caused a conflict if the menu was collapsed, though, because the icons were covered by the pointer and therefore inaccessible.

Additionally, minor tweaks were made to the text order and formatting. The order of the two sections was swapped in the title and paragraph, in order to match the order of the corresponding menu items. The spacing around headings and paragraphs was tweaked to remove extraneous whitespace.

Props littler.chicken, desrosj, ianbelanger, melchoyce.
Fixes #43961.


git-svn-id: https://develop.svn.wordpress.org/trunk@43210 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 03:02:03 +00:00
Sergey Biryukov
6d4bb2c508 Privacy: Pass export request ID to wp_privacy_personal_data_export_file_created filter.
Props thomasplevy.
Fixes #44031.

git-svn-id: https://develop.svn.wordpress.org/trunk@43208 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 23:17:03 +00:00
Sergey Biryukov
de1fbae529 Privacy: Make the help hint for Privacy Policy page more translatable and accessible.
Props tobifjellner.
See #43980.

git-svn-id: https://develop.svn.wordpress.org/trunk@43206 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 23:11:29 +00:00
John Blackbourn
2fd58a997f Upgrade/Install: Correctly internationalise error messages during config setup.
Fixes #43997


git-svn-id: https://develop.svn.wordpress.org/trunk@43205 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 22:51:37 +00:00
Andrew Ozz
80333a91e2 Privacy: fixes for the privacy policy guide and suggested content:
- Separate the guide text form the suggested policy text.
- Add table of content for easier navigation.
- Move the content to tools.php (prevents the settings menu of being open).
- Add a link to the guide from the Privacy settings screen.

Props melchoyce, azaozz.
See #43980.

git-svn-id: https://develop.svn.wordpress.org/trunk@43203 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 20:50:54 +00:00
Andrew Ozz
da40024f7f Privacy: remove the help tab from Settings => Privacy until we have something helpful to say :)
Props allendav.
See #44023.

git-svn-id: https://develop.svn.wordpress.org/trunk@43201 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 18:11:56 +00:00
Andrew Ozz
21a18a15e1 Privacy: fix spacing on small screens for the Use This Page button in Privacy Tools.
Props PressTigers, desrosj.
Fixes #43852.

git-svn-id: https://develop.svn.wordpress.org/trunk@43193 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 16:12:37 +00:00
Sergey Biryukov
ed966ccb53 Privacy: Add id attribute to WP_Privacy_Requests_Table and WP_Privacy_Data_Export_Requests_Table rows, for consistency with other post list tables.
Props desrosj.
Fixes #44015.

git-svn-id: https://develop.svn.wordpress.org/trunk@43191 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 15:05:15 +00:00
Ian Dunn
f3787b2c90 Privacy: Mark erasure requests as completed after processing.
r42986 introduced the beginnings of an Ajax handler for processing requests to erase personal data. At the time, a method for marking requests as completed was planned, but had not yet been created. This commit introduces that mechanism, bringing the erasure process closer to completion.

Props coreymckrill, allendav.
Fixes #43922.


git-svn-id: https://develop.svn.wordpress.org/trunk@43185 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-09 01:01:12 +00:00
Andrew Ozz
a885a5ac06 Privacy: outputting the privacy policy guide and suggested content to a new page instead of a postbox.
Props melchoyce, azaozz.
See #43980.

git-svn-id: https://develop.svn.wordpress.org/trunk@43184 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-08 23:44:57 +00:00
Ian Dunn
a583f61558 Privacy: Mark processed requests as completed instead of confirmed.
r43008 refactored the request flow to make several improvements, but accidentally marked `completed` requests as `confirmed`. This commit restores the intended statuses, so that the data and corresponding UI reflect reality.

Props allendav, birgire.
Fixes #43913.


git-svn-id: https://develop.svn.wordpress.org/trunk@43183 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-08 23:28:47 +00:00
Andrew Ozz
d4676a426c TinyMCE: fix setting of zIndex on the dialogs.
Props subrataemfluence, azaozz.
See #43984.

git-svn-id: https://develop.svn.wordpress.org/trunk@43181 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-08 20:53:12 +00:00
Ian Dunn
a631c2378d Privacy: Reuse existing archive filenames to maintain URLs.
Whenever an admin initiates a download or email of a personal data export, a fresh copy of the file is generated. Previously, a new filename was used each time, which could lead to situations where a URL that was emailed to a data subject is broken.

That can be avoided by reusing the same filename when building fresh archives.

Props desrosj, tz-media, allendav.
Fixes #43905.


git-svn-id: https://develop.svn.wordpress.org/trunk@43180 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-08 00:51:59 +00:00
John Blackbourn
a131758bf5 Plugins: Correct another instance of incorrect parameter ordering when displaying plugins with more than one million active installations.
See #43193


git-svn-id: https://develop.svn.wordpress.org/trunk@43179 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-07 21:42:47 +00:00
John Blackbourn
287be5420c Plugins: Correct the parameters used when displaying plugins with more than one million active installations.
Fixes #43193


git-svn-id: https://develop.svn.wordpress.org/trunk@43178 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-07 21:29:49 +00:00
John Blackbourn
1decf42f3a Docs: Update and correct various inline documentation.
See #42505, #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@43177 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-07 17:19:48 +00:00
Sergey Biryukov
9ca9b27110 Privacy: Use the terms "erase"/"erasure" instead of "remove"/"removal" for personal data.
Props allendav.
Fixes #43920.

git-svn-id: https://develop.svn.wordpress.org/trunk@43175 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-07 16:44:15 +00:00
Sergey Biryukov
6d2bcaa9b3 Administration: Change all the occurrences of "(opens in a new window)" to "(opens in a new tab)".
Props chetan200891, ianbelanger, afercia.
Fixes #43803.

git-svn-id: https://develop.svn.wordpress.org/trunk@43174 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-05 09:44:21 +00:00
Sergey Biryukov
b7f30ca067 Privacy: Change "Email Data" link text on "Export Personal Data" screen to "Send Export Link" for clarity.
Props birgire, ianbelanger.
Fixes #43964.

git-svn-id: https://develop.svn.wordpress.org/trunk@43172 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-05 09:16:32 +00:00
Sergey Biryukov
977f7eba24 Privacy: Remove stray closing tag in WP_Privacy_Policy_Content::get_default_content(), fix typo in @return tag.
Props dlh, tobifjellner.
Fixes #43951.

git-svn-id: https://develop.svn.wordpress.org/trunk@43170 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-04 01:55:41 +00:00
Sergey Biryukov
1d6e7f0421 Docs: Add missing duplicate hook comment for user_request_key_expiration filter.
Props birgire, desrosj.
Fixes #43934.

git-svn-id: https://develop.svn.wordpress.org/trunk@43168 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-04 01:48:03 +00:00
Ian Dunn
83618c29c0 Privacy: Redirect to newly created Privacy Policy page to improve UX.
Previously the user was shown a message that the page was created, but might not understand that they still need to visit the page and publish it. Redirecting them to the page makes it more obvious that additional steps are involved.

Props Clorith, xkon, azaozz.
Fixes #43926.


git-svn-id: https://develop.svn.wordpress.org/trunk@43160 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 20:05:14 +00:00
Ian Dunn
97eeed489d Privacy: Add an admin pointer for new privacy features in 4.9.6.
The new features are very important for some users, because of their GDPR obligations. They're also spread across multiple top-level menus, making them less discoverable. An admin pointer will help to ensure that users are aware of the new tools and how to find them.

Props desrosj, andreamiddleton, allendav, xkon. 
Fixes #43942.


git-svn-id: https://develop.svn.wordpress.org/trunk@43158 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 19:44:36 +00:00
Andrew Ozz
a7fcbcae89 Privacy: rename manage_privacy_policy to manage_privacy_options.
Props desrosj.
FIxes #43935.

git-svn-id: https://develop.svn.wordpress.org/trunk@43155 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 19:30:49 +00:00
Ian Dunn
4bb19e4aca Privacy: Store plugin callbacks in associative array for flexibility.
The personal data export and erasure tools allow plugins to register their own callbacks, in order to add additional data to the export and erasure processes. Previously, these were registered without specifying a constant identifier in the array of callbacks. Using mutable integers makes it difficult for plugins to modify the callbacks of other plugins, though.

Using associative array keys instead provides a covenient and reliable way to identify and interact with another plugin's callbacks.

Props desrosj, allendav, ocean90.
Fixes #43931.


git-svn-id: https://develop.svn.wordpress.org/trunk@43154 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 19:27:14 +00:00
Andrew Ozz
7cca1e9cad Privacy: use sprintf() in translations.
Props birgire.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43150 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 18:24:55 +00:00
Andrew Ozz
4b6fe406ad Privacy: fix typos and inconsistencies in the default suggested text.
Props macbookandrew.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43148 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 17:41:19 +00:00
Ian Dunn
e4ffde6193 Privacy: Limit Privacy Settings screen to Super Admins in Multisite.
In many common Multisite use cases, the network administrator will want to set a network-wide privacy policy -- via the `privacy_policy_url` filter -- for consistency and convenience. When that's done, the Privacy Settings screen on individual sites becomes unnecessary, and may confuse administrators of those sites when they see that their changes don't have any effect on the policy link in the footer.

Since we can't programatically determine which behavior the network admins would like, the safest default setting is to restrict the ability to super admins, and let them delegate it to individual site owners via a plugin, if they'd like to.

Fixes #43935.


git-svn-id: https://develop.svn.wordpress.org/trunk@43147 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 17:24:35 +00:00
Andrew Ozz
1624143830 Privacy: change how the default text for privacy policy is added:
- Insert both the text and tutorial in new policy pages and highlight is brightly in the editor.
- Show only the suggested text in the policy postbox.

Props melchoyce, azaozz.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43146 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 17:12:43 +00:00
Ian Dunn
88717a5d07 Privacy: Move privacy policy page to Settings menu for consistency.
The page was originally placed under `Tools` so that it would be grouped with the pages to export and erase personal data, since they're all part of the effort to bring privacy management tools to Core ahead of GDPR's deadline. After more consideration, though, it makes sense to move this page to the `Settings` menu, since it's fundamental purpose is to configure an option, rather than to facilitate a recurring task. This keeps all of the configuration pages in a single place, making them consistent and easier to find.

Exporting and erasing personal data are recurring tasks, so they still make sense under the `Tools` menu.

Props xkon, helen, melchoyce, allendav, desrosj, ocean90, azaozz.
Fixes #43873.


git-svn-id: https://develop.svn.wordpress.org/trunk@43145 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 16:40:31 +00:00
Andrew Ozz
071cc142d3 Privacy: fix displaying of messages during personal data erasure.
Props allendav.
Fixes #43943.

git-svn-id: https://develop.svn.wordpress.org/trunk@43139 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 09:22:00 +00:00
Ian Dunn
31efcda314 Privacy: Uncapitalize "privacy policy" when used in a sentence.
In these contexts, "privacy policy" is not a proper noun, and therefore should not be capitalized.

The remaining uses are page titles and section headers, where capitalization is appropriate.

Props idea15, garrett-eclipse, allendav.
Fixes #43435.


git-svn-id: https://develop.svn.wordpress.org/trunk@43132 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 00:17:13 +00:00
Ian Dunn
044926f568 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43131 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 00:06:48 +00:00
Andrew Ozz
506a99ef30 Privacy: do not fold a single section in the privacy policy poxtbox.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43126 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 22:09:19 +00:00
Andrew Ozz
233d273f49 Privacy: fix typo.
Props casiepa.
Fixes #43939.

git-svn-id: https://develop.svn.wordpress.org/trunk@43121 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 20:06:01 +00:00
Ian Dunn
6e5a2e295c 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43120 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 19:48:01 +00:00
Andrew Ozz
e678d4ea6d Privacy: fix inconsistencies in new strings.
Props audrasjb.
Fixes #43925.

git-svn-id: https://develop.svn.wordpress.org/trunk@43118 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 18:41:10 +00:00
Sergey Biryukov
095c047ced Docs: Correct DocBlock formatting for wp_privacy_personal_data_erasers filter.
See #43637.

git-svn-id: https://develop.svn.wordpress.org/trunk@43104 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:13:51 +00:00
Sergey Biryukov
489acfc57e I18N: Use consistent pattern for placeholder references in translator comments in wp-admin/privacy.php.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/trunk@43091 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 01:57:44 +00:00
Sergey Biryukov
62856dd409 I18N: Use consistent pattern for placeholder references in a translator comment in wp-admin/update-core.php.
See #43523.

git-svn-id: https://develop.svn.wordpress.org/trunk@43090 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 01:54:48 +00:00
Sergey Biryukov
f908280af9 I18N: Correct translator comment in wp_privacy_generate_personal_data_export_file().
See #43546.

git-svn-id: https://develop.svn.wordpress.org/trunk@43089 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 01:51:13 +00:00
Sergey Biryukov
c14a248ba7 I18N: Use consistent pattern for placeholder references in translator comments in wp_ajax_wp_privacy_erase_personal_data().
See #43438.

git-svn-id: https://develop.svn.wordpress.org/trunk@43088 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 01:38:52 +00:00
Ian Dunn
1a4e28818f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@43085 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 01:07:00 +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
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
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
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
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
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
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
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
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
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
Andrew Ozz
6cd0ee3b7a Privacy: add better docs for wp_add_privacy_policy_content() and WP_Privacy_Policy_Content::add().
See #43620.

git-svn-id: https://develop.svn.wordpress.org/trunk@43003 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-25 18:10:00 +00:00
Andrew Ozz
6bee78edcf Privacy: fix styling of counts on the list tables for user requests.
Props allendav.
Fixes #43846.

git-svn-id: https://develop.svn.wordpress.org/trunk@43000 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-24 21:34:59 +00:00
Andrew Ozz
84251cc161 Make the string WordPress translatable.
Props mnelson4.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/trunk@42999 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-24 21:22:52 +00:00
Felix Arntz
f3150c77c5 Plugins: Show the required PHP version in the plugin details view, if specified.
Props xkon.
Fixes #43650.


git-svn-id: https://develop.svn.wordpress.org/trunk@42998 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-24 11:40:25 +00:00
Andrew Ozz
7e26130f12 Privacy: add functionality to anonymize commenters.
Props xkon, fclaussen, allendav, birgire, azaozz.
See #43442.

git-svn-id: https://develop.svn.wordpress.org/trunk@42994 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-20 12:18:35 +00:00
Andrew Ozz
ed3b9746ce 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42992 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-19 12:38:44 +00:00
Aaron Jorbin
770fbb4bcb Privacy: Fix JSHint errors
Introduced in [42986].

See #43440.


git-svn-id: https://develop.svn.wordpress.org/trunk@42989 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-19 00:22:11 +00:00
Andrew Ozz
cdb3f044c4 Privacy: add means to erase personal data by username or email address. First run.
Props allendav, coreymckrill, ericdaams, azaozz.
See #43637, #43602.

git-svn-id: https://develop.svn.wordpress.org/trunk@42986 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-18 22:29:59 +00:00
Andrew Ozz
7eb3daf562 Fix typo in 'wp_get_default_privacy_policy_content' filter.
Props claudiu.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/trunk@42985 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-17 21:08:38 +00:00
Sergey Biryukov
b7ab3c7064 I18N: Use consistent pattern for placeholder references in a translator comment in media_upload_max_image_resize().
See #43523.

git-svn-id: https://develop.svn.wordpress.org/trunk@42984 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-16 18:36:03 +00:00
Sergey Biryukov
031a90a6b3 I18N: Correct placeholder references in a translator comment in wp_print_file_editor_templates().
Props afercia.
See #43523.

git-svn-id: https://develop.svn.wordpress.org/trunk@42983 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-16 18:35:44 +00:00
Andrew Ozz
bb4dff10f6 Fix typo (missing !).
See #43491.

git-svn-id: https://develop.svn.wordpress.org/trunk@42982 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-16 10:13:38 +00:00
Andrew Ozz
5786dee456 Privacy: automatically create a Privacy Policy page when installing WordPress.
Props fclaussen, azaozz.

Fixes #43491.

git-svn-id: https://develop.svn.wordpress.org/trunk@42981 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-16 08:59:19 +00:00
Andrew Ozz
257842079c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42980 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-16 08:52:18 +00:00
Peter Wilson
1a40a17275 Upgrade/Install: Use high-dpi plugin icons on update dashboard.
Reorder the `$preferred_icons` array for plugins to prefer high-dpi icons (2x) over standard-dpi icons (1x).

Props dd32.
Fixes #43727.



git-svn-id: https://develop.svn.wordpress.org/trunk@42979 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-16 00:12:03 +00:00
Andrew Ozz
1af1f65a21 Privacy: improve the screen for setting a privacy policy page.
Props melchoyce, xkon, azaozz.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/trunk@42978 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-13 17:55:25 +00:00
Andrew Ozz
99c3f4594a Privacy: fix error message and list table sorting errors on the Export Personal Data and Remove Personal Data screens.
See #43481.

git-svn-id: https://develop.svn.wordpress.org/trunk@42977 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-13 16:14:54 +00:00
Dominik Schilling (ocean90)
9f9facad50 Administration: Avoid an extra space in the admin body class.
Props jainnidhi, rhetorical, birgire, mathieuhays.
Fixes #43465.

git-svn-id: https://develop.svn.wordpress.org/trunk@42974 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-13 14:02:10 +00:00
Andrew Ozz
43b5e9ac20 Privacy: add helper function for anonymizing data in a standardized way.
Props jesperher, allendav, iandunn, birgire, azaozz.
Fixes #43545.

git-svn-id: https://develop.svn.wordpress.org/trunk@42971 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-12 21:19:24 +00:00
Ian Dunn
ede824e3cd 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42968 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-10 23:18:04 +00:00
Andrew Ozz
33979450ac Privacy: add new wp-admin screens for exporting and removing of personal data.
Props @melchoyce, @mikejolley, @allendav, @xkon.
See #43481.

git-svn-id: https://develop.svn.wordpress.org/trunk@42967 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-10 18:01:20 +00:00
Adam Silverstein
d68affa9c2 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.  



git-svn-id: https://develop.svn.wordpress.org/trunk@42966 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-10 16:11:55 +00:00
Anton Timmermans
3a78d2e0fb Docs: Improve JSDoc for wp-admin/js/tags-box.js.
Props carolinegeven, andizer, ireneyoast, herregroen, jjcomack.
Fixes #43499.


git-svn-id: https://develop.svn.wordpress.org/trunk@42963 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-06 07:46:14 +00:00
Anton Timmermans
da6b1b64ae Docs: Fix JS Docs for custom-header.js.
Amends [42385].

Props herregroen.
See #42678.


git-svn-id: https://develop.svn.wordpress.org/trunk@42962 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-05 13:39:42 +00:00
Felix Arntz
0db556da6c 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42891 602fd350-edb4-49c9-b593-d223f7449a82
2018-04-02 10:14:53 +00:00
Andrew Ozz
a0cd3d6d7a Privacy: add support for exporting multiple pages of personal data.
Props allendav.
See #43438.

git-svn-id: https://develop.svn.wordpress.org/trunk@42889 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-28 19:27:59 +00:00
Sergey Biryukov
f44423cfb9 Media: Pass EXIF data to the wp_read_image_metadata filter.
Props desrosj.
Fixes #43624.

git-svn-id: https://develop.svn.wordpress.org/trunk@42879 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-25 20:44:16 +00:00
Sergey Biryukov
0c2bbd4441 Media: In wp_read_image_metadata(), rename $sourceImageType variable to $image_type to match coding standards.
See #43624.

git-svn-id: https://develop.svn.wordpress.org/trunk@42878 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-25 20:40:03 +00:00
John Blackbourn
cf400b9bc4 Docs: Correct and improve various inline documentation.
See #42505


git-svn-id: https://develop.svn.wordpress.org/trunk@42877 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-25 19:34:31 +00:00
John Blackbourn
d541798a64 Docs: Document more parameters and properties using typed array notation.
See #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@42875 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-25 18:09:56 +00:00
Sergey Biryukov
7c2f97597d 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42873 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-23 00:33:53 +00:00
John Blackbourn
58dd2c9559 Docs: Revert some sneaky debugging code.
See #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@42872 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-22 20:28:42 +00:00
John Blackbourn
f12dec95fe Docs: Document many more parameters and properties using typed array notation.
See #41756


git-svn-id: https://develop.svn.wordpress.org/trunk@42871 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-22 20:26:06 +00:00
Sergey Biryukov
f9b33fb524 Media: On Media Settings screen, make the pairs of labels and inputs always stacked vertically, on both mobile and desktop screens.
Make `<br />` tags on the screen behave as line breaks again after [41836]. Add a missing fieldset + legend for better accessibility.

Props afercia, RavanH, obenland, garrett-eclipse.
Fixes #42724. See #34539.

git-svn-id: https://develop.svn.wordpress.org/trunk@42864 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 22:43:58 +00:00
Andrea Fercia
6f408cf561 Accessibility: Menus screen: Improve headings and instructions for better accessibility.
Props audrasjb, melchoyce, juliemoynat.
Fixes #43397.


git-svn-id: https://develop.svn.wordpress.org/trunk@42857 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 17:46:12 +00:00
Dominik Schilling (ocean90)
0cc1c11049 Users: Don't show roles dropdown on user-edit.php if current user cannot promote user.
Fixes #43580.

git-svn-id: https://develop.svn.wordpress.org/trunk@42856 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-19 20:55:20 +00:00
Dominik Schilling (ocean90)
877a59a843 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42855 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-19 20:28:28 +00:00
Dominik Schilling (ocean90)
8df8cf2df1 Pinking shears.
See #41057.

git-svn-id: https://develop.svn.wordpress.org/trunk@42843 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 14:22:09 +00:00
Felix Arntz
8e4bd924d2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42836 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-16 02:14:04 +00:00
Felix Arntz
5f56921131 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42832 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-12 16:42:11 +00:00
John Blackbourn
a4f6e8dadb 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


git-svn-id: https://develop.svn.wordpress.org/trunk@42830 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-12 10:56:53 +00:00
Dion Hulse
36d237cc13 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42829 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-12 01:56:20 +00:00
Sergey Biryukov
1fddd69163 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42827 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-11 16:43:59 +00:00
Sergey Biryukov
baf669ffea Docs: Fix typo in a comment in WP_Community_Events::trim_events().
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@42826 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-11 10:34:10 +00:00
Sergey Biryukov
637b4d8f80 Docs: Add missing brace in auto_update_{$type} filter DocBlock.
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@42825 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-11 10:29:47 +00:00
Andrew Ozz
75bf3a3d15 Accessibility improvements for the Privacy Tools screen.
Propr afercia.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/trunk@42823 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-10 14:00:03 +00:00
Sergey Biryukov
01df4ffa33 Docs: Use WP_Term instead of generic object type for the $tag parameter in wp-admin/edit-tag-form.php hook docs.
Props xhezairi, ocean90.
Fixes #43507.

git-svn-id: https://develop.svn.wordpress.org/trunk@42822 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-10 02:00:10 +00:00
Adam Silverstein
1b043c1492 Media: Fix image cropping on touch screen devices.
* In initCrop, handle touch events in addition to mouse events.
* In imageSelect jQuery plugin, accept event.which of 0 as provided by touch events.

Props yahil, alexgso, joemcgill.
Fixes #41242.


git-svn-id: https://develop.svn.wordpress.org/trunk@42818 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 17:26:53 +00:00
Adam Silverstein
fd1681f0cf Customizer menus: correct oversized viewport after dragging menu items.
Fix an issue where the screen viewport resized to an oversized state on mobile devices after moving sub-menus.

Props kwonye.
Fixes #36884.


git-svn-id: https://develop.svn.wordpress.org/trunk@42817 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 17:05:38 +00:00
Andrew Ozz
03b3c61e36 Add Privacy Tools admin page under the Tools menu.
Props allendav, xkon, azaozz.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/trunk@42814 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 15:03:59 +00:00
Andrea Fercia
4fef5ff721 Accessibility: Underline the links in the Plugins descriptions and update notices.
Links within blocks and lines of text should always be underlined.

Props Travel_girl, chetan200891, Shital Patel.
Fixes #42647.


git-svn-id: https://develop.svn.wordpress.org/trunk@42810 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 23:19:08 +00:00
Sergey Biryukov
a846684cfc Docs: Improve documentation for add_meta_boxes and do_meta_boxes actions.
Props danieltj, johnbillion, SergeyBiryukov.
Fixes #43229.

git-svn-id: https://develop.svn.wordpress.org/trunk@42796 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 03:56:50 +00:00
Sergey Biryukov
a1ce238e6f Docs: Document globals in wp-admin/revision.php as @global instead of @param.
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@42795 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 03:52:24 +00:00
Andrea Fercia
9054719d29 Accessibility: Widgets: Make the "Available Widgets" section operable with a keyboard.
For a number of years, the "Available Widgets" section has been off-limits for
keyboard users. Now it can be used also with the keyboard. This change introduces
also some improvements for assistive technologies.

- makes the widget toggles focusable and adds an `aria-expanded` attribute to indicate their state
- improves the toggles labelling to clarify context (add/edit)
- changes the controls to choose a sidebar from list items to buttons
- adds an `aria-label` attribute to the buttons to clarify their purpose
- adds an `aria-pressed` attribute to the buttons to indicate which one is selected
- improves color contrast of the selected button
- uses a `wp.a11y.speak()` message to announce to screen reader users when a widget has been added to a sidebar
- moves focus back to the toggle button when closing a widget

See #40677.


git-svn-id: https://develop.svn.wordpress.org/trunk@42794 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-07 22:26:39 +00:00