Commit Graph

11785 Commits

Author SHA1 Message Date
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 2361ca884f Docs: Document more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 19:33:31 +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
John Blackbourn 7f36bbbdf1 Docs: Document `WP_Roles` properties with typed array notation.
Props stevenlinx

Fixes #38732
See #41756 

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


git-svn-id: http://core.svn.wordpress.org/trunk@42700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 18:56:33 +00:00
Jeremy Felt 89cb4caddc Multisite: Return `WP_Site` as expected in `get_active_blog_for_user()`.
Previously it was possible for a standard object representing the site to be returned in some cases.

Fixes #38430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 23:07:30 +00:00
Sergey Biryukov 61a0745df8 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.
Built from https://develop.svn.wordpress.org/trunk@42864


git-svn-id: http://core.svn.wordpress.org/trunk@42694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 22:44:31 +00:00
John Blackbourn 2ac3192a5a Build/Test Tools: Implement `assertNotWPError()` in appropriate places in the test suite.
Props birgire

Fixes #42065

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


git-svn-id: http://core.svn.wordpress.org/trunk@42693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 22:35:32 +00:00
John Blackbourn 1e18087867 General: Instruct file editors not to trim trailing whitespace in markdown files.
Two trailing spaces in a markdown file indicates a line break.

Props netweb

Fixes #43104

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


git-svn-id: http://core.svn.wordpress.org/trunk@42692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 22:15:31 +00:00
Sergey Biryukov 8a701e5b3f Formatting: Avoid a PHP 7.2 warning in `wp_kses_attr()` when one of `$allowedtags` elements is an uncountable value.
Props andrei0x309, soulseekah, SergeyBiryukov.
Fixes #43312.
Built from https://develop.svn.wordpress.org/trunk@42860


git-svn-id: http://core.svn.wordpress.org/trunk@42690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 21:35:31 +00:00
Jeremy Felt b05cb5e5ed Multisite: Use case-insensitive check on email domain whitelist.
Props greatislander.
Fixes #43148.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 19:07:31 +00:00
Andrea Fercia d0e1b54105 Accessibility: Menus screen: Improve headings and instructions for better accessibility.
Props audrasjb, melchoyce, juliemoynat.
Fixes #43397.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-20 17:48:21 +00:00
Dominik Schilling 80c9ed8bfa Users: Don't show roles dropdown on user-edit.php if current user cannot promote user.
Fixes #43580.
Built from https://develop.svn.wordpress.org/trunk@42856


git-svn-id: http://core.svn.wordpress.org/trunk@42686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-19 20:56: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 6fd9d2edcf REST API JavaScript Client: Support an empty string for `nonce` to disable sending the X-WP-Nonce header.
Passing a `nonce` argument with an empty string to `wp.api.init()` now does no longer fall back to `wpApiSettings.nonce`. This makes it possible to stop sending nonce headers, for example to a read-only endpoint on another site in a multisite install.

Props adamsilverstein, FPCSJames, ocean90, swissspidy.
Fixes #42948, #43266.
Built from https://develop.svn.wordpress.org/trunk@42852


git-svn-id: http://core.svn.wordpress.org/trunk@42682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 17:21:30 +00:00
Dominik Schilling 3138d89e1e REST API JS Client: Extend custom nonce functionality to collections.
This brings the improved nonce handling from [41553] to collections to remove the direct `wpApiSettings.nonce` dependency.

Props adamsilverstein, ocean90, swissspidy.
Fixes #43265.
Built from https://develop.svn.wordpress.org/trunk@42851


git-svn-id: http://core.svn.wordpress.org/trunk@42681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 17:04:30 +00:00
Dominik Schilling aaf1fc64c4 Multisite: Use a numbered placeholder in `sprintf()` for the site URL.
Fixes missing site domain in the link and a PHP warning.

Props Thomas Vitale, conner_bw.
See #41645.
Fixes #43568.
Built from https://develop.svn.wordpress.org/trunk@42844


git-svn-id: http://core.svn.wordpress.org/trunk@42674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 14:45:30 +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
Joe McGill 2cb76498ba Update unit test following r42839.
This updates the expected version number for Hello Dolly in `Tests_Ajax_Update_Plugin::test_update_plugin` following [42839].

See #43555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-17 20:57:30 +00:00
Joe McGill 0a02c87b48 Update Hello Dolly lyrics.
This updates the Hello Dolly plugin to remove lines which could be objectionable when shown in the admin out of context, and brings the lyrics more in line with Louis Armstrong's recording.

Props sebastienthivinfocom, birgire, audrasjb, joemcgill.
Fixes #43555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-17 20:23:32 +00:00
Joe McGill 06ec96a7a4 Revert max-width styles on caption shortcodes.
This is a partial revert of [41724], so image captions include an
inline `width` style instead of `max-width`.

This returns the caption shortcode to the pre-4.9.0 behavior, while
retaining the extra unit test coverage added in [41724].

Fixes #43123. See #33981.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 20:07: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 eda5ab56af Bootstrap: Load `formatting.php` and `meta.php` earlier in `wp-settings.php`.
This change is necessary to enable multisite-specific metadata functionality during the multisite bootstrap process.

See #40948.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 02:01:33 +00:00
Felix Arntz 485984e82e Multisite: Add missing group annotations to tests included in [42833].
This ensures tests are skipped correctly when not using multisite.

See #43506.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-13 17:57:30 +00:00
Felix Arntz 57fd97017e Multisite: Ensure the `{$network_id}:notoptions` array is set in cache in `get_network_option()`.
Prior to this change, the `{$network_id}:notoptions` cache would only be fetched, but not set, unless the actual database lookup would be unsuccessful. This enhancement slightly improves performance by preventing unnecessary external object cache lookups if one is used.

Fixes #43506.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-13 15:37:33 +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 81500e50ef Link Template: Apply `get_{$adjacent}_post_excluded_terms` filter to an empty `excluded_terms` parameter as well.
Props soulseekah, zottto.
Fixes #43521.
Built from https://develop.svn.wordpress.org/trunk@42828


git-svn-id: http://core.svn.wordpress.org/trunk@42658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 17:32: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
Sergey Biryukov 8bab745586 General: In `wp_debug_backtrace_summary()`, check if `$call['args']` is defined to avoid a PHP notice.
Props paulschreiber.
Fixes #31215.
Built from https://develop.svn.wordpress.org/trunk@42824


git-svn-id: http://core.svn.wordpress.org/trunk@42654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 17:31:32 +00:00
Andrew Ozz ba7b8cd8a0 Accessibility improvements for the Privacy Tools screen.
Propr afercia.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@42823


git-svn-id: http://core.svn.wordpress.org/trunk@42653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 14:01:31 +00:00
Sergey Biryukov f700ac6075 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.
Built from https://develop.svn.wordpress.org/trunk@42822


git-svn-id: http://core.svn.wordpress.org/trunk@42652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 02:01:29 +00:00
Sergey Biryukov 4e9c3f916f Docs: Fix typos in `_wp_emoji_list()` description.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42821


git-svn-id: http://core.svn.wordpress.org/trunk@42651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 01:50:30 +00:00
Sergey Biryukov 0b799bd6a7 General: In `wp_debug_backtrace_summary()`, capture hook name for `do_action_ref_array()` and `apply_filters_ref_array()` as well.
Props Rarst.
Fixes #43488.
Built from https://develop.svn.wordpress.org/trunk@42820


git-svn-id: http://core.svn.wordpress.org/trunk@42650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-10 00:05:31 +00:00
Sergey Biryukov c46a518330 Tests: Skip symlinked theme file tests if `symlink()` is not available, e.g. in PHP 5.2.x on Windows.
See #43508.
Built from https://develop.svn.wordpress.org/trunk@42819


git-svn-id: http://core.svn.wordpress.org/trunk@42649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:48:30 +00:00
Adam Silverstein e70caa19a1 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:27:31 +00:00
Adam Silverstein 6751be3561 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:06:30 +00:00
John Blackbourn d1d60bb22c Themes: Revert [42788] as it breaks a lot of things.
See #43228

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


git-svn-id: http://core.svn.wordpress.org/trunk@42646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 17:00:31 +00:00
Andrew Ozz 63dd79d908 Respect the commenter decision when they have checked the checkbox to consent to cookies, and keep it checked when they reload the page or post another comment.
See #43436.
Built from https://develop.svn.wordpress.org/trunk@42815


git-svn-id: http://core.svn.wordpress.org/trunk@42645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 15:57:30 +00:00
Andrew Ozz b93dfd3571 Add Privacy Tools admin page under the Tools menu.
Props allendav, xkon, azaozz.
See #43435.
Built from https://develop.svn.wordpress.org/trunk@42814


git-svn-id: http://core.svn.wordpress.org/trunk@42644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 15:04:33 +00:00
Sergey Biryukov 051dd178b3 Tests: Skip symlinked theme file tests if the links could not be created.
Fixes #43508.
Built from https://develop.svn.wordpress.org/trunk@42812


git-svn-id: http://core.svn.wordpress.org/trunk@42642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-09 01:10:31 +00:00
Andrea Fercia 127ecc530c 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 23:20:30 +00:00
Sergey Biryukov eaf4f346fd Docs: Improve documentation for meta capability filters.
Remove self-references, correct parameter names and descriptions.

Props milana_cap, ocean90, SergeyBiryukov.
Fixes #43504.
Built from https://develop.svn.wordpress.org/trunk@42809


git-svn-id: http://core.svn.wordpress.org/trunk@42639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 23:19:30 +00:00
Andrea Fercia 320a05019a Accessibility: Themes: use `aria-current` for the `Walker_Nav_Menu` current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of `aria-current` after [42440], [41683], [41359], and [41371].

Props williampatton, chetan200891, sami.keijonen.
Fixes #43191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-08 21:31:30 +00:00