Commit Graph

37201 Commits

Author SHA1 Message Date
Gary Pendergast
e78fe9ec6d Tests: Rename ignored tests in multisite.xml.
For  bonus :yolo: :friday:, this repeats [41262] for `multisite.xml`, which duplicates the ignored file list from `phpunit.xml.dist`.

See #41658.



git-svn-id: https://develop.svn.wordpress.org/trunk@41263 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-18 10:59:38 +00:00
Gary Pendergast
5ee7f7dfdb Tests: Rename ignored tests in phpunit.xml.dist.
Some of the files renamed in [41261] are listed in `phpunit.xml.dist`, as they need to be ignore in PHP 5.2.

This followup commit changes `phpunit.xml.dist` to match their new names.

See #41658.



git-svn-id: https://develop.svn.wordpress.org/trunk@41262 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-18 10:26:50 +00:00
Gary Pendergast
243053dfd3 Tests: Rename tests with underscore in the name
There were a handful of files with an underscore in the name, which violated our naming scheme, and caused problems for anyone how enforced the scheme on their own systems.

This commit renames all of the files to the correct camelCase scheme.

Fixes #41658.



git-svn-id: https://develop.svn.wordpress.org/trunk@41261 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-18 09:57:12 +00:00
Weston Ruter
66ee109e0a Widgets: Prevent visual Text widget from decoding encoded HTML.
Also apply `the_editor_content` filters on widget `text` with `format_for_editor()` as is done for the post editor.

Amends [40631].
Props westonruter, azaozz.
See #35243.
Fixes #41596.


git-svn-id: https://develop.svn.wordpress.org/trunk@41260 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-17 23:36:53 +00:00
Andrew Ozz
e0de3f6d1c TinyMCE: Add the default link plugin without enabling it. This makes it easy for WordPress plugins to use it at places where wplink is not suitable, for example when initializing the editor from JS.
Props turtlepod.
Fixes #41590.

git-svn-id: https://develop.svn.wordpress.org/trunk@41259 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-17 21:03:55 +00:00
Drew Jaynes
0fb490ee1a Filesystem: Introduce the pre_move_uploaded_file filter.
Passing a non-null value to the filter will prevent the uploaded file from being moved to the uploads directory for any of the functions leveraging `_wp_handle_upload()`, such as `wp_handle_upload()` or `wp_handle_sideload()`.

Error reporting related to the file being moved will also be skipped.

Props ryan, Mte90.
Fixes #24603.


git-svn-id: https://develop.svn.wordpress.org/trunk@41258 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-16 21:58:12 +00:00
Drew Jaynes
cbaa63caeb Canonical: Check first before attempting to include a 'path' value in the URL in strip_fragment_from_url().
Props Mte90.
Fixes #40542.


git-svn-id: https://develop.svn.wordpress.org/trunk@41257 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-16 21:10:39 +00:00
Weston Ruter
1111c54b14 Customize: Harden color control's logic for obtaining default value to prevent JS error when non-string default supplied.
Props andreagobetti, yonivh for testing.
Fixes #37174.


git-svn-id: https://develop.svn.wordpress.org/trunk@41256 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-16 19:03:01 +00:00
John Blackbourn
9cd6551e54 Options, Meta APIs: Update the multisite unit tests after [41254], [41164], and [41163].
This moves some more previously Multisite-only tests into the main test suite, and makes small adjustments to their assertions.

See #39118, #16470, #39117


git-svn-id: https://develop.svn.wordpress.org/trunk@41255 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-15 09:15:53 +00:00
John Blackbourn
dad257233c Options, Meta APIs: Require a confirmation link in an email to be clicked when an admin attempts to change the site admin email address.
This adds this previously Multisite-only functionality to single site installations too. This change prevents accidental or erroneous email address changes from potentially locking users out of their site.

Props MatheusGimenez, johnbillion

Fixes #39118


git-svn-id: https://develop.svn.wordpress.org/trunk@41254 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-14 20:12:23 +00:00
John Blackbourn
f585095db4 Users: Display the "Your email address has not been updated yet" message when a user changes their profile email address from within network admin.
This ensures continuity with the regular profile editing screen and the user admin profile editing screen.

Fixes #41635


git-svn-id: https://develop.svn.wordpress.org/trunk@41253 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-14 19:41:35 +00:00
Weston Ruter
b0d06b1222 Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover.
Props timmydcrawford, westonruter.
See #39993.
Fixes #41274.


git-svn-id: https://develop.svn.wordpress.org/trunk@41252 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-14 17:55:24 +00:00
Weston Ruter
242efb0a24 Widgets: Suppress PHP warnings raised by DOMDocument::loadHTML() in WP_Widget_Text::is_legacy_instance() which could appear in Text widget forms.
Also explicitly use HTML5 doctype when parsing Text widget contents in legacy mode detection.

Amends [41050].
See #40951.
Fixes #41622.


git-svn-id: https://develop.svn.wordpress.org/trunk@41251 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-14 05:58:23 +00:00
Peter Wilson
0e31ef4e2c Emoji: Update Twemoji to 2.5.0.
Twemoji 2.3.0 has a rendering issue in Safari, emoji can sometimes be followed by U+FEOF (which is just a flag meaning "render the preceding character as emoji).

Twemoji wasn't catching this character correctly, and Safari rendered it incorrectly.

Twemoji 2.5.0 resolves this issue.

Fixes #41584.


git-svn-id: https://develop.svn.wordpress.org/trunk@41250 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-14 02:03:18 +00:00
Weston Ruter
21f8256a27 Widgets: Add missing open class for expanded widgets in Customizer; utilize open class for expansion detection in Text and Media widgets.
Fixes #41625.


git-svn-id: https://develop.svn.wordpress.org/trunk@41249 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-13 06:24:28 +00:00
Weston Ruter
8b6b45c96b Customize: Prevent attachment deletions from silently failing in media modals opened for Media widgets.
Amends [40640].
See #32417.
Fixes #41609.


git-svn-id: https://develop.svn.wordpress.org/trunk@41248 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-13 06:10:11 +00:00
Weston Ruter
a29068cb00 Customize: Prevent wide widgets from being displayed as wide when Customizer is displayed in mobile breakpoint.
Fixes #41624.


git-svn-id: https://develop.svn.wordpress.org/trunk@41247 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-13 05:54:07 +00:00
Weston Ruter
cc8cbb38c9 Customize: Update selector to add max-height/max-width for wide widgets to account for JS-driven Text widget and Media widgets.
Fixes #41623.


git-svn-id: https://develop.svn.wordpress.org/trunk@41246 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-13 05:41:34 +00:00
Weston Ruter
3c8584e87f Widgets: Fix extensibility of Text widgets so that JS logic will initialize on subclassed widgets.
Amends [40631].
See #35243.
Fixes #41540.


git-svn-id: https://develop.svn.wordpress.org/trunk@41245 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-13 05:24:14 +00:00
Weston Ruter
b4a8af7e35 Customize: Prevent _delete_option_fresh_site() from hitting DB if fresh_site flag already cleared.
Amends [38991].
Props dlh, westonruter.
Fixes #41039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41244 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-13 00:56:24 +00:00
Weston Ruter
7bff33a6eb Customize: Fix PHP warning raised when deleting a setting from changeset via passing null as params in WP_Customize_Manager::save_changeset_post().
Props dlh.
Fixes #41621.


git-svn-id: https://develop.svn.wordpress.org/trunk@41243 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-12 21:20:23 +00:00
Felix Arntz
440c8692e3 Multisite: Remove references to $wpdb->siteid and use get_current_network_id() instead.
Props sathyapulse, spacedmonkey.
Fixes #41507.


git-svn-id: https://develop.svn.wordpress.org/trunk@41242 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-12 13:10:24 +00:00
Felix Arntz
9595e6c38b Multisite: Rename internal $site_id variables referencing networks to $network_id.
This change improves code clarity by using the current naming conventions for networks.

Props lemacarl.
Fixes #41510.


git-svn-id: https://develop.svn.wordpress.org/trunk@41241 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-12 12:47:38 +00:00
Weston Ruter
0979d6ebfb Media: Upgrade MediaElement.js from 4.2.3 to 4.2.5.
Props rafa8626.
See #39686.


git-svn-id: https://develop.svn.wordpress.org/trunk@41240 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-12 06:19:28 +00:00
Adam Silverstein
1306166cb9 Docs: Improve JavaScript documentation in audiovideo.manifest.js.
Add and improve JSDOC blocks.

Props nicollle, manuelaugustin.
Fixes #41602.


git-svn-id: https://develop.svn.wordpress.org/trunk@41239 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-11 20:36:19 +00:00
James Nylen
d570de32ca REST API: Always call rest_get_server() instead of accessing the $wp_rest_server global.
This is a consistency improvement and also a bug fix for fairly obscure cases involving modified WP load order.

Fixes #41555.


git-svn-id: https://develop.svn.wordpress.org/trunk@41238 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-10 01:37:30 +00:00
Konstantin Obenland
d339af1bc1 Map nav menu locations on theme switch
This will send nav menu locations through three levels of mapping:
1. If both themes have only one location, that gets mapped.
2. If both themes have locations with the same slug, they get mapped.
3. Locations that (even partially) match slugs from a similar kind of menu location will get mapped.

Menu locations are mapped for Live Previews in the Customizer and during theme switches.

Props westonruter, obenland, welcher, melchoyce.
Fixes #39692.



git-svn-id: https://develop.svn.wordpress.org/trunk@41237 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-09 21:03:16 +00:00
Sergey Biryukov
9ab26b8800 Link Template: Allow the type argument to be passed through get_the_comments_pagination() as long as its value isn't array.
See [30820] for `get_the_posts_pagination().

Props jainnidhi, poena.
Fixes #39792.

git-svn-id: https://develop.svn.wordpress.org/trunk@41236 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-09 04:06:17 +00:00
Sergey Biryukov
4a8779feb9 Docs: Correct @param type for $term_id in get_term_children().
Props Soean, wido.
Fixes #41585.

git-svn-id: https://develop.svn.wordpress.org/trunk@41235 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-08 20:52:01 +00:00
Sergey Biryukov
0e0e31d515 Media: Pass shortcode attributes to wp_audio_shortcode_class and wp_video_shortcode_class filters.
Props sathyapulse.
Fixes #37329.

git-svn-id: https://develop.svn.wordpress.org/trunk@41234 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-05 16:41:39 +00:00
Drew Jaynes
fff8e29cbf External Libraries: Update jQuery Form (unused in core) to the latest version, 4.2.1.
Fixes #41565.


git-svn-id: https://develop.svn.wordpress.org/trunk@41233 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-05 12:59:12 +00:00
John Blackbourn
1f26d318ab Formatting: Introduce get_the_post_type_description() to allow post type archive descriptions to be formatted the same as author and term archives.
Props henry.wright

Fixes #40040


git-svn-id: https://develop.svn.wordpress.org/trunk@41232 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-04 23:00:50 +00:00
John Blackbourn
db49a16f00 Plugins: Correct and improve docblocks for the various plugin_action_links filters on the Plugins screen.
This also adds a changelog for the removal of the Edit links in [41160].

See #41017
Fixes #38169


git-svn-id: https://develop.svn.wordpress.org/trunk@41231 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-04 22:14:37 +00:00
John Blackbourn
e45625b5b0 Multisite: Clarify descriptions of the wpmu_signup_blog_notification() and wpmu_signup_user_notification() functions.
See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41230 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-04 14:20:21 +00:00
John Blackbourn
3e5005c30c Media: Move the Tests_Media::test_video_shortcode_body() method so it runs before other tests in the class that depend on it.
The following tests were never executed as they have `@depends` annotations which means they get skipped because the `test_video_shortcode_body()` test has not run by the time they run. Re-ordering the test methods fixes this.

* `test_wp_video_shortcode_with_empty_params()`
* `test_wp_video_shortcode_with_bad_attr()`
* `test_wp_video_shortcode_attributes()`
* `test_wp_video_shortcode_youtube_remove_feature()`
* `test_wp_video_shortcode_youtube_force_ssl()`
* `test_wp_video_shortcode_vimeo_force_ssl_remove_query_args()`
* `test_wp_video_shortcode_vimeo_adds_loop()`
* `test_wp_video_shortcode_vimeo_force_adds_loop_true()`

See #35367


git-svn-id: https://develop.svn.wordpress.org/trunk@41229 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-04 14:05:27 +00:00
John Blackbourn
14ff8eb16b REST API: Populate some missing tests from test cases which extend the controller test case.
See #41463


git-svn-id: https://develop.svn.wordpress.org/trunk@41228 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-04 13:55:04 +00:00
Andrea Fercia
babec6d399 Menus: Visually hide the menu item edit link text in a consistent way.
Fixes a visual glitch visible on Ubuntu. WordPress uses system fonts and they have
different metrics across operating systems. Uses screen-reader-text as a more
solid way to visually hide text.

Props punit5658, afercia.
Fixes #41497.


git-svn-id: https://develop.svn.wordpress.org/trunk@41227 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 22:12:01 +00:00
Felix Arntz
1e9777c220 REST API: Allow site administrators to edit user roles in multisite.
While site administrators cannot generally edit users in multisite, they have always been able to change the roles of users on their site. In the REST API however, this has not been possible so far. This changeset brings parity with how it is handled in the administration panel: A REST request to edit only a user's roles succeeds correctly, while a REST request to edit any further details of a user fails.

Props jnylen0.
Fixes #40263.


git-svn-id: https://develop.svn.wordpress.org/trunk@41226 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 21:58:50 +00:00
flixos90
0dc1e0633b Multisite: Introduce a can_add_user_to_blog filter to prevent adding a user to a site.
Under certain circumstances, it can be necessary that a user should not be added to a site, beyond the restrictions that WordPress core applies. With the new `can_add_user_to_blog` filter, plugin developers can run custom checks and return an error in case of a failure, that will prevent the user from being added.

The user-facing parts and the REST API route that interact with `add_user_to_blog()` have been adjusted accordingly to provide appropriate error feedback when a user could not be added to a site. Furthermore, two existing error feedback messages in the site admin's "New User" screen have been adjusted to properly show inside an error notice instead of a success notice.

Props jmdodd.
Fixes #41101.


git-svn-id: https://develop.svn.wordpress.org/trunk@41225 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 21:40:02 +00:00
Andrea Fercia
814e1f5530 REST API: Make jshint happy again after [41222].
See #40919.


git-svn-id: https://develop.svn.wordpress.org/trunk@41224 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 20:35:38 +00:00
James Nylen
da5ece4d6d REST API: Exclude numeric parameters from regex parsing
The list of endpoint parameters should only include explicitly named and requested parameters.

Props flixos90, rmccue, jnylen0.
Fixes #40704.


git-svn-id: https://develop.svn.wordpress.org/trunk@41223 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 19:54:56 +00:00
James Nylen
4f4b7fd8d1 REST API: Add QUnit tests for api-request.js
These should have been included in [41206].

See #40919.


git-svn-id: https://develop.svn.wordpress.org/trunk@41222 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 19:46:48 +00:00
John Blackbourn
17fe24286d General: Fix more instances of inconsistent parameters passed to various filters, plus fix some filter docs.
See #38462, #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41221 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 16:12:25 +00:00
John Blackbourn
a3dec5dd51 General: Fix a typo introduced in [41219].
See #38462


git-svn-id: https://develop.svn.wordpress.org/trunk@41220 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 15:45:14 +00:00
John Blackbourn
3aadc71579 General: Fix various instances of incorrect filter docs and incorrect filter and action parameters.
Props keesiemeijer for identifying the issues

See #38462


git-svn-id: https://develop.svn.wordpress.org/trunk@41219 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 15:42:45 +00:00
Drew Jaynes
70027dd170 Docs: Add missing documentation for the $data parameter for WP_Http::browser_redirect_compatibility().
Props ronakganatra for the initial patch.
Fixes #41380.


git-svn-id: https://develop.svn.wordpress.org/trunk@41218 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 15:23:25 +00:00
John Blackbourn
136aa0d6d0 General: Add missing parameters to instances of the the_permalink filter.
This ensures every instance of this filter receives the same parameters.

Props keesiemeijer for identifying the issue

See #38462


git-svn-id: https://develop.svn.wordpress.org/trunk@41217 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 14:58:26 +00:00
John Blackbourn
84ef824166 Docs: Add a missing docblock for the the_content_rss filter.
See #38462, #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41216 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 14:45:58 +00:00
John Blackbourn
9f180065d6 Docs: Fix various filter documentation.
See #38462, #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41215 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 14:33:19 +00:00
John Blackbourn
9296c9025a Networks and Sites: Display an indicator for the active theme or child theme when viewing a site's themes within Network Admin.
Props palmiak, euthelup

Fixes #41168


git-svn-id: https://develop.svn.wordpress.org/trunk@41214 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-03 13:49:01 +00:00