Commit Graph

6738 Commits

Author SHA1 Message Date
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
Sergey Biryukov
15e969be8d Docs: Add missing brace in auto_update_{$type} filter DocBlock.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42825


git-svn-id: http://core.svn.wordpress.org/trunk@42655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 10:30:33 +00:00
Andrea Fercia
ffedf3d752 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 22:27:31 +00:00
Mike Schroder
51b0a3cd28 Media: Correctly allow changing PDF thumbnail crop value.
Corrects logic that keeping plugins from setting crop value of intermediate image sizes for rendered PDFs.

Adds test.

Props leemon, SergeyBiryukov, chetan200891, birgire.
Fixes #43226.
Built from https://develop.svn.wordpress.org/trunk@42792


git-svn-id: http://core.svn.wordpress.org/trunk@42622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 01:19:31 +00:00
Andrea Fercia
6a4b2a022a Accessibility: Make the Widgets screen "Enable accessibility mode" link more discoverable.
For a number of years, the link to the Widgets screen "Accessibility mode" lived
in the Screen Options panel, hidden by default. Many users, including assistive
technologies users, weren't able to find it or even aware it existed. By bringing
the link in the main screen, visible by default, this change makes the
"Accessibility mode" easily discoverable for everyone.

Props chetan200891, antonioeatgoat.
Fixes #42778.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-06 17:21:33 +00:00
John Blackbourn
c9b07e6411 Docs: Standardise and correct documentation relating to parameters which accept plugin names.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 21:50:31 +00:00
John Blackbourn
087b52dced Upgrade/Install: Fix the format of the upgrader_process_complete actions after [42343].
More info: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1323

See #41057, #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@42616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 21:44:30 +00:00
Sergey Biryukov
31a3083c28 Help/About: Update "WordPress News" widget references in help text and inline documentation.
Props monikarao, denisco.
Fixes #43400, #43472.
Built from https://develop.svn.wordpress.org/trunk@42781


git-svn-id: http://core.svn.wordpress.org/trunk@42611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 03:04:31 +00:00
Sergey Biryukov
5596017878 Media: Recognize .ico files as displayable images on PHP 5.3+ and allow attachment meta data to be generated for them.
Props remyvv, Guido07111975.
Fixes #43458.
Built from https://develop.svn.wordpress.org/trunk@42780


git-svn-id: http://core.svn.wordpress.org/trunk@42610 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 01:03:31 +00:00
Sergey Biryukov
3385d5b2de Docs: Expand delete_theme() return value, fix typo in delete_plugins() return value.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42778


git-svn-id: http://core.svn.wordpress.org/trunk@42608 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 22:07:29 +00:00
Sergey Biryukov
58592b64dc Docs: Use consistent description for $wp_filesystem global.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42777


git-svn-id: http://core.svn.wordpress.org/trunk@42607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:58:30 +00:00
Sergey Biryukov
179bec1306 Docs: Clarify return values and improve DocBlock formatting for verify_file_md5(), unzip_file(), _unzip_file_ziparchive(), _unzip_file_pclzip(), copy_dir(), WP_Filesystem().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42776


git-svn-id: http://core.svn.wordpress.org/trunk@42606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:43:30 +00:00
Sergey Biryukov
3c8ae81018 Docs: Clarify download_url() return value, improve DocBlock formatting.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42775


git-svn-id: http://core.svn.wordpress.org/trunk@42605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 19:50:31 +00:00
Sergey Biryukov
86c3c7e1c9 Filesystem API: Allow download_url() to return the response code and body on error as an additional WP_Error object data.
The error response body size is limited to 1 KB by default to avoid taking up too much memory. The size can be increased using `download_url_error_max_body_size` filter.

Props soulseekah, campusboy1987, mihdan, SergeyBiryukov.
Fixes #43329.
Built from https://develop.svn.wordpress.org/trunk@42773


git-svn-id: http://core.svn.wordpress.org/trunk@42603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 17:14:31 +00:00
Dominik Schilling
d950c75307 Import: Avoid counting an uncountable type when reading arguments passed to a script.
Props josephscott.
Fixes #42898.
Built from https://develop.svn.wordpress.org/trunk@42771


git-svn-id: http://core.svn.wordpress.org/trunk@42601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-02 17:17:31 +00:00
Andrea Fercia
d2d64f13c7 Accessibility: Change the comments "Quick Edit" and "Reply" links to buttons.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.

Props Cheffeid, audrasjb, afercia.
See #43382, #38677.
Fixes #43376.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 22:36:34 +00:00
Sergey Biryukov
0e802a627d General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.
Built from https://develop.svn.wordpress.org/trunk@42761


git-svn-id: http://core.svn.wordpress.org/trunk@42591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 02:31:31 +00:00
Sergey Biryukov
669f8bb750 Media: Remove unnecessary aria-required attribute from legacy (pre-3.5.0) media functions, added in [7888].
At the time, having both `required` and `aria-required` meant a wider range of support for browsers and assistive technology. Today, it's safe to use just `required`.

Props shital-patel, afercia, audrasjb.
Fixes #43415.
Built from https://develop.svn.wordpress.org/trunk@42759


git-svn-id: http://core.svn.wordpress.org/trunk@42589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 23:10:31 +00:00
Dominik Schilling
666e203f31 Administration: Remove unnecessary capitalization when referencing to plugin/theme editors.
Fixes #43072.
Built from https://develop.svn.wordpress.org/trunk@42757


git-svn-id: http://core.svn.wordpress.org/trunk@42587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 19:35:30 +00:00
Sergey Biryukov
a018cdd4e3 Docs: Add missing @since entries for functions in wp-admin/image-edit.php.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42756


git-svn-id: http://core.svn.wordpress.org/trunk@42586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 18:38:31 +00:00
Sergey Biryukov
b026fde152 Docs: Remove @static notations from property DocBlocks in wp-admin/* and wp-includes/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42747


git-svn-id: http://core.svn.wordpress.org/trunk@42577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:32:30 +00:00
Sergey Biryukov
0fea564b7d Docs: Remove @static notations from method DocBlocks in wp-admin/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42745


git-svn-id: http://core.svn.wordpress.org/trunk@42575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:06:30 +00:00
Adam Silverstein
505c2ddb61 Taxonomy: restore TagSearch unit tests and correct deprecated version string.
Reverts unit test removal, instead changing them to expect the function to be deprecated.
Correct the version the ajax callback was deprecated.

Amends [42614].

Props dlh, ocean90.
Fixes #38922.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:28:30 +00:00
Sergey Biryukov
fc5617e7fe Administration: Use HTTPS for dashboard_primary_feed URL.
`dashboard_secondary_feed` is already using HTTPS since [29787].

Props iandunn.
Fixes #40416.
Built from https://develop.svn.wordpress.org/trunk@42731


git-svn-id: http://core.svn.wordpress.org/trunk@42561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-24 09:30:33 +00:00
Aaron Jorbin
f4f64377b7 Community Events Dashboard: Use wp_list_pluck rather than array_columns
array_columns is only available in PHP 5.5+

Introduced in [42726]

See: #41112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:27:31 +00:00
Andrea Fercia
54a45f6d77 Accessibility: Change the terms "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.
See #38677 / [42725].

Fixes #43382.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:04:31 +00:00
Aaron Jorbin
9f8d1ab69d Community Events Dashboard: Always show a WordCamp if one is coming up
WordCamps are celebrations of the local WordPress Community and once a local one is scheduled, people in that community should know it is coming. This adjusts the WordPress Events in the dashboard widgets to always display a WordCamp, even if there are multiple Meetups happening first.

Props iandunn, metalandcoffee, warmlaundry, alejandroxlopez, jorbin.
Fixes #41112.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:01:31 +00:00
Andrea Fercia
4767e7736c Accessibility: Change the posts "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation. Also,
adds an `aria-expanded` attribute to the button to communicate to assistive
technologies the expanded / collapsed status of the Quick Edit form.

Props Cheffheid, audrasjb, afercia.
Fixes #38677.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 22:31:32 +00:00
Sergey Biryukov
dcf5eb07de Docs: Correct documentation for Heartbeat filters.
`$response` parameter is documented as an array or object, but only array is actually supported.

See #42777, #42505.
Built from https://develop.svn.wordpress.org/trunk@42720


git-svn-id: http://core.svn.wordpress.org/trunk@42548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 21:46:33 +00:00
Peter Wilson
e6ccdf161f General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 02:13:32 +00:00
Konstantin Obenland
3f7a8aac6b Docs: Add filter docs for wp_refresh_nonces
Props chetan200891, slushman, dlh, netweb.
Fixes #42777.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-17 04:42:33 +00:00