Commit Graph

23943 Commits

Author SHA1 Message Date
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
Adam Silverstein
5cc6c39430 Themes: improve browser history support on new themes page.
When closing the theme preview, restore the previously selected tab. Avoid an issue where duplicate entries in the history prevented navigation. When re-opening the preview, remove bound event handlers before re-adding them.

Props afercia.
Fixes #36613.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 20:32:44 +00:00
Andrea Fercia
3aabc09e9c Administration: Fix some HTML validation errors.
Fixes some minor HTML issues in the admin and, most notably, changes the rel
attribute used in the List Tables from `rel="permalink"` to `rel="bookmark"`.

Props mihai2u, pento, arena, topher1kenobe, michalzuber, stubgo.
Fixes #37004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 17:58:43 +00:00
Sergey Biryukov
da0a505497 Administration: Update the docs for wp_check_browser_version().
Correct `update_url` key name, add missing `platform` key.

Props coffee2code.
Fixes #40839.
Built from https://develop.svn.wordpress.org/trunk@40822


git-svn-id: http://core.svn.wordpress.org/trunk@40679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 00:17:42 +00:00
Weston Ruter
6e935e7f20 Widgets: Further refine WP JS coding style in media widgets code.
Props afercia.
See #32417.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 22:05:42 +00:00
Weston Ruter
e083a1aff7 Post-4.8 Beta 2 bump.
Built from https://develop.svn.wordpress.org/trunk@40820


git-svn-id: http://core.svn.wordpress.org/trunk@40677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 21:43:42 +00:00
Weston Ruter
979677bcfb WordPress 4.8 Beta 2 ([40807] again)
Built from https://develop.svn.wordpress.org/trunk@40819


git-svn-id: http://core.svn.wordpress.org/trunk@40676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 21:14:40 +00:00
Andrea Fercia
2cbd9cf75e Themes: Improve the theme Custom Logo accessibility.
Uses the Site title as fallback value for the Custom Logo alt attribute when the original alt attribute is empty.

Props sami.keijonen, joedolson, sstoqnov, nobremarcos, gma992, LiamMcArthur, jjcomack.
Fixes #38768.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 20:29:42 +00:00
Andrea Fercia
bdad500af7 Widgets: Remove the title attributes used in the Tag cloud widget.
- improves accessibility using an aria-label attribute to match the information conveyed visually with the one exposed to assistive technologies
- adds an option in the widget to display the item counts, consistently with what other widgets already do (Archives, Categories)

Props adamsoucie, emirpprime, Samantha Miller., MikeLittle, rianrietveld, sami.keijonen, adamsilverstein, westonruter, afercia.
See #24766.
Fixes #35566.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 20:24:41 +00:00
James Nylen
252ab08d88 REST API: Fix changing parameters with set_param() for some requests.
Prior to this commit, `WP_Rest_Request::get_param()` traversed through the parameter order but `WP_Rest_Request::set_param()` did not. For JSON requests (and likely other situations as well), this meant that changing a parameter with `set_param()` would have no effect on `get_param()`.

Props TimothyBlynJacobs.
Fixes #40344.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 16:16:42 +00:00
Dominik Schilling
24a7666e69 About: Remove a stray quotation mark.
Props odysseygate.
See #40721.
Fixes #40837.
Built from https://develop.svn.wordpress.org/trunk@40814


git-svn-id: http://core.svn.wordpress.org/trunk@40672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 15:02:43 +00:00
Weston Ruter
3d9e57f534 Media: Remove core embedding support for WMV and WMA files since MediaElement.js has discontinued supporting them.
Plugins may continue to add embedding support for these file formats by re-adding them via the `wp_video_extensions` and `wp_audio_extensions` filters while also implementing fallback rendering routines via the `wp_video_shortcode_override` and `wp_audio_shortcode_override` filters.

See #39994, #39995.
Fixes #40819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-22 05:39:44 +00:00
Andrea Fercia
b5eeb88286 Widgets: clarify some context information for translators.
Props Italian polyglots team.
Amends [40640].
See #32417, #39993, #39994, #39995.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-21 20:44:45 +00:00
Dominik Schilling
96549c5022 Widgets: Remove unused JS variable to fix JSHint error introduced in [40640].
See #39994.
Built from https://develop.svn.wordpress.org/trunk@40811


git-svn-id: http://core.svn.wordpress.org/trunk@40669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-20 09:45:42 +00:00
Weston Ruter
039397721e Widgets: Introduce isHostedVideo method on VideoWidgetControl to allow plugins to extend for recognizing services beyond YouTube and Vimeo.
Also update jshint configuration in Gruntfile to include the widget scripts among the JS files linted.

Props timmydcrawford.
See #39994.
Fixes #40808.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-20 04:18:41 +00:00
Mike Schroder
db5091eaa1 Media: Decode HTML entities in author_name before sending to JS.
In `wp_prepare_attachment_for_js()`:
- Normalize behavior when author does not exist by returning '(no author)' for `authorName` in these cases.
- Decode HTML entities in `author_name`.
- Add tests for both of the above.

Props arshidkv12, ocean90, sloisel, mikeschroder.
Fixes #39955.
Built from https://develop.svn.wordpress.org/trunk@40809


git-svn-id: http://core.svn.wordpress.org/trunk@40667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-20 02:23:43 +00:00
Weston Ruter
5c671464de Revert [40807] unbumping from 4.8 Beta 2 back to Beta 1 due to aborted release.
Built from https://develop.svn.wordpress.org/trunk@40808


git-svn-id: http://core.svn.wordpress.org/trunk@40666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 23:00:43 +00:00
Weston Ruter
48578765ec WordPress 4.8 Beta 2
Built from https://develop.svn.wordpress.org/trunk@40807


git-svn-id: http://core.svn.wordpress.org/trunk@40665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 22:02:41 +00:00
Weston Ruter
123158e7d8 Widgets: Revert [40251] pending more accessible solution for showing default widget titles rather than using placeholders.
See #39909.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:45:40 +00:00
James Nylen
df5b8dcc82 REST API: Avoid sending blank Last-Modified headers with authenticated requests.
This commit adds a new `WP_REST_Server#remove_header` method and uses it to clear the `Last-Modified` header when the "no caching" headers are sent (by default for all authenticated REST API requests).  This matches the behavior of the `nocache_headers` function used in other parts of WordPress.

Previously, the REST API would send an empty `Last-Modified` header in this situation.  Under some server and browser configurations, this causes browsers to cache authenticated REST API requests, which is undesirable.

Props iv3rson76, zinigor, rmccue, jnylen0.
Fixes #40444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:27:44 +00:00
Weston Ruter
e8e5a71a85 Docs: Improve phpdoc for WP_Customize_Manager, WP_Customize_Control, WP_Customize_Setting, and WP_Customize_Selective_Refresh.
Props 4nickpick, sagarprajapati, ketuchetan, BharatKambariya, mrahmadawais, westonruter.
Fixes #39671.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 20:25:41 +00:00
Sergey Biryukov
2c5e9a34b2 Dashboard: Change the cache key for dashboard RSS widget; remove the unnecessary database upgrade routine.
Props iandunn, ocean90.
See #40702.
Built from https://develop.svn.wordpress.org/trunk@40803


git-svn-id: http://core.svn.wordpress.org/trunk@40661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 19:14:42 +00:00
Sergey Biryukov
a2788b09d5 Dashboard: Append the current locale to dashboard RSS widget cache key in wp_dashboard_rss_control(), for consistency with the changes to wp_dashboard_cached_rss_widget() in [33183] and [33192].
See #32804, #40702.
Built from https://develop.svn.wordpress.org/trunk@40802


git-svn-id: http://core.svn.wordpress.org/trunk@40660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 19:00:44 +00:00
Andrew Ozz
a89f203b21 TinyMCE: fix selecting the link node after creating a link by pasting an URL.
Props iseulde.
Fixes #40818.
Built from https://develop.svn.wordpress.org/trunk@40801


git-svn-id: http://core.svn.wordpress.org/trunk@40659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 18:55:44 +00:00
Joe McGill
7d43d71800 Media: Ensure WP_Screen sets post type on wp-admin/upload.php.
The post type property is set to 'attachment' when on the upload screen.

Props postpostmodern.
Fixes #39509.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 18:29:42 +00:00
Andrea Fercia
1a8f7ab144 Dashboard: Don't trigger an Events search when the search field is empty.
Fixes #40816.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 17:27:43 +00:00
Konstantin Obenland
92642624fd About: Optimize strings for l10n
Uses html entities for quotes and adds translator comment for event links.

Props ocean90.
See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 16:45:44 +00:00
Andrea Fercia
e008a5c7db Themes: Improve the theme installer Favorites and Feature Filter tabs alignment.
Props nitin kevadiya, darshan02, mp518.
Fixes #40315.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 16:18:41 +00:00
Konstantin Obenland
359cc45e08 Docs: Improve inline docs for inlineEditPost.
Props jjcomack, rensw90.
Fixes #39823.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 15:45:42 +00:00
Konstantin Obenland
14d0491fbf Twenty Seventeen: Remove uneccessary return statement
Props truongwp.
Fixes #40516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 15:19:41 +00:00
Andrea Fercia
36d25d3960 Dashboard: Improve the Events widget spinner position after [40789].
Props iandunn.
Fixes #40735.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 14:44:41 +00:00
Dominik Schilling
97e98a80f6 Dashboard: Use get_user_locale() for the news feed cache key.
Since the feed URL can be localized the cache key has to be built with the same locale as the current user is using.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 14:36:42 +00:00
Adam Silverstein
5ddd3f92e8 Media: make search input full width on mobile.
Props abhishekfdd.
Fixes #40130.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 13:45:42 +00:00
Konstantin Obenland
34e2a6110e About: Let's get a headstart on 4.8 about strings
Strings have been reviewed and are ready for translation—design will come soon.

Props bridgetwillard, jenblogs4u, michelleweber, ryelle, melchoyce.
See #40721.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 11:55:44 +00:00
Andrew Ozz
7a9ce6d03f Dashboard: Improve the handling of locations determined by geolocating the IP address and by entering a city name. Fix couple of edge cases, and some names.
Props iandunn coreymckrill.
Fixes #40702.
Built from https://develop.svn.wordpress.org/trunk@40790


git-svn-id: http://core.svn.wordpress.org/trunk@40648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 05:48:42 +00:00
Andrew Ozz
daab579a88 Dashboard:
- Close the form after obtaining a valid location.
- Fix focusing the toggle button after closing the form.
- Fix aria attribute values.
- Fix positions in IE11.
- Some JS and CSS cleanup.

Props afercia, coreymckrill.
Fixes #40735.
Built from https://develop.svn.wordpress.org/trunk@40789


git-svn-id: http://core.svn.wordpress.org/trunk@40647 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 04:01:41 +00:00
Weston Ruter
bd990d7c4e Docs: Add missing @since tags and phpdoc descriptions to the Custom_Image_Header class.
Amends [27497].
Props tejas5989, riddhiehta02, westonruter.
See #21785.
Fixes #40231.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-19 03:53:43 +00:00
Andrew Ozz
d7c37de2de Editor: When stripping paragraph tags, and there is a <br> at the beginning or the end, merge them and keep the paragraph, not the <br>.
Props rellect.
Fixes #37066.
Built from https://develop.svn.wordpress.org/trunk@40787


git-svn-id: http://core.svn.wordpress.org/trunk@40645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 22:55:42 +00:00
Andrew Ozz
b398ccf2a1 TinyMCE: fix pasting while an image with caption is selected. The image and the caption should be replaced with the pasted content.
Fixes #40809.
Built from https://develop.svn.wordpress.org/trunk@40786


git-svn-id: http://core.svn.wordpress.org/trunk@40644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 22:25:41 +00:00
Weston Ruter
e62f6ac8fe Widgets: Ensure title field for media widget will update with sanitized value after change event in addition to input event.
Aligns behavior of field with Text widget and other widgets whereby the server-sanitized title (via the `widget-update` request) is supplied into the field after the `change` event.

See #32417.
Fixes #40805.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 21:04:41 +00:00
Weston Ruter
698c6de4da Widgets: Use "Add Audio" for button in Audio widget instead of generic "Add File".
Props juhise.
See #39995.
Fixes #40797.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40642 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 18:34:42 +00:00
Matias Ventura
aee7e6a1bf TinyMCE: Provide styles for link and code boundaries.
The new version of TinyMCE introduces a cursor-boundary feature for some formatting elements but, by default, it does not provide much in the way of styles. This tweaks their appearance in the WordPress custom skin to match the intended design of the feature.

Props joen.
Fixes #40767.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40641 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:52:42 +00:00
James Nylen
21b1135b1c REST API: Do not set X-WP-Deprecated* headers as often.
Only set these headers if (1) `WP_DEBUG` is enabled and (2) headers have not already been sent.

Previously, this code could generate warnings by trying to set a header after response data has already been sent.  This happens when code attached to the `shutdown` filter calls a deprecated function, for example.

Also, these headers are unlikely to be useful in the majority of cases; let's only send them if `WP_DEBUG` is enabled.

Props kraftbj, jnylen0, ocean90, rmccue.
Fixes #40787.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:49:42 +00:00
Konstantin Obenland
8ef02e5ec7 Dashboard: Combine methods to retreive IP
They're only used in one place, no reason to be so verbose about it.

See #40702.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:34:42 +00:00
Jeremy Felt
fd63ede892 Multisite: Handle both role change selections in site-users.php.
Previously, a role selected below the list table would not apply on save. This aligns the behavior with `wp-admin/users.php` and allows role changes from both selections, deferring to the bottom selection when both are populated.

Props desrosj.
Fixes #40113.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-18 17:08:43 +00:00