Commit Graph

38133 Commits

Author SHA1 Message Date
John Blackbourn
71d2050014 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


git-svn-id: https://develop.svn.wordpress.org/trunk@42862 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 22:14:53 +00:00
Sergey Biryukov
db606c9bb2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42860 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 21:34:15 +00:00
Jeremy Felt
4902da091c Multisite: Use case-insensitive check on email domain whitelist.
Props greatislander.
Fixes #43148.


git-svn-id: https://develop.svn.wordpress.org/trunk@42858 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-20 19:06:09 +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)
ff5180e2a5 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42852 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 17:20:47 +00:00
Dominik Schilling (ocean90)
cde40c918f 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42851 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 17:03:20 +00:00
Dominik Schilling (ocean90)
4b89863ddd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42844 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-18 14:44:47 +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
Joe McGill
9f9ff6afed 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42841 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-17 20:57:00 +00:00
Joe McGill
640a354d46 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42839 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-17 20:22:58 +00:00
Joe McGill
860b45216e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42837 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-16 20:06:41 +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
7c0cf670bc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42835 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-16 02:00:34 +00:00
Felix Arntz
a7b3f5f759 Multisite: Add missing group annotations to tests included in [42833].
This ensures tests are skipped correctly when not using multisite.

See #43506.


git-svn-id: https://develop.svn.wordpress.org/trunk@42834 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-13 17:56:05 +00:00
Felix Arntz
52a77e5254 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42833 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-13 15:36:14 +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
1e54b5a2ae Link Template: Apply get_{$adjacent}_post_excluded_terms filter to an empty excluded_terms parameter as well.
Props soulseekah, zottto.
Fixes #43521.

git-svn-id: https://develop.svn.wordpress.org/trunk@42828 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-11 17:31:04 +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
Sergey Biryukov
53fcfd87ac General: In wp_debug_backtrace_summary(), check if $call['args'] is defined to avoid a PHP notice.
Props paulschreiber.
Fixes #31215.

git-svn-id: https://develop.svn.wordpress.org/trunk@42824 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-10 17:30:12 +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
Sergey Biryukov
a9a41eb08a Docs: Fix typos in _wp_emoji_list() description.
See #42505.

git-svn-id: https://develop.svn.wordpress.org/trunk@42821 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-10 01:49:22 +00:00
Sergey Biryukov
5a2ea62a10 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42820 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-10 00:04:43 +00:00
Sergey Biryukov
9b713c6d12 Tests: Skip symlinked theme file tests if symlink() is not available, e.g. in PHP 5.2.x on Windows.
See #43508.

git-svn-id: https://develop.svn.wordpress.org/trunk@42819 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 17:47:39 +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
John Blackbourn
5816caddcf Themes: Revert [42788] as it breaks a lot of things.
See #43228


git-svn-id: https://develop.svn.wordpress.org/trunk@42816 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 16:59:57 +00:00
Andrew Ozz
9427bc4979 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42815 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 15:56:25 +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
Sergey Biryukov
94e44cd9ed Tests: Skip symlinked theme file tests if the links could not be created.
Fixes #43508.

git-svn-id: https://develop.svn.wordpress.org/trunk@42812 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-09 01:09:17 +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
70f795bc74 Docs: Improve documentation for meta capability filters.
Remove self-references, correct parameter names and descriptions.

Props milana_cap, ocean90, SergeyBiryukov.
Fixes #43504.

git-svn-id: https://develop.svn.wordpress.org/trunk@42809 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 23:18:35 +00:00
Andrea Fercia
453ef7f1c6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@42808 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 21:30:29 +00:00
Andrea Fercia
475a58b384 Accessibility: Insert Link modal: Improve keyboard interaction.
Avoids to change the selected link when using the Shift and Up/Down arrow keys
to select text in the form fields.

Fixes #43253.


git-svn-id: https://develop.svn.wordpress.org/trunk@42807 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 20:57:44 +00:00
Sergey Biryukov
19ed786c78 Filesystem API: Avoid an infinite loop in wp_mkdir_p() when trying to determine the parent folder with open_basedir restriction in effect.
Props soulseekah, 1265578519-1.
Fixes #43417.

git-svn-id: https://develop.svn.wordpress.org/trunk@42801 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 19:31:59 +00:00
Sergey Biryukov
f6de9b77f8 General: In wp_debug_backtrace_summary(), normalize paths before replacement for better cross–platform compatibility.
Props Rarst.
Fixes #43501.

git-svn-id: https://develop.svn.wordpress.org/trunk@42800 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 17:07:04 +00:00
Sergey Biryukov
257048ac71 Tests: Correct assertion in Tests_WP_Customize_Setting::test_constructor_with_args().
Props jipmoors.
See #30988, #43218.

git-svn-id: https://develop.svn.wordpress.org/trunk@42799 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 16:37:59 +00:00
Sergey Biryukov
c6ecac6ad5 Docs: Improve JSDoc for wp-includes/js/media/controllers/gallery-add.js.
Props boblinthorst, bramheijmink, manuelaugustin, ireneyoast, igorsch, nataliashitova.
Fixes #43500.

git-svn-id: https://develop.svn.wordpress.org/trunk@42798 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 16:24:16 +00:00
Sergey Biryukov
4933dff8c1 Docs: Remove copy/pasted default value description for $type in WP_Customize_Manager::add_setting().
Props DannyCooper.
Fixes #43497.

git-svn-id: https://develop.svn.wordpress.org/trunk@42797 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-08 13:05:35 +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
Andrea Fercia
77fbbbdbec Accessibility: Networks and Sites: mark the New Site required form fields as required.
Also, adds an `aria-describedby` attribute to associate the Admin Email field with its description.

Props dipesh.kakadiya, jackreichert, rianrietveld.
Fixes #37331.


git-svn-id: https://develop.svn.wordpress.org/trunk@42793 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-07 19:40:58 +00:00
Mike Schroder
3a46cba430 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@42792 602fd350-edb4-49c9-b593-d223f7449a82
2018-03-07 01:18:08 +00:00