Commit Graph

3129 Commits

Author SHA1 Message Date
Peter Wilson 746edb23f2 Emoji: Update Twemoji to version 2.2.5
Updates Twemoji and adds a second Emoji 4 test to include a shrugging man. Emoji 4 is being implemented gradually, while some browsers now support the female technologist, the indifferent shrugging man is breaking things with his presence.

Props peterwilsoncc, pento for code review.
Fixes #40615.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 04:26:41 +00:00
Andrew Ozz 57ef33fa2a Editor: manually trigger `change` event when text is modified from JS.
Props westonruter.
Fixes #40726.
Built from https://develop.svn.wordpress.org/trunk@40615


git-svn-id: http://core.svn.wordpress.org/trunk@40485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 00:29:41 +00:00
Peter Wilson 6c23b4750c Emoji: Clear canvas between flag tests.
Clear the canvas following the two flag tests following [40582].

Fixes #40616.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 22:44:40 +00:00
Andrew Ozz 0b2f789e93 Editor: Add `init` and `remove` methods to Quicktags.
Props helgatheviking azaozz.
Fixes #26183 #40708.
Built from https://develop.svn.wordpress.org/trunk@40598


git-svn-id: http://core.svn.wordpress.org/trunk@40468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 02:47:42 +00:00
Andrew Ozz ec622956c8 TinyMCE: improve adding of custom UI to the MCE Factory.
Props iseulde.
Fixes #40690.
Built from https://develop.svn.wordpress.org/trunk@40587


git-svn-id: http://core.svn.wordpress.org/trunk@40457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 01:40:46 +00:00
Andrew Ozz dd0d110520 TinyMCE: update to 4.6.0. Has many new features and bug fixes, changelog: https://www.tinymce.com/docs/changelog/#version460-may42017.
Fixes #40690.
Built from https://develop.svn.wordpress.org/trunk@40583


git-svn-id: http://core.svn.wordpress.org/trunk@40453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:32:46 +00:00
Gary Pendergast 1b85aa404d Emoji: Make the UN flag test more accurate.
Previously, the UN flag test relied on the image being produced to be quite small. Unfortunately, the Chrome PNG encoder seems to have changed recently, and it now produces a relatively large image.

For a better test, we can compare the rendering of [U] + [N] against [U] + zero width space + [N].

Fixes #40616.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 05:04:52 +00:00
Andrea Fercia 88e515fac0 Accessibility: Improve the suggested image size text in the media views.
Adds `pixels` as unit, avoiding abbreviation for a clearer pronunciation by screen
readers. Also, adds the word `by` instead of the special character `times`.

Props Presskopp, stormrockwell.
Fixes #38932.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-05 23:29:44 +00:00
Andrew Ozz c0399b4fde TinyMCE: Fix cursor position after updating a wpview node. Fix hiding the inline toolbar on editor blur.
Props iseulde, azaozz.
Fixes #40480 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40481


git-svn-id: http://core.svn.wordpress.org/trunk@40357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 22:10:42 +00:00
Andrea Fercia 711796d172 Accessibility: Make Safari 10 + VoiceOver announce repeated, identical, `wp.a11y.speak()` messages.
Safari 10 + VoiceOver don't announce repeated, identical, strings sent to an 
`aria-live` region. Appending a `no-break space` to a repeated message string,
forces them to think the strings are different.

Fixes #36853.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 19:53:42 +00:00
Adam Silverstein 9ff1301ae5 Upload: improve legacy SWFUpload event handlers for current jQuery.
Fix an issue where legacy JavaScript for SWFUpload still used jQuery's 
deprecated `live` event which no longer works - switch to using `on`.
This JavaScript is still used by some plugins and themes.

Props MMDeveloper.
Fixes #39886.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-14 16:43:44 +00:00
Andrew Ozz 23850c3952 Update TinyMCE to 4.5.6. Has many improvements and bug fixes. Changelog: https://github.com/tinymce/tinymce/blob/4.5.x/changelog.txt.
Fixes #40305 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40398


git-svn-id: http://core.svn.wordpress.org/trunk@40305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-09 23:01:43 +00:00
Weston Ruter 19d960e257 Customize: Fix HTTPS navigation of site in preview on IE11.
Accounts for HTTPS links (port 443) where [40318] only accounted for HTTP links (port 80). Addresses issue in IE11 where the default port number is unexpectedly included on `link.host` for links dynamically created by scripts.

Props mattwiebe.
Amends [40318], [38890].
See #38409.
Fixes #40198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-06 00:32:44 +00:00
Adam Silverstein 789f141045 REST API: JS Client - Enable connecting to multiple endpoints.
Enable connecting to multiple wp-api `endpoints`. Calling `wp.api.init` with a new `apiRoot` will parse the new endpoint's schema and store a new set of models and collections. A collection of connected endpoints is stored in `wp.api.endpoints`.

Props lucasstark.
Fixes #39683.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-02 19:41:41 +00:00
Andrea Fercia 822b8afb50 Accessibility: Improve the Media Library inline uploader accessibility.
For better accessibility, expandable panels should be placed immediately after
the control that expands them. This change moves the Media Library inline
uploader up, right after the "Add New" button, also introducing consistency with
the Plugin and Theme uploaders.
Adds a proper ARIA role on the button and an `aria-expanded` attribute to give
better feedback to assistive technologies users about the uploader's expanded state.
Improves the focus handling when closing the uploader, improves the focus style
and color contrast ratio of the uploader "close" button.

Props mantismamita, karmatosed, adamsilverstein, afercia.
Fixes #37188.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-31 17:38:43 +00:00
Weston Ruter 5aec57b209 Customize: Fix navigation of site in preview on IE11.
Addresses issue in IE11 where the default port number of `:80` is unexpectedly included on `link.host` for links dynamically created by scripts.

Props westonruter, afercia for testing.
See #38409.
Fixes #40198.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-23 17:25:43 +00:00
Andrea Fercia c3a2b57241 Media: Restore correct upload errors displaying after [37610].
Props codegeass, MatheusGimenez, joemcgill.
Fixes #39516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-26 18:15:43 +00:00
Andrew Ozz 9c1d14b875 TinyMCE: preserve empty image alt attributes.
Props afercia.
Fixes #39912 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40110


git-svn-id: http://core.svn.wordpress.org/trunk@40047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 20:41:43 +00:00
Weston Ruter 0343f50561 Customize: Prevent vertical clipping of thumbnail in header image customizer control.
Removes some method overrides on `wp.customize.HeaderTool.ChoiceView` introduced in [27497].

See #21785.
Props bradyvercher.
Fixes #38559.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-20 00:10:49 +00:00
Adam Silverstein c7b217cee9 JavaScript: when starting Backbone history, stop if previously started.
Prevent a potential error condition if Backbone history is started by a plugin or theme before core tries to start it. 

Props tfrommen.
Fixes #39612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 22:00:42 +00:00
Adam Silverstein 518ff1576b REST API: JavaScript client - improve route discovery for custom namespaces.
Fix parsing of custom namespace routes. Transform class names, removing dashes and capitalizing each word/route part so a route path of `widgets/recent-posts` becomes a collection with the name `WidgetsRecentPosts`. Correct parent route part when routes are longer than expected, reversing parse direction.

Props westonruter, jazbek.
Fixes #39561.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-17 20:54:44 +00:00
Weston Ruter 34b179876e Customize: Skip intercepting non-HTTP(S) links in customizer preview just as jump links are ignored.
Ensures that links with `javascript:`, `mailto:` and other protocols work as expected in the customizer preview.

Fixes #39797.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-16 21:21:45 +00:00
Adam Silverstein e322b0eb77 Media: debounce the media grid search, avoiding duplicate requests.
Add a debounce wrapper to the media grid search handler. The search callback is now fired after a 300 ms typing pause.

Remove redundant handlers for 'search' and 'change', preventing multiple/duplicate search callbacks.

Props certainstrings, joemcgill, Kelderic, batmoo.
Fixes #38911.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-15 17:29:44 +00:00
Weston Ruter f3644a702e Customize: Ensure edit shortcuts get re-created for nested partials when a parent partial is refreshed.
Fixes issue where the edit shortcut for a nav menu gets dropped when the containing Custom Menu widget is updated.

See #39101.
Fixes #39353.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-11 03:35:43 +00:00
Andrea Fercia d33301821b Buttons: Improve the `.button-link` CSS class for link-like buttons.
Updates `.button-link` adding color and underline to make link-like buttons look
like links by default. Introduces `.button-link-delete` as a modifier, stackable
CSS class for red button-links.

Props Cheffheid, afercia.

See #34242.
Fixes #35126.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-09 16:47:44 +00:00
Scott Taylor 9bf3844ef9 Media: in `wp.media.view.DeleteSelectedPermanentlyButton`, move destructive async operations outside of the `selection` loop.
Fixes #39780.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-08 19:44:41 +00:00
Scott Taylor 907e8cbd66 Media: in `wp.media.view.Toolbar.refresh()`, check for a selection before iterating over models.
Props chandrapatel.
Fixes #39511.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-08 19:17:43 +00:00
Adam Silverstein 717aeab3cc REST API: JavaScript client should use `_.extend` when merging objects.
Correct an issue during the client's dynamic route discovery in `wp.api.utils.decorateFromRoute` where `_.union` potentially failed if used on objects.

Props ketuchetan.
Fixes #39341.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-03 21:46:43 +00:00
Andrea Fercia 4ca4ff999a Accessibility: Make the inline uploader button a real button.
See `wp.media.view.UploaderWindow`.

Fixes #39305.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 18:32:41 +00:00
Andrew Ozz 69c29935d5 TinyMCE: improve the previews for embedded WordPress posts:
- Add option to force a sandbox iframe in wpview.
- Use it to show the embedded post preview.
- Remove the deprecated `wpembed` plugin.js

Fixes #39513.
Built from https://develop.svn.wordpress.org/trunk@40019


git-svn-id: http://core.svn.wordpress.org/trunk@39956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 04:25:44 +00:00
Andrew Ozz 66a39611f6 TinyMCE: strip browser inserted `<u>` and <font>` tags from inside links when copying and pasting in IE and Edge.
Fixes #39570.
Built from https://develop.svn.wordpress.org/trunk@39916


git-svn-id: http://core.svn.wordpress.org/trunk@39853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-17 01:25:44 +00:00
Andrew Ozz 82a8065f70 TinyMCE: ensure the inline toolbar is shown and properly positioned when there are several wpview blocks in the editor and the user selects one after the other.
Props gitlost.
Fixes #38849.
Built from https://develop.svn.wordpress.org/trunk@39910


git-svn-id: http://core.svn.wordpress.org/trunk@39847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 00:22:43 +00:00
Andrew Ozz 35c91b7c0d TinyMCE: prevent the inline toolbar from appearing on partially selected wpview nodes. This can happen when HTML is initially loaded in the editor and wpview is the first node, or sometimes on repeatedly pasting the same wpview.
Props gitlost.
Fixes #38849.
Built from https://develop.svn.wordpress.org/trunk@39904


git-svn-id: http://core.svn.wordpress.org/trunk@39841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 03:00:43 +00:00
Andrew Ozz 45f3ee380c TinyMCE: when inserting a wpview, place the caret after is so the user can continue typing without interruption.
Props iseulde.
Fixes #39337.
Built from https://develop.svn.wordpress.org/trunk@39903


git-svn-id: http://core.svn.wordpress.org/trunk@39840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 02:41:40 +00:00
Andrew Ozz 90f441e1b4 TinyMCE: improve removal of spaces from empty paragraphs when loading HTML in the editor.
Fixes #39437.
Built from https://develop.svn.wordpress.org/trunk@39902


git-svn-id: http://core.svn.wordpress.org/trunk@39839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-15 02:06:41 +00:00
Adam Silverstein c8a3496ebe REST API: Add error handling for fetch error in `buildModelGetter` of wp-api.js.
When a call to a model getter method fails, reject the returned deferred object. Enables better handling of fetch errors.

Props westonruter, adamsilverstein.
Fixes #39314.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 03:03:42 +00:00
Weston Ruter f7ba137f19 Customize: Fix visible edit shortcuts for `wp_nav_menu()` instances using the `menu` arg (such as in the Custom Menu widget) instead of the `theme_location` arg.
Also fix logic for `focus-control-for-setting` handler to focus on the first control (lowest `priority` value) associated with a given setting instead of the last control encountered when iterating over all controls, as this ensures the first control in a `nav_menu` section is focused rather than the last one.

Props westonruter, sirbrillig.
See #27403.
Fixes #39101.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-20 22:05:43 +00:00
Adam Silverstein bc7a03a33b WP-API: JavaScript client - fix setup of models used by wp.api.collections objects.
Correct setup for the `model` attribute of `wp.api.collections` objects. Set the collection model as a function that returns a new model of the underlying type, instead of setting it as the model prototype. Fixes an issue where models for fetched collections weren't set up properly and didn't have the expected mixin methods such as `getCategories` available.

Props jesseenterprises.
Fixes #39070.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-15 12:54:42 +00:00
Ella Iseulde Van Dorpe 4ec102c189 Editor: Remove target=_blank when unchecked in the link modal.
Fixes #39276 for trunk.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-14 20:30:44 +00:00
Gary Pendergast 7d9b5b14b5 Libraries: Update zxcvbn from version 1.0 to 4.4.1
This includes masses of bug fixes, as well as tweaks to how passwords are scored.

QUnit tests have been updated to reflect tha scoring changes.

Full changelog: https://github.com/dropbox/zxcvbn/compare/v1.0...v4.4.1

Fixes #31647.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-13 11:23:42 +00:00
Weston Ruter c9b863fc40 Customize: Prevent navigation in preview when clicking on child elements of preview links that have non-previewable URLs.
Fixes #39098.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 08:09:41 +00:00
Weston Ruter 8a89a50c69 Customize: Prevent edit shortcut from losing event handler after selective refresh.
Props sirbrillig.
See #27403.
Fixes #39100.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 07:52:43 +00:00
Weston Ruter 9669c60397 Customize: Fix ability to shift-click on placeholder/pre-saved nav menu items in preview to focus on corresponding control.
Fixes #39102.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 23:47:41 +00:00
Weston Ruter d10cde75c6 Customize: Allow (optional) `url` parameter to be omitted in intercepted calls to `history.pushState()` and `history.replaceState()` in customize preview.
Fixes issue where calls without the `url` parameter erroneously end up rewriting the location path to `/undefined`.

Props Christian1012, westonruter.
Fixes #39175.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 01:59:41 +00:00
Weston Ruter 672b8a61cd Customize: Prevent infinite full refresh from occurring when selective refresh falls back for a nav menu that has items excluded from rendering via filtering.
See #37032.
Fixes #38612.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 02:51:42 +00:00
Andrew Nacin 0d983eb0ef Build/Test Tools: Specify exact node version in package.json.
Enforce it in the tests.

see #35105.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:32:16 +00:00
Weston Ruter 0a31089bf6 Customize: Ensure a `custom_css` post insertion gets an initial post revision.
Props georgestephanis, westonruter.
See #30854, #38672, #35395.
Fixes #39032.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 17:31:33 +00:00
Helen Hou-Sandí 844b0a5307 Trunk is really 4.8-alpha now.
Built from https://develop.svn.wordpress.org/trunk@39359


git-svn-id: http://core.svn.wordpress.org/trunk@39299 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-29 04:55:50 +00:00
Pascal Birchler 98e8bf7ba2 Embeds: Correctly remove security attribute from iframes in IE 10 and IE 11.
This was originally added in 4.4, but presumably broke with [35708], which prevented these browsers from actually reaching the relevant code section.
Let's make embeds work again in IE 10 and IE 11.

Fixes #38694.
Built from https://develop.svn.wordpress.org/trunk@39347


git-svn-id: http://core.svn.wordpress.org/trunk@39287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 13:38:33 +00:00
Weston Ruter 6b5d960453 Customize: Clean up docs and code style for customize changes in 4.7.
* Adds missing `resolve`/`fail` for promise returned by `loadThemePreview`.
* Adds missing jsdoc blocks and tags.
* Adds missing phpdoc and makes corrections.

See #37770.
Fixes #38908.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-23 06:05:32 +00:00