Commit Graph

23987 Commits

Author SHA1 Message Date
Dion Hulse d75574cd84 Bump the 4.8 branch to 4.8.5.
Built from https://develop.svn.wordpress.org/branches/4.8@42495


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 21:39:32 +00:00
Dion Hulse 726b806eab External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Fixes #42720 for 4.8.

Built from https://develop.svn.wordpress.org/branches/4.8@42478


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 08:02:34 +00:00
John Blackbourn 9222292ccb Bump 4.8 branch to version 4.8.4.
Built from https://develop.svn.wordpress.org/branches/4.8@42317


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 18:57:33 +00:00
John Blackbourn 47c076a77b Hardening: Remove the ability to upload JavaScript files for users who do not have the `unfiltered_html` capability.
Merges [42261] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@42271


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:16:05 +00:00
John Blackbourn 3995f1e60f Hardening: Ensure the attributes of enclosures are correctly escaped in RSS and Atom feeds.
Merges [42260] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@42270


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:15:34 +00:00
John Blackbourn c5713fc570 Hardening: Add escaping to the language attributes used on `html` elements.
Merges [42259] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@42269


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:14:07 +00:00
John Blackbourn 8101b2aa4d Users: Correct the value of the `lang` attribute in the admin area.
This corrects the value when the user's language is set to `English (United States)` but the site language is not.

Props ocean90, afercia

See #42242

Merges [42220] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@42262


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 16:05:34 +00:00
Dion Hulse 9eb5084390 WPDB: Check that `AUTH_SALT` is not empty, Fix a PHP notice when `AUTH_SALT` is undefined.
Props jsonfry, mkomar, pento.
Merges [42119] and [42120] to the 4.8 branch.
Fixes #42431 and #42401 for 4.8.

Built from https://develop.svn.wordpress.org/branches/4.8@42230


git-svn-id: http://core.svn.wordpress.org/branches/4.8@42059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-27 01:07:34 +00:00
Gary Pendergast 3fdaf059b9 Bump 4.8 branch to version 4.8.3.
Built from https://develop.svn.wordpress.org/branches/4.8@42069


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 13:07:32 +00:00
Gary Pendergast a59f4bc10f Database: Restore numbered placeholders in `wpdb::prepare()`.
[41496] removed support for numbered placeholders in queries send through `wpdb::prepare()`, which, despite being undocumented, were quite commonly used.

This change restores support for numbered placeholders (as well as a subset of placeholder formatting), while also adding extra checks to ensure the correct number of arguments are being passed to `wpdb::prepare()`, given the number of placeholders.

Merges [41662], [42056] to the 4.8 branch.
See #41925.


Built from https://develop.svn.wordpress.org/branches/4.8@42057


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-31 12:23:33 +00:00
Dominik Schilling 27433a5d25 Bump 4.8 branch to version 4.8.2.
Built from https://develop.svn.wordpress.org/branches/4.8@41509


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 19:42:33 +00:00
Aaron Campbell 1b16fc95d8 Database: Hardening to bring `wpdb::prepare()` inline with documentation.
`wpdb::prepare()` supports %s, %d, and %F as placeholders in the query string. Any other non-escaped % will be escaped.

Merges [41496] to 4.8 branch.


Built from https://develop.svn.wordpress.org/branches/4.8@41497


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 18:11:31 +00:00
Aaron Campbell 7b17c71213 Database: Don’t trigger `_doing_it_wrong()` for null values in `wpdb::prepare()`.
While `wpdb::prepare()` does not support null values (see #12819) they still appear in the wild like in the WordPress Importer and other plugins.

Merges [41483] to 4.8 branch.


Built from https://develop.svn.wordpress.org/branches/4.8@41484


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 16:19:32 +00:00
Aaron Campbell 109695b948 Database: Hardening for `wpdb::prepare()`
Previously if you passed an array of values for placeholders, additional values could be passed as well. Now additional values will be ignored.

Merges [41470] to 4.8 branch.


Built from https://develop.svn.wordpress.org/branches/4.8@41471


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 14:55:32 +00:00
John Blackbourn 3e77adc619 Filesystem API: Ensure filenames are valid before attempting to unzip them to ensure malformed file paths don't cause issues.
Merges [41457] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41458


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 14:37:33 +00:00
Aaron Campbell a9b03b1b80 oEmbed: Add extra hardening around allowed HTML for improved sandboxing.
Merges [41448] to 4.8 branch.



Built from https://develop.svn.wordpress.org/branches/4.8@41450


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 13:47:33 +00:00
Dominik Schilling 40074d31a0 TinyMCE: Improve the previews for shortcodes.
Merge of [41395] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41435


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 12:41:32 +00:00
Dominik Schilling 460edb5519 Customize: Ensure valid themes in the preview.
Merge of [41397] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41429


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 11:50:31 +00:00
Dominik Schilling 07e1f9a6ca Taxonomy/Users: Provide a fallback for incorrect HTTP referrers.
Merge of [41398] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41417


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 11:11:33 +00:00
John Blackbourn 846bd22a79 General: Add missing URL-encoding and add extra hardening to plugin and template names when they're displayed in the admin area.
Merges [41399], with additions, to the 4.8 branch.

See #13377

Built from https://develop.svn.wordpress.org/branches/4.8@41412


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 10:21:16 +00:00
Dominik Schilling 1647b11bf4 Editor: Prevent adding `javascript:` and `data:` URLs through the inline link dialog.
Merge of [41393] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41400


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 10:15:32 +00:00
Dominik Schilling a905eb3690 Emoji: Invert value returned by UN test for accuracy.
The JavaScript testing for UN flag support was passing when it failed, and failing when it passes.

This inverts the result to take more traditional approach of returning the correct result.

Merge of [41386] to the 4.8 branch.

Unprops Pento.
Fixes #41852.

Built from https://develop.svn.wordpress.org/branches/4.8@41396


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:29:33 +00:00
Dominik Schilling d75fad697d 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.

Merge of [41250] to the 4.8 branch.

Props peterwilsoncc.
Fixes #41584.
Built from https://develop.svn.wordpress.org/branches/4.8@41394


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 08:04:33 +00:00
Dominik Schilling b7d54dd918 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.

Merge of [41260] to the 4.8 branch.

Amends [40631].
Props westonruter, azaozz.
See #35243.
Fixes #41596.
Built from https://develop.svn.wordpress.org/branches/4.8@41392


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 07:44:32 +00:00
Dominik Schilling d82e0f5c86 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.

Merge of [41251] to the 4.8 branch.

Amends [41050].
See #40951.
Fixes #41622.
Built from https://develop.svn.wordpress.org/branches/4.8@41391


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-19 07:39:33 +00:00
Dominik Schilling 93ba8ea6fb I18N: Allow numbers in locales during installation.
The current regex was a bit to strict for locales like `pt_PT_ao90` which were already supported by `wp_get_installed_translations()`.

Merge of [41335] to the 4.8 branch.

See #41794.
Built from https://develop.svn.wordpress.org/branches/4.8@41336


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-04 19:38:33 +00:00
John Blackbourn 795af804ba Build/Test tools: Use the latest in the 4.x and 6.x branches of PHPUnit when running tests on Travis for the 4.8 branch.
See #41472

Merges [41294] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41295


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-22 17:10:35 +00:00
Weston Ruter a0153f27c8 Post-4.8.1 version bump for 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41212


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 21:38:34 +00:00
Weston Ruter e10af224e2 Bump 4.8 branch to version 4.8.1.
Built from https://develop.svn.wordpress.org/branches/4.8@41210


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 20:58:32 +00:00
Weston Ruter a9897ef218 Post-WordPress 4.8.1 RC2 version bump.
Built from https://develop.svn.wordpress.org/branches/4.8@41203


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 22:28:31 +00:00
Weston Ruter 546dcf7fed WordPress 4.8.1 RC2.
Built from https://develop.svn.wordpress.org/branches/4.8@41202


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 22:21:32 +00:00
Peter Westwood 30f39b93be Emoji: Revert [41069] as the new Regular Expressions performance on balance significantly worse that the old ones.
See #35293 props @jmdodd

Built from https://develop.svn.wordpress.org/branches/4.8@41201


git-svn-id: http://core.svn.wordpress.org/branches/4.8@41041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-01 21:16:34 +00:00
Gary Pendergast fee9368d46 REST API: Update the fixture data for `wp-api.js` tests.
[41139] changed how the REST API URL is generated, but included an incorrect version of `wp-api-generated.js`.

This updates the generator to create the correct `wp-api-generated.js`, and updates ``wp-api-generated.js`.

Repeat of [41154], in the 4.8 branch.
Fixes #40886.


Built from https://develop.svn.wordpress.org/branches/4.8@41155


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-26 04:06:36 +00:00
Weston Ruter b9d2c50edd Post-WordPress 4.8.1 RC 1 version bump.
Built from https://develop.svn.wordpress.org/branches/4.8@41144


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 03:20:36 +00:00
Weston Ruter be70069a0a WordPress 4.8.1 RC1.
Built from https://develop.svn.wordpress.org/branches/4.8@41143


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 03:00:36 +00:00
Weston Ruter 7eccdc89e7 TinyMCE: Fix styling of selected state for linked images containing captions.
Merges [41141] onto 4.8 branch.
Props azaozz.
Fixes #41408 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41142


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 02:21:34 +00:00
Gary Pendergast 7cdc8af10c REST API: Always add `index.php` to the REST URL when pretty permalinks are disabled.
When pretty permalinks are disabled, the web server will internally forward requests to `index.php`. Unfortunately, nginx only forwards HTTP/1.0 methods: `PUT`, `PATCH`, and `DELETE` methods will return a 405 error.

To work around this nginx behaviour, including `index.php` in the REST URL skips the internal redirect.

Merges 41139 to the 4.8 branch.
Fixes #40886.


Built from https://develop.svn.wordpress.org/branches/4.8@41140


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:54:36 +00:00
Weston Ruter cbfc476b43 Customize: Update Text widget starter content to utilize visual mode.
Merges [41136] onto 4.8 branch.
Amends [38991].
Props dlh, westonruter.
See #35243, #38114.
Fixes #41410 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41137


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:27:36 +00:00
Weston Ruter a17fcecfda Widgets: Improve notice in Text widget's legacy mode.
Retains 'new' in notice on 4.8 branch, in contrast with [41134]. Also fixes phpunit test which broke in [41132].

Merges [41134] onto 4.8 branch.
Props melchoyce, westonruter.
See #41394, #35243, #40951, #40907.
Fixes #41386 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41135


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 23:15:34 +00:00
Weston Ruter fd423f720e Widgets: Rename Text widget's `legacy` mode to non-`visual` mode, restore boolean `filter` prop, and improve compatibility for `widget_text` filters applied in Custom HTML widget.
Merges [41132] onto 4.8 branch.
Amends [41050].
Props westonruter, obenland, timmydcrawford for testing.
See #35243, #40951, #40907.
Fixes #41394 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41133


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:54:34 +00:00
Weston Ruter 74314b2ddb Bump package.json version to 4.8.1 to fix Tests_Basic::test_package_json failure
Built from https://develop.svn.wordpress.org/branches/4.8@41130


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:30:34 +00:00
Weston Ruter 6be40b7a13 WP-API JS Client: Interpret Settings resource as a model.
The REST API does not provide a mechanism to distinguish between endpoints representing models and those representing collections, so the Backbone client must make that distinction internally. Previously wp-api.js accounted for `/users/me`, but not for `/settings`. This patch updates the logic so that `/settings` is properly registered as a Backbone model.

When calling `wp.api.init`, additional endpoints can be specified to be models using the `modelEndpoints` argument.

Merges [41112] onto 4.8 branch.
Props adamsilverstein, kadamwhite.
Fixes #41056 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41126


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 20:46:38 +00:00
Weston Ruter 96da852a31 Widgets: Improve theme styling compatibility for Custom HTML widget by adding content container with `textwidget` class and `widget_text` class on widget wrapper element.
The same styling from the Text widget should apply to the Custom HTML widget since users are expected to copy HTML from the (legacy) Text widget into the latter.

Merges [41115] and partially [41116] onto 4.8 branch.
Amends [40893].
See #40907.
Fixes #41392 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41117


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-21 21:17:37 +00:00
Weston Ruter 6ce522414f Post-WordPress 4.8.1 Beta 1 version bump
Built from https://develop.svn.wordpress.org/branches/4.8@41098


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 00:52:36 +00:00
Weston Ruter fc475c2d71 WordPress 4.8.1 Beta 1
Built from https://develop.svn.wordpress.org/branches/4.8@41097


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-20 00:09:35 +00:00
Weston Ruter 8575d4e180 REST API: Add a filter to allow modifying the response *after* embedded data is added.
Merges [40961] onto 4.8 branch.
Props jnylen0.
Fixes #38964 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41093


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 20:12:38 +00:00
Weston Ruter 940c2238ec Widgets: Replace adding `balanceTags` on `widget_custom_html_content` filter in favor of just applying `widget_text` filters in Custom HTML widget.
Ensures that users who copy HTML from the Text widget in legacy mode over to the Custom HTML widget will continue to get all of the same filters applied, including tag balancing and shortcodes, if a plugin added support. Plugins still have the `widget_text_content` and `widget_custom_html_content` filters they can use to target the specific widget types.

Merges [41086] onto 4.8 branch.
Amends [40893].
See #40951.
Fixes #40907 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41087


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:19:36 +00:00
Weston Ruter ec08f02aa4 Widgets: Discount shortcodes and leading/trailing line breaks for triggering Text widget legacy mode.
Since shortcode handling is just-in-time deferred to run after `wpautop`, there is no need to retain the presence of shortcodes to trigger legacy mode. Also updates Text widget legacy mode notice informing of Custom HTML widget.

Merges [41070] onto 4.8 branch.
Amends [41050].
Props westonruter, melchoyce.
Fixes #40951 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41071


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 04:21:35 +00:00
Gary Pendergast 471cb97374 Emoji: Port the Twemoji regex to PHP.
Previously, `wp_encode_emoji()` and `wp_staticize_emoji()` used inaccurate regular expressions to find emoji, and transform then into HTML entities or `<img>`s, respectively. This would result in emoji not being correctly transformed, or occasionally, non-emoji being incorrectly transformed.

This commit adds a new `grunt` task - `grunt precommit:emoji`. It finds the regex in `twemoji.js`, transforms it into a PHP-friendly version, and adds it to `formatting.php`. This task is also automatically run by `grunt precommit`, when it detects that `twemoji.js` has changed.

The new regex requires features introduced in PCRE 8.32, which was introduced in PHP 5.4.14, though it was also backported to later releases of the PHP 5.3 series. For versions of PHP that don't support this, it will fall back to an updated version of the loose-matching regex.

For short posts, the performance difference between the old and new regex is negligible. As the posts get longer, however, the new method is exponentially faster.

Merges [41043], [41045], and [41046] to the 4.8 branch.

Fixes #35293.


Built from https://develop.svn.wordpress.org/branches/4.8@41069


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 03:48:38 +00:00
Weston Ruter e875520cec Widgets: Bump the TinyMCE panels' base `z-index` to 500001 so they show in the Customizer (such as in the Text widget).
Merges [40990] and [40995] onto 4.8 branch.
Props greuben, westonruter.
Fixes #41158 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41068


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 03:23:33 +00:00
Weston Ruter d68bbe13cb TinyMCE: respect the `Disable the visual editor when writing` user setting and don't output the TinyMCE components when using `wp_enqueue_editor()`.
Merges [40991] onto 4.8 branch.
Props azaozz.
Fixes #40960 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41067


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 01:55:32 +00:00
Weston Ruter db65c15aba TinyMCE: fix directionality settings for RTL languages.
Merges [40927] to 4.8 branch.
Props westonruter, sa3idho.
Fixes #40972 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41066


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 01:45:34 +00:00
Weston Ruter 2c82efe8ca Media: Restrict appending `loop` parameter to Vimeo URLs specifically and not all external URLs in Video widget (via shortcode).
Fixes issue where Video widgets embedding external files fail to get recognized due to the presence of the `loop` param after the video filename, even though it has a recognized extension. Regardless, the `loop` param is only present to fix a Vimeo issue in ME.js 2.x.

Merges [40892] into the 4.8 branch.
Props timmydcrawford.
Amends [40640].
See #39686, #39994.
Fixes #40977 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41054


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 17:34:32 +00:00
Weston Ruter c4ac9d0ade Widgets: Add legacy mode for Text widget and add usage pointers to default visual mode.
The Text widget in legacy mode omits TinyMCE and retains old behavior for matching pre-existing Text widgets. Usage pointers added to default visual mode appear when attempting to paste HTML code into the Visual tab and when clicking on the Text tab, informing users of the new Custom HTML widget.

Merges [41050] to 4.8 branch.
Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41053


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 17:28:32 +00:00
Weston Ruter e5f6b9078e Widgets: Enqueue assets needed by media and text widgets in their `_register_one()` methods.
The `WP_Widget::_register_one()` method is more guaranteed to be called as opposed to its wrapper `WP_Widget::_register()` which plugins may bypass for performance reasons.

Merges [41028] to the 4.8 branch.
Amends [40631], [40640].
See #35243, #32417.
Fixes #41021 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41052


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 17:23:32 +00:00
Weston Ruter 5f3b1410fd REST API: Ensure `maxwidth` and `maxheight` params are forwarded to oEmbed provider in proxy requests.
Also correct phpdoc return tag on `WP_oEmbed_Controller::get_proxy_item()` and remove dead code in oEmbed controller phpunit tests.

Merges [41047] into 4.8 branch.
Amends [40628].
See #40450.
Fixes #41299 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41049


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 16:19:31 +00:00
Weston Ruter 3a05029032 REST API: Remove `_wpnonce` value from being used in hashed oEmbed proxy cache key.
Merges [41035] to 4.8 branch.
Amends [40628].
Props r-a-y, westonruter.
See #40450.
Fixes #41048 for 4.8.1.

Built from https://develop.svn.wordpress.org/branches/4.8@41048


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 16:13:35 +00:00
Weston Ruter 2d4418b905 Widgets: Add Custom HTML widget.
Ports [40893], [40926], [41000] to the 4.8 branch.
Props westonruter, timmydcrawford, obenland.
Fixes #40907 for 4.8.

Built from https://develop.svn.wordpress.org/branches/4.8@41044


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 07:41:33 +00:00
Boone Gorges c4809250ca Taxonomy: Avoid duplicates when querying for terms in taxonomies registered with `$args` parameter.
[40514] introduced a bug that caused term queries to return some duplicates
when the `$taxonomies` array contained only taxonomies that were originally
registered with an `$args` array. We fix this bug by ensuring that
recursive `get_terms()` queries stop when all queried `$taxonomies` have
already been referenced.

Ports [41037] to the 4.8 branch.

Props bor0, atanasangelovdev.
Fixes #41010.

Built from https://develop.svn.wordpress.org/branches/4.8@41038


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-13 13:43:33 +00:00
Sergey Biryukov 56f581b195 Embeds: Update oEmbed endpoint URL for VideoPress.
Props NomNom99.
Fixes #41019.

Merges [40901] to the 4.8 branch.
Built from https://develop.svn.wordpress.org/branches/4.8@41025


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 23:20:33 +00:00
Joe McGill 93db53b77d Sanity check $uploaderToggler in wp.media.view.UploaderInline.
This ensures `$uploaderToggler` exists before checking length so any views
extending or scripts accessing this view, won't encounter errors that stop execution.

See #41231.

Merges [41009] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@41010


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-06 00:46:33 +00:00
Ella Iseulde Van Dorpe b15040f1b2 Bump version for WordPress 4.8
Built from https://develop.svn.wordpress.org/branches/4.8@40888


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-08 14:27:35 +00:00
Aaron Jorbin 408dae699e About: Swap out images and videos for CDN versions, and add responsive images.
Backports [40881] from trunk to 4.8.

Props: melchoyce, joemcgill, pento.

See #40721.


Built from https://develop.svn.wordpress.org/branches/4.8@40887


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-08 05:25:33 +00:00
Aaron Jorbin 0d820bf585 About Page: update CSS with prefixes
Backports [40885] from trunk to 4.8.

Seconded by melchoyce.

See #40721.

Built from https://develop.svn.wordpress.org/branches/4.8@40886


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-08 04:53:32 +00:00
Aaron Jorbin 9c577e4d04 Bundled Themes - Bump themes in preparation for 4.8
Backports [40883] from trunk to 4.8

Change version numbers in stylesheets, fix typo in Twenty Fourteen readme and update copyright dates for themes. Twentysixteen wasn't updated this cycle.

See #40745 for changes that helped push this along.
Fixes #40905.
Props davidakennedy, mrahmadawais, maedahbatool.


Built from https://develop.svn.wordpress.org/branches/4.8@40884


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-08 04:43:33 +00:00
Dominik Schilling 439478f087 Upgrade: Add `wp-includes/js/tinymce/plugins/wpembed` to `$_old_files`.
Merge of [40879] to the 4.8 branch.

See #39513, #40942.
Built from https://develop.svn.wordpress.org/branches/4.8@40880


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-07 21:36:33 +00:00
Gary Pendergast 882ab89172 Build: Add `npm-shrinkwrap.json`
`fsevent` has been manually removed, so it doesn't kill the build server.

Props netweb.
Fixes #40928.


Built from https://develop.svn.wordpress.org/branches/4.8@40878


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-07 00:18:37 +00:00
John Blackbourn 97dcac413f Build/Test Tools: Fix PHP 5.2 compatibility for grandchild methods which expect exceptions to be raised.
This is due to `is_callable( 'parent::setExpectedException' )` not being supported on PHP 5.2 when the method being checked only exists on the grandparent class.

See #39822

Merges [40872] and [40873] to the 4.8 branch.

Built from https://develop.svn.wordpress.org/branches/4.8@40875


git-svn-id: http://core.svn.wordpress.org/branches/4.8@40725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-05 10:41:22 +00:00
Ella Iseulde Van Dorpe 84d9597ce4 Bump version after RC2
Built from https://develop.svn.wordpress.org/trunk@40868


git-svn-id: http://core.svn.wordpress.org/trunk@40718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 21:22:40 +00:00
Ella Iseulde Van Dorpe c44ba7cfa9 Bump version for WordPress 4.8 RC2
Built from https://develop.svn.wordpress.org/trunk@40867


git-svn-id: http://core.svn.wordpress.org/trunk@40717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 20:40:45 +00:00
Dominik Schilling 55497ccfd1 I18N: Improve translator comments for strings in the community events widget.
Props dimadin, iandunn.
Fixes #40865.
Built from https://develop.svn.wordpress.org/trunk@40866


git-svn-id: http://core.svn.wordpress.org/trunk@40716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 09:49:42 +00:00
Dominik Schilling 7737e48a21 About: Sync tagline from about page with credits and freedoms.
See #40721.
Built from https://develop.svn.wordpress.org/trunk@40865


git-svn-id: http://core.svn.wordpress.org/trunk@40715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 09:24:43 +00:00
Dominik Schilling 0e82284d87 Multisite: Revert indentation of the sample page content added in [40296].
Props swissspidy.
Fixes #40895.
Built from https://develop.svn.wordpress.org/trunk@40864


git-svn-id: http://core.svn.wordpress.org/trunk@40714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 09:16:40 +00:00
Mel Choyce d69e67581f About: Finalize strings.
Props: bridgetwillard, jenblogs4u, michelleweber, flixos90, johnbillion, francina, voldemortensen, melchoyce.
See #40721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-01 03:14:41 +00:00
Andrew Ozz 56101fc06a TinyMCE: Force urlencoding of commas in URLs added by plugins to prevent warnings about missing stylesheets.
Fixes #40893.
Built from https://develop.svn.wordpress.org/trunk@40862


git-svn-id: http://core.svn.wordpress.org/trunk@40712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-31 22:04:43 +00:00
Mel Choyce 69a7ab7d37 About: Add Link Boundary video and update poster image.
See #40721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-31 18:02:44 +00:00
Andrew Ozz 9799bf93f5 TinyMCE: update to 4.6.3. Fixes few more edge cases with link boundaries. Changelog: https://www.tinymce.com/docs/changelog/#version463-may302017
Fixes #40890.
Built from https://develop.svn.wordpress.org/trunk@40856


git-svn-id: http://core.svn.wordpress.org/trunk@40707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 23:35:41 +00:00
John Blackbourn 95cf5aa7c9 Build/Test Tools: Add a missing class to the PHPUnit 6 back compat.
See #39822

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


git-svn-id: http://core.svn.wordpress.org/trunk@40704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 22:07:41 +00:00
Konstantin Obenland fd77b45b57 Twenty Sixteen: Add missing binary files
They slipped through the cracks when applying/creating patches.

See [40851], #36497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 21:53:40 +00:00
Konstantin Obenland d22061139e Importing Twenty Sixteen, default theme for 2016.
Fixes #36497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-30 21:21:43 +00:00
Gary Pendergast 930d29f267 Emoji: Fix the flag and emoji5 tests not working correctly.
Fixes the UN flag not being correctly compared to itself, introduced in [40837].

Replaces the bearded person check with a male fairy. Emoji 5 does not have gendered bearded people, so we needed to switch it out to use the ZWJ check for a broken render.

Props peterwilsoncc for the code and commit message.
Fixes #40858.



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


git-svn-id: http://core.svn.wordpress.org/trunk@40701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-29 03:21:42 +00:00
Mel Choyce 530577a670 About: Introduce design and add link to Media Widgets API dev note.
Props: ryelle rclations melchoyce westonruter.
See #40721.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-27 15:04:43 +00:00
Andrew Ozz 5136fe6ca6 TinyMCE: update to the TINY-1079 (latest) branch. Fixes several edge cases including the errors thrown when moving the caret with the arrow keys around nested `<a><code>` elements.
Fixes #40874 #40868.
Built from https://develop.svn.wordpress.org/trunk@40848


git-svn-id: http://core.svn.wordpress.org/trunk@40699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-27 02:09:45 +00:00
Weston Ruter 91f544da29 Widgets: Normalize YouTube and Vimeo URLs in `video` shortcode (primarily for Video widget) to work around ME.js 2.22 bug.
Props timmydcrawford, jnylen0, westonruter.
See #32417, #39994.
Fixes #40866.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-26 23:10:44 +00:00
Andrew Ozz 91090572fe Bump version after RC1.
Built from https://develop.svn.wordpress.org/trunk@40846


git-svn-id: http://core.svn.wordpress.org/trunk@40697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 20:34:41 +00:00
Matias Ventura fe37d6f1de WordPress 4.8 RC1.
Built from https://develop.svn.wordpress.org/trunk@40845


git-svn-id: http://core.svn.wordpress.org/trunk@40696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:45:42 +00:00
James Nylen 8bf130d64a Revert [40842] due to failing tests.
See #19629.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:28:43 +00:00
John Blackbourn f750a800d0 REST API: In the admin area, ensure the REST API endpoint URL is forced to `https` when necessary.
In this situation, a site which uses `http` on the front end but `https` in the admin area is more likely to have a working REST API endpoint URL when used in the admin area.

Props mohanjith, westonruter, jnylen0

Fixes #36451

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


git-svn-id: http://core.svn.wordpress.org/trunk@40694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:02:41 +00:00
Mike Schroder 2117fa8cee Media: Introduce tests for `media_sideload_image()`.
Adds basic tests for `media_sideload_image()`, including testing
the return arguments.

Props westonruter, mikeschroder.
Fixes #19629.
Built from https://develop.svn.wordpress.org/trunk@40842


git-svn-id: http://core.svn.wordpress.org/trunk@40693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 18:01:46 +00:00
Andrew Ozz b015889bb8 About: Further polish for Under The Hood.
Props: melchoyce apmarshall obenland. General props for the About page: hedgefield reportermike.
See #40721.
Built from https://develop.svn.wordpress.org/trunk@40841


git-svn-id: http://core.svn.wordpress.org/trunk@40692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 17:53:40 +00:00
Adam Silverstein 5f411ba353 Plugins: fix regression in search input field size.
Fix a formatting regression introduced in [40792] which attempted to resize the input for mobile, see #40130.

Props leemon, juhise, voldemortensen.
Fixes #40857. 


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


git-svn-id: http://core.svn.wordpress.org/trunk@40691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 15:22:42 +00:00
Konstantin Obenland 71cd7287ba Default themes: Improve styles for 4.8 widgets
Mostly adds styles for lists and mediaelement.js instances within widgets.
Adds size classname to image widget so themes can customize their display.

Props Soean, obenland, celloexpressions, ocean90, karmatosed.
Fixes #40745.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 15:19:42 +00:00
Konstantin Obenland 25c2b2cab7 About: Further polish for feature descriptions.
Also adds Under The Hood content.

Props apmarshall, azaozz, iandunn, bridgetwillard, melchoyce.
See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 15:11:42 +00:00
Peter Wilson 03f483215d Emoji: Add Emoji 5 support.
Updates Twemoji to 2.3.0 to include Emoji 5 support.

The pride flag test is replaced with a test for the English flag, a five character sub-devision locale. The UN flag test is retained as the most recent two character locale.

An Emoji 5 "bearded person" replaces both Emoji 4 tests.

Fixes #40858.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 07:18:45 +00:00
Weston Ruter bb2e8b0d63 Widgets: Ensure that audio and video files appear in media library browser upon upload.
Props timmydcrawford.
Amends [40640].
See #32417, #39994, #39995.
Fixes #40803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 03:20:41 +00:00
Weston Ruter 8307924de6 Widgets: Supply missing descriptions for instance schema fields in media widgets.
Reuse translated strings from media templates.

Amends [40640].
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 02:59:44 +00:00
Andrew Ozz a8309f80c3 TinyMCE: update to 4.6.2. Changelog: https://www.tinymce.com/docs/changelog/#version462-may232017.
Fixes #40859 #40756.
Built from https://develop.svn.wordpress.org/trunk@40834


git-svn-id: http://core.svn.wordpress.org/trunk@40685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-25 01:14:43 +00:00
Weston Ruter 478d7730b6 Widgets: Prevent multiple items from being selectable when first populating a media widget.
Amends [40640].
Props obenland, timmydcrawford.
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-24 05:31:42 +00:00
Konstantin Obenland 92d6abac47 Themes: Skip tests if ReflectionMethod::setAccessible is unavailable
See [40825].

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


git-svn-id: http://core.svn.wordpress.org/trunk@40683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 22:16:42 +00:00
Konstantin Obenland 265787774e Themes: More unit tests for Custom Header
Custom Header functionality is largely untested. This adds tests for existing
behavior as well as changes introduced in [39227].

Props bradyvercher.
See #38639.
Fixes #39241.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 20:56:41 +00:00