Commit Graph

2577 Commits

Author SHA1 Message Date
Andrew Ozz
ffa304135e Text widget: add the Add Media button and enable the wpview plugin to show embedded media previews in the editor.
Props westonruter, azaozz.
See #40854.
Built from https://develop.svn.wordpress.org/trunk@41344


git-svn-id: http://core.svn.wordpress.org/trunk@41177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 10:57:43 +00:00
Andrea Fercia
4c60dfa69b Themes: Prevent the Themes search field default action after [40572].
Props boonebgorges.
Fixes #41803.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-05 17:26:45 +00:00
Andrea Fercia
b43ddef0bc Accessibility: Improve the color picker UI accessibility, interaction, and generated markup.
- Refactors the UI controls around the Iris color picker to output valid and semantic markup
- Simplifies the way elements visibility gets toggled
- Properly associates the visually hidden label with the color input field
- Makes the toggle button a real button
- Adds `aria-expanded` to the toggle button
- Keeps focus on the toggle button instead of moving it to the color input field
- Adds `aria-label` attributes to give better context to some controls
- Removes a redundant title attribute
- Keeps the toggle button text to "Select Color" instead of changing it to "Current Color" when a color is selected
- Slightly improves the responsive view
- CSS clean-up

Fixes #39662.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-03 16:02:46 +00:00
Scott Taylor
4557e0d292 Docs: improve JS docs for bookmarklet.js
Props andizer, ireneyoast.
Fixes #41547.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:55:45 +00:00
Scott Taylor
55a180f063 Docs: improve JS docs for tags.js
Props atimmer, jipmoors.
Fixes #41069.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:52:44 +00:00
Scott Taylor
412d5e60be Docs: improve JS docs for editor-expand.js
Props IreneYoast, terwdan.
Fixes #41068.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-24 17:48:45 +00:00
Adam Silverstein
d856eda571 Docs: Improve JavaScript documentation in color-picker.js.
Add and improve JSDOC blocks.

Props carolinegeven, jjcomack, jipmoors.
Fixes #41063.



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


git-svn-id: http://core.svn.wordpress.org/trunk@41104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 13:10:44 +00:00
Weston Ruter
667f377cd0 Widgets: Prevent visual Text widget from decoding encoded HTML.
Also apply `the_editor_content` filters on widget `text` with `format_for_editor()` as is done for the post editor.

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

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


git-svn-id: http://core.svn.wordpress.org/trunk@41100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-17 23:37:43 +00:00
Weston Ruter
75ad3494a8 Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover.
Props timmydcrawford, westonruter.
See #39993.
Fixes #41274.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-14 17:56:42 +00:00
Weston Ruter
18613c0010 Widgets: Add missing open class for expanded widgets in Customizer; utilize open class for expansion detection in Text and Media widgets.
Fixes #41625.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 06:25:43 +00:00
Weston Ruter
5c755f652b Customize: Prevent attachment deletions from silently failing in media modals opened for Media widgets.
Amends [40640].
See #32417.
Fixes #41609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 06:11:43 +00:00
Weston Ruter
e956aa4176 Customize: Prevent wide widgets from being displayed as wide when Customizer is displayed in mobile breakpoint.
Fixes #41624.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:55:43 +00:00
Weston Ruter
a5d3688157 Customize: Update selector to add max-height/max-width for wide widgets to account for JS-driven Text widget and Media widgets.
Fixes #41623.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:42:42 +00:00
Weston Ruter
9c3cdaf3fb Widgets: Fix extensibility of Text widgets so that JS logic will initialize on subclassed widgets.
Amends [40631].
See #35243.
Fixes #41540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-13 05:25:46 +00:00
Andrea Fercia
a029f83fb5 Menus: Visually hide the menu item edit link text in a consistent way.
Fixes a visual glitch visible on Ubuntu. WordPress uses system fonts and they have
different metrics across operating systems. Uses screen-reader-text as a more
solid way to visually hide text.

Props punit5658, afercia.
Fixes #41497.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-03 22:12:43 +00:00
James Nylen
c91b130b53 REST API: Allow overriding jQuery.ajax calls from within wp-admin
There are now 3 places where we call out to the REST API from within wp-admin.  This commit introduces a small library to allow overriding these calls, centralize nonce-passing logic, and eliminate the need to pass a full REST URL down to client code (this last feature is not yet used and will be explored in a separate ticket).

Fixes #40919.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-02 16:45:44 +00:00
Pascal Birchler
66a3b24b72 Permalinks: Remove unnecessary semicolon after [41182].
See #29872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 17:55:46 +00:00
Pascal Birchler
fd07b2254d Permalinks: Add buttons for the available structure tags to the admin UI.
Often times, it can be confusing to set a custom permalink structure. One has to double-check the documentation, make 
sure to correctly insert the structure tag, and hope not to break their site.

With this addition, the available structure tags are being displayed as a list of easily clickable buttons that can be 
used to insert tags to the custom structure input field and to remove them again.

Props kpdesign, swissspidy, joedolson, afercia.
Fixes #29872.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 17:43:45 +00:00
Weston Ruter
18fd50d2b6 Media: Improve acceptance of YouTube /embed/ URLs when inserting in media modal.
Props timmydcrawford.
Fixes #41201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 02:36:46 +00:00
Sergey Biryukov
4e4df0e6c9 Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.8.0 entries.
See #41017.
Built from https://develop.svn.wordpress.org/trunk@41151


git-svn-id: http://core.svn.wordpress.org/trunk@40991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 22:48:42 +00:00
Weston Ruter
ddca4ceff1 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.
Props westonruter, obenland, timmydcrawford for testing.
Amends [41050].
See #35243, #40951, #40907.
Fixes #41394.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-24 22:46:42 +00:00
Weston Ruter
8b3d2e0876 Widgets: Improve Text widget's reliability in syncing Visual tab's contents with Text tab and with hidden sync inputs.
Amends [40631].
Props azaozz, westonruter, rinkuyadav999 for testing.
See #35243.
Fixes #40974 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-19 20:49:45 +00:00
Weston Ruter
9330e39b3d Widgets: Check for existence of wp.customize.state before attempting to access in Text widget.
Amends [40631].
See #35243.
Fixes #41361 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-18 22:36:42 +00:00
Adam Silverstein
499e2a0ff9 Move sanitizeText and stripTags from press this to wp.sanitize.
Introduce the `wp.sanitize` namespace and add two helpers for text sanitization. `stripTags` strips HTML tags from a string using regex.

Fixes #40635.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-15 15:48:46 +00:00
Weston Ruter
8db1f562e6 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.

Props westonruter, melchoyce, gitlost for testing, obenland for testing, dougal for testing, afercia for testing.
See #35243.
Fixes #40951.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-14 17:09:43 +00:00
Weston Ruter
1af3aa0000 Customize: Restrict click target of menu deletion, moving to button from its container.
Props westonruter, afercia.
Fixes #40981.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-10 18:40:44 +00:00
Weston Ruter
7b28ff2f2a Customize: Fix logic to re-expand a newly inserted nav menu section after placeholder section is replaced.
Fixes todo from Menu Customizer feature plugin: https://github.com/voldemortensen/menu-customizer/commit/0f4ea4e#diff-daa55fade2253f26ccbe02f71058841cR2330
Amends [32806].
Props greuben.
See #32576.
Fixes #40997.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-05 00:44:41 +00:00
Andrew Ozz
dcc372e098 Customizer: improve setting the TinyMCE modals z-index.
Props westonruter, greuben.
See #41158.
Built from https://develop.svn.wordpress.org/trunk@40995


git-svn-id: http://core.svn.wordpress.org/trunk@40845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-03 21:18:44 +00:00
Andrew Ozz
65f1051697 TinyMCE: respect the Disable the visual editor when writing user setting and don't output the TinyMCE components when using wp_enqueue_editor().
Fixes #40960 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40991


git-svn-id: http://core.svn.wordpress.org/trunk@40841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 21:31:47 +00:00
Andrew Ozz
16167ffe41 Text widget: bump the TinyMCE modals z-index to 500001 so they show in the Customizer.
Props greuben.
Fixes #41158 for trunk.
Built from https://develop.svn.wordpress.org/trunk@40990


git-svn-id: http://core.svn.wordpress.org/trunk@40840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 20:33:41 +00:00
Weston Ruter
b7ca48fff0 Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).
Amends [40640], [40631].
Props westonruter, afercia.
See #35243, #32417.
Fixes #40986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 18:48:41 +00:00
Weston Ruter
46551a898a Widgets: Forcibly limit Video widget to only accept oEmbed URLs from YouTube and Vimeo (for now).
Amends [40640].
Props timmydcrawford.
See #34115, #39994.
Fixes #40935.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-25 07:24:41 +00:00
Peter Wilson
395ff7aebe Docs: Add wp-admin/js/media.js documentation.
Props jipmoors, jjcomack, diedeexterkate.
Fixes #41072.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 15:37:53 +00:00
Peter Wilson
952975fd0d Docs: Add wp-admin/js/custom-background.js documentation.
Props jipmoors.
Fixes #41067.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 13:24:41 +00:00
Sergey Biryukov
c569080cd1 Docs: Add documentation for wp-admin/js/comment.js.
Props ireneyoast, andizer, jipmoors.
Fixes #41065.
Built from https://develop.svn.wordpress.org/trunk@40913


git-svn-id: http://core.svn.wordpress.org/trunk@40763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-15 13:02:40 +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
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
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
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
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
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
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
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
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
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
764d8b521f Media: Trim whitespace in URLs provided for external embeds.
Also avoid showing error notice in media widget when URL field is empty.

Props timmydcrawford, westonruter.
Fixes #40771.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-17 01:59:42 +00:00
Aaron Campbell
38347d7c58 Add nonce for updating file system credentials.
Built from https://develop.svn.wordpress.org/trunk@40723


git-svn-id: http://core.svn.wordpress.org/trunk@40581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 14:48:44 +00:00
Dominik Schilling
3d10fef22d Customize: Igore invalid customization sessions.
Built from https://develop.svn.wordpress.org/trunk@40704


git-svn-id: http://core.svn.wordpress.org/trunk@40567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-16 12:07:43 +00:00
Weston Ruter
8a29b28a98 Widgets: Prevent image title attribute from being populated from attachment title by default upon selection.
Props westonruter, timmydcrawford.
See #39993.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-15 18:42:44 +00:00
Weston Ruter
3ce794812d Widgets: Fix deferred rendering of controls for media widgets until container element fully expands.
Adds omitted call to `renderWhenAnimationDone()` which was missed when this code was copied from the Text widget.

Amends [40656].
See #40750.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 22:01:42 +00:00
Adam Silverstein
cb2eac9e06 Users: Update name in toolbar when changing user display name.
When changing the user name in Users -> Your Profile, update the name displayed in the toolbar dynamically using JavaScript.

Props menakas, lukecavanagh, maguiar.
Fixes #40342.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 20:06:42 +00:00
Weston Ruter
020ffded1a Widgets: Defer rendering controls for media widgets until container element fully expands.
Fixes issue with MediaElement.js failing to build the player in an animating container that doesn't have established dimensions.
Also utilizes MediaElement.js for the video widget instead of using a native player.

See #32417.
Fixes #40750.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 19:56:43 +00:00
Adam Silverstein
d1ec180619 Taxonomy: Add a "delete" button on term edit page.
Add a 'delete' link next to the update button on the term edit screen so you can delete a term while you are reviewing it's details. 

Props cklosows, bradt, ocean90, johnbillion, DrewAPicture, ryan, MatheusGimenez, maguiar.
Fixes #9777.


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


git-svn-id: http://core.svn.wordpress.org/trunk@40518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 19:26:41 +00:00
Andrea Fercia
8a07db035d Add missing semicolons after [40646].
See #40453.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-12 07:05:41 +00:00
Andrea Fercia
bab7eb143e Accessibility: Change the "Show details" links in the update core screen to buttons.
These controls toggle the visibility of the update progress: they perform an action
therefore they should be buttons. Also:
- uses `aria-expanded` to communicate the toggle button state
- removes some inline JavaScript
- when clicking the toggle buttons, the progress details get moved with JavaScript after the button: this helps users of assistive technologies in finding them and makes the UI a bit more intuitive

Props Cheffheid, afercia.
See #26504.
Fixes #40453.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 23:50:41 +00:00
Weston Ruter
26a5058f43 Widgets: Utilize WP REST API oEmbed proxy endpoint in media widgets.
Props timmydcrawford.
See #32417, #40450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 21:24:42 +00:00
Weston Ruter
31d4d81039 Widgets: Introduce media widgets for images, audio, and video with extensible base for additional media widgets in the future.
The last time a new widget was introduced, Vuvuzelas were a thing, Angry Birds started taking over phones, and WordPress stopped shipping with Kubrick. Seven years and 17 releases without new widgets have been enough, time to spice up your sidebar!

Props westonruter, melchoyce, obenland, timmydcrawford, adamsilverstein, gonom9, wonderboymusic, Fab1en, DrewAPicture, sirbrillig, joen, matias, samikeijonen, afercia, celloexpressions, designsimply, michelleweber, ranh, kjellr, karmatosed.
Fixes #32417, #39993, #39994, #39995.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 21:11:44 +00:00
Pascal Birchler
fc1350ebe5 Administration: Ensure validateForm also validates other input fields.
With this change, textareas and select inputs will be checked as well.

Props shadyvb.
Fixes #37540.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 19:18:42 +00:00
Weston Ruter
40ebb188cd Widgets: Extend the Text widget with TinyMCE.
Introduces rich text formatting: bold, italic, lists, links.

Props westonruter, azaozz, timmydcrawford, obenland, melchoyce.
See #35760.
Fixes #35243.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 18:55:43 +00:00
Weston Ruter
2353930f90 Customize: Wait for processing state to clear before starting to captureSettingModifiedDuringSave.
See #32941.
Fixes #40729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 06:42:43 +00:00
Andrew Ozz
b952bf4eae Dashboard: Update the existing WordPress News dashboard widget to also include upcoming meetup events and WordCamps near the current user’s location.
Props @afercia, @andreamiddleton, @azaozz, @camikaos, @coreymckrill, @chanthaboune, @courtneypk, @dd32, @iandunn, @iseulde, @mapk, @mayukojpn, @melchoyce, @nao, @obenland, @pento, @samuelsidler, @stephdau, @tellyworth.
See #40702.
Built from https://develop.svn.wordpress.org/trunk@40607


git-svn-id: http://core.svn.wordpress.org/trunk@40477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 20:04:42 +00:00
Andrew Ozz
19ed296008 Editor: Update wp.editor.remove() to use the new Quicktags instance removep().
Fixes: #35760
Built from https://develop.svn.wordpress.org/trunk@40599


git-svn-id: http://core.svn.wordpress.org/trunk@40469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-10 02:50:44 +00:00
Andrew Ozz
cbf3b2cff5 Editor: Add wp.editor.remove() for editors that were dynamically instantiated from JS.
Fixes: #35760
Built from https://develop.svn.wordpress.org/trunk@40588


git-svn-id: http://core.svn.wordpress.org/trunk@40458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-09 03:41:42 +00:00
Andrea Fercia
cc9d3cfbb3 Themes: Fix missing search field in the Theme Install screen after [40572].
Props desrosj, cristianozanca for reporting.
Fixes #34881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-08 15:59:44 +00:00
Andrea Fercia
471f1e7201 Accessibility: Wrap the installed themes search field within a form element.
Valid code is important not just to formally meet the specification, but also to
ensure user agents, including assistive technologies, can accurately interpret
and parse content. When HTML elements are not used in the recommended way,
user agents may render them in unexpected ways. It can also become a problem for
compatibility with older or even future browsers, devices, or other software.
See W3C WCAG 4.1.1.

Props takayukister, aryamaaru.
Fixes #34881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-05 19:02:45 +00:00
Andrea Fercia
1d739a0925 Accessibility: Make some Widgets buttons real buttons.
Links used as UI controls that behave like buttons, should be buttons.
- changes the widgets "toggle", "Delete", and "Close" links to buttons
- uses `aria-expanded` to announce the state of the toggle buttons
- increases a bit the clickable area of the toggle
- ensures the "circular focus" doesn't get cut-off in some browsers by centering the toggle arrows
- uses a `<span>` element with an `aria-hidden` attribute to hide CSS generated font icons from assistive technologies
- standardizes on `.toggle-indicator:before` rather than `:after`
- changes two `#f00` reds in `#dc3232`, see #35622

Fixes #31476.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 21:14:44 +00:00
Andrew Ozz
d0e4448257 Editor: Provide API for the editor to be dynamically instantiated via JS. First run.
See: #35760
Built from https://develop.svn.wordpress.org/trunk@40476


git-svn-id: http://core.svn.wordpress.org/trunk@40352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-19 02:38:44 +00:00
Weston Ruter
226e34effc Customize: Verify availability of history.replaceState (in IE9) before attempting to populate changeset_uuid parameter.
Props westonruter, timmydcrawford for testing.
Amends [39686].
See #39227.
Fixes #40405.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-10 21:15:41 +00:00
Weston Ruter
57b386ef1e Customize: Fix behavior of clicking Delete Menu link and keep available nav menu items panel open when doing bulk deletion.
Props maguiar, adamsilverstein for testing.
Amends [39548].
Fixes #38953.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-07 20:22:43 +00:00
Weston Ruter
ad293eade7 Customize: Auto-expand a widget area section when expanding the Widgets panel if there is only one registered sidebar and it is active.
Introduces `WP_Customize_Panel::$auto_expand_sole_section` property which allows panels to opt-in to the behavior, which the Widgets panel is made to do by default.

Props delawski, westonruter, melchoyce.
Fixes #37471.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-07 19:27:40 +00:00
Weston Ruter
162785c65f Customize: Fix reversal of nav menu item's type and object properties for page stub added in customizer.
Amends [38906].
See #38164.
Fixes #40277.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-04-05 23:29:42 +00:00
Andrea Fercia
35d8daf000 Quick/Bulk Edit: Fix the Tag suggestions position on the Bulk Edit textarea.
Always passes the complete `position` object to the jQuery autocomplete widget.
Also checks if an autocomplete instance already exists on the Bulk Edit textarea.

Props davidbenton.
Fixes #40242.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-31 16:35:45 +00:00
Weston Ruter
8256ecfecb Customize: Improve i18n for strings in hidden widget area notices.
Amends [40312].
Props westonruter, ocean90, swissspidy, SergeyBiryukov, michelleweber for copywriting.
See #33567, #33052.
Fixes #39087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-24 22:03:42 +00:00
Weston Ruter
e78707aad4 Customize: Prevent client-side validation from being cleared when no corresponding server-side validation is present.
See #36944.
Fixes #39770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-23 18:12:44 +00:00
Weston Ruter
085b50b20d Customize: Show notice in Widgets panel when there are additional widget areas not rendered in preview.
This extends the existing behavior which only showed a message only when there were no widget areas rendered in the preview. The number of non-rendered widget areas is indicated. Also removes needles deletion of `wp.customize.Widgets.data.l10n` property which hindered plugins.

See #33567, #33052.
Fixes #39087.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-22 19:03:45 +00:00
Weston Ruter
e69b9b244c Customize: Fix failure to collapse expanded sections and panels that become deactivated.
Improve jsdoc for `onChangeActive` function. Restores fix from [34557] which got dropped in [38648].

Props dlh, westonruter.
See #34391, #33509.
Fixes #39430.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-19 00:04:43 +00:00
Pascal Birchler
3e189479a7 List Tables: Hide 'Empty Trash' and 'Empty Spam' buttons when view is already empty.
Props ivantedja, Presskopp, printsachen1, Jaydeep Rami, mathieuhays, cazm.
Fixes #38341.
Built from https://develop.svn.wordpress.org/trunk@40297


git-svn-id: http://core.svn.wordpress.org/trunk@40204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-17 16:54:42 +00:00
Sergey Biryukov
e9f73b06b6 Docs: Correct the description for wp.updates.deleteTheme.
Props MattyRob.
Fixes #40110.
Built from https://develop.svn.wordpress.org/trunk@40279


git-svn-id: http://core.svn.wordpress.org/trunk@40194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-11 16:13:46 +00:00
Andrea Fercia
6944c8f3a6 List Tables: After [38703], [38706], and [40118], adjust the jQuery selector to make the selection of a range of checkboxes work again.
Unprop afercia.
Fixes #40056.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-10 19:14:46 +00:00
John Blackbourn
9092fd01e1 Taxonomy: Correct the formatting of HTML entities when generating the screen reader text for tag removal.
Props adamsilverstein

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


git-svn-id: http://core.svn.wordpress.org/trunk@40120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-06 13:14:41 +00:00
Sergey Biryukov
d303e3d9ca Plugins: After [38703], adjust the selector for checkbox selection to account for nested tables.
Props afercia, swissspidy, reldev.
Fixes #39739.
Built from https://develop.svn.wordpress.org/trunk@40118


git-svn-id: http://core.svn.wordpress.org/trunk@40055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 23:10:44 +00:00
Adam Silverstein
bc1fc91ec8 REST API: JS client - QUnit tests for custom namespace route discovery.
Add QUnit tests for the parsing of custom namespace routes. Add a custom schema fixture based on the `wp-js-widgets` plugin. Test that the client can parse the widget namespace in the schema and correctly construct the expected group of models and collections. Also includes a small unrelated QUnit fix to ensure nav-menu test passes when it is loaded without its tests executing as well as a small jshint fix, adding a missing semicolon since [40107].

Props jnylen0.
Fixes #39561.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 18:40:40 +00:00
Adam Silverstein
33286df4c1 Themes: enable browser history support in add new theme screen.
Enable history support for the new theme screen, including navigating theme details and closing the details modal. Theme selection is now also bookmark-able, so linking to a URL like `/wp-admin/theme-install.php?theme=twentyseventeen` correctly opens the theme preview.

Props dd32.
Fixes #36613.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-24 17:48:42 +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
Sergey Biryukov
222ee437fe Update/Install: Give context to "Deleted! string to allow for differentiation between theme and plugin translations.
Props swissspidy.
See #39747. See #37290.
Built from https://develop.svn.wordpress.org/trunk@40035


git-svn-id: http://core.svn.wordpress.org/trunk@39972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 09:59:40 +00:00
Sergey Biryukov
9264813949 Update/Install: Give context to some more install/update strings to allow for differentiation between theme and plugin translations.
Fixes #39747. See #37290.
Built from https://develop.svn.wordpress.org/trunk@40034


git-svn-id: http://core.svn.wordpress.org/trunk@39971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-31 09:27:41 +00:00
Pascal Birchler
b076f7e4a8 Plugins: Remove trailing pipe symbol in sub navigation after updating the last plugin.
Props sagarprajapati.
Fixes #39655.
Built from https://develop.svn.wordpress.org/trunk@40025


git-svn-id: http://core.svn.wordpress.org/trunk@39962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-28 17:01:46 +00:00
Adam Silverstein
a6d772108d Media: ensure JavaScript initialized when media edit screen is loaded directly.
Fix a JavaScript error when the media edit screen is loaded directly via a url such as `/wp-admin/post.php?post={post_id}&action=edit&image-editor`. Add a check in `imgLoaded` for `this.hold.sizer` which is set up during initialization and required for the cropping tool. Call `init` if this is undefined.

Props NoseGraze.
Fixes #38138.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-27 18:30:43 +00:00
Weston Ruter
b6281dbd75 Customize: Trim whitespace from nav menu item titles so that the underlying object's original title appears as input placeholder and in the control's title.
Whitespace is trimmed from titles in PHP when saved in any case, so this aligns the client-side behavior with what happens on the server.

Amends [38618].
See #38015.
Fixes #39600.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-26 18:08:40 +00:00
Adam Silverstein
8d8f5616b7 Menus: trigger an event when menu items are added or removed.
Fire a `menu-item-added` event after a menu item is added to the DOM. Fire a `menu-removing-item` event before a menu item is removed from the DOM. Enables hooking into and responding to menu changes.

Props welcher, adamsilverstein.
Fixes #31218.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-20 16:15:42 +00:00
Andrew Ozz
85ee190163 Formatting: fix wpautop() to stop adding paragraph tags around <figcaption>.
Fixes #39307 for trunk.
Built from https://develop.svn.wordpress.org/trunk@39912


git-svn-id: http://core.svn.wordpress.org/trunk@39849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 01:06:40 +00:00
Andrew Ozz
ee3052fdbe Docs: some improvements/fixes for editor.js.
See #38933.
Built from https://develop.svn.wordpress.org/trunk@39911


git-svn-id: http://core.svn.wordpress.org/trunk@39848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-16 00:49:41 +00:00
Sergey Biryukov
6032bd6e32 Docs: Use 3-digit, x.x.x style semantic versioning for @since entries in wp-admin/js/image-edit.js.
See #38748.
Built from https://develop.svn.wordpress.org/trunk@39740


git-svn-id: http://core.svn.wordpress.org/trunk@39680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:13:20 +00:00
Sergey Biryukov
e8c65e0df1 Docs: Use 3-digit, x.x.x style semantic versioning for @since entries in wp-admin/js/word-count.js.
See #37718.
Built from https://develop.svn.wordpress.org/trunk@39739


git-svn-id: http://core.svn.wordpress.org/trunk@39679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:12:39 +00:00
Sergey Biryukov
e654c81f10 Docs: Add documentation for wp-admin/js/editor.js.
Props terwdan, ireneyoast.
Fixes #38933.
Built from https://develop.svn.wordpress.org/trunk@39738


git-svn-id: http://core.svn.wordpress.org/trunk@39678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-06 22:11:57 +00:00
Dion Hulse
8912d6b134 Updates: Properly define $filesystemForm to handle error in modals.
Ammends [39657].
See #39057.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 07:24:43 +00:00
Weston Ruter
5468850b10 Customize: Update customize.php URL with changeset_uuid param the instant a change is made instead of deferring until the changeset update request responds.
Props asalce.
Fixes #39227.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-05 05:18:43 +00:00
Dion Hulse
05f07e13d9 Updates: Show the Authentication key settings after selecting the SSH transport in both the modal, and also on the plugin/theme updates screen.
Props afercia.
Fixes #39057 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-30 07:44:41 +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
Konstantin Obenland
ee36cf9214 Themes: Add missing square bracket in jQuery selector.
Fixes a bug in Safari where the UI wasn't updated after deleting a theme due to
the incomplete selector.

Props Hristo Sg.
Fixes #39246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-12 09:32:41 +00:00
Weston Ruter
1b96e389c0 Customize: Fix inability to delete nav menus by preventing preview filters from being added during customize_save admin ajax request.
Also prevent setting `nav_menu_locations[...]` values to `NaN` which gets sent as `null`.

Amends [38810].
See #30937.
Fixes #39103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 06:30:46 +00:00
Weston Ruter
f1c383454b Customize: Prevent scrolling custom_css textarea to top when pressing tab.
Props tyxla, sstoqnov for testing, celloexpressions for testing.
See #38667.
Fixes #39134.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-10 00:44:40 +00:00
Weston Ruter
d94530e721 Customize: Collapse available nav menu items panel when clicking outside over preview or over existing items.
Props rockwell15.
Fixes #38953.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-09 06:16:40 +00:00
Andrea Fercia
993f895c29 Accessibility: Remove inappropriate content from the Plugins screen heading.
See #26601.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-07 18:48:40 +00:00
Andrea Fercia
a9600d1a53 Accessibility: Remove inappropriate content from the Themes screen heading.
Props joedolson.

See #26601.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-06 23:12:41 +00:00
Weston Ruter
6a3de4d857 Customize: Ensure changeset_uuid query param is removed from the customize.php window's location once a changeset has been published (committed) with starter content.
Props westonruter, dlh for testing.
See #30937.
Fixes #39081.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 16:56:42 +00:00
Weston Ruter
97f4180916 Customize: Prevent posts/pages imported via starter content from being dropped when adding post/page stubs via nav menus and the dropdown-pages control.
Props westonruter, dlh for testing.
See #38114, #34923.
Fixes #39071.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-05 16:47:41 +00:00
Adam Silverstein
113833953d Docs: Add inline documentation for image-edit.js.
Adds JSDoc DocBlocks to the imageEdit methods.

Props: andizer, rensw90.
Fixes #38748.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-04 21:35:40 +00:00
Weston Ruter
b2c65c9a95 Customize: Fix regression in ability to hide fields for advanced menu properties in nav menu item controls.
Props westonruter, celloexpressions.
See #34391.
Fixes #38952.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 18:01:43 +00:00
Weston Ruter
b2c12e463a Customize: Fix regression in ability to create submenus for nav menus via drag and drop.
See #34391.
Fixes #38948.
Props delawski, adamsilverstein.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-30 17:43:43 +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
Sergey Biryukov
2fadd7a895 Docs: Use 3-digit, x.x.x style semantic versioning for @since 4.7.0 entries.
See #37770.
Built from https://develop.svn.wordpress.org/trunk@39281


git-svn-id: http://core.svn.wordpress.org/trunk@39221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-17 18:28:30 +00:00
Weston Ruter
c2bc6df69a Customize: Ensure Close button actually closes customizer (instead of going back) after switching to a different theme inside a customize-loader iframe.
Fixes #38833.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-16 22:17:29 +00:00
Weston Ruter
de0835dead Customize: Only show video header controls if previewing front page; show explanatory notice when controls are hidden.
Also include todo for the `header_video` control's `button_labels`. See #38796.

Props westonruter, joemcgill, celloexpressions.
Fixes #38778.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-15 03:47:30 +00:00
Dion Hulse
5f7bbe66d7 Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 07:42:31 +00:00
Weston Ruter
2b81ceddf9 Customize: Prevent previewer from appearing to freeze when refreshing too fast.
Fixes race condition issue where a previous iframe fails to get destroyed, leaving a iframe pending loading persistently shown.

Props nikeo, westonruter.
Fixes #38728.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 22:43:32 +00:00
Weston Ruter
25a052bac7 Customize: Fix loading of theme screenshots in themes section and remove erroneous borders on hover.
Fixes regressions introduced in [38648].

Props delawski, mckernanin.
See #34391.
Fixes #38222.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:47:30 +00:00
Weston Ruter
5ea1e6fd80 Customize: Allow tab characters in custom CSS input.
Pressing `Esc` followed by `Tab` allows for tabbing to the next element.

Props afercia, coffee2code, westonruter.
See #35395.
Fixes #38667.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 19:09:33 +00:00
Aaron Jorbin
53c8c68365 Administration: Ensure collapse menu is usable with a keyboard
Currently, the "Collapse menu" item is not focusable and keyboard users can't collapse/expand the admin menu. This aims to fix it so that screen readers no longer announce it as a clickable but it remains unfocusable and thus unusable. So it's now a button.

Quoting joedolson at WordCamp Chicago 2014:
"If it's supposed to act like a button, it should be a button."

Also includes a grunt:precommit run that picked up some postcss changes to src/wp-includes/css/customize-preview.css

Fixes #29958.
Props ajercia, ipm-frommen for an iterative patch, valendesigns for an iterative patch, GaryJ for feedback, joedolson for feedback, helen for feedback



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


git-svn-id: http://core.svn.wordpress.org/trunk@39081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:57 +00:00
Helen Hou-Sandí
1281a28382 Customize: Revert theme install feature.
This is a great goal for core, and is close, but it is not in shape to be shipped for 4.7 and there is not enough time left in the development cycle to alter and polish sufficiently. There are bugs, but more than that, there are more fundamental questions around the use of existing UI, general UX, and how findable themes are (not) on the .org side.

see #37661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:18:26 +00:00
Weston Ruter
8ec767c21f Customize: Ensure page/post stubs are included in listings and searches for available nav menu items.
Include the customized state in the Ajax requests to load items and search items.

See #38573.
Fixes #38122.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:17:26 +00:00
Weston Ruter
1a3e930383 Customize: Combine Ajax requests for initial load of available nav menu items into a single request.
When there are many post types registered, prevent Ajax requests from piling up and slamming WordPress with concurrent requests.

Props curdin, westonruter.
Fixes #36697.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:57 +00:00
Weston Ruter
726cd04bac Customize: Let edit shortcuts be persistently visible when controls pane is expanded, hidden when collapsed, and always visible in mobile preview. Remove initial flash of edit shortcuts.
Props westonruter, sirbrillig.
Fixes #27403.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:57 +00:00
Weston Ruter
ea5f4179a7 Customize: Prevent collapsing expanded panel/section/control when Esc is pressed on another closable UI element.
Prevents collapsing constructs when hitting `Esc` on a TinyMCE toolbar, lightbox, or expanded color picker.

See #22237.
Fixes #38091.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:08:33 +00:00
Aaron Jorbin
32be6f7bb7 Bump grunt-contrib-uglify from 1.0.1 to 2.0.0
Sets `screwIE8` to false as it is now enabled by default

Files Changed:
build/wp-admin/js/customize-nav-menus.min.js
build/wp-admin/js/customize-widgets.min.js
build/wp-includes/js/customize-loader.min.js

Changelog:
2016-07-19   v2.0.0   Update uglify-js to v2.7.0. screwIE8 is enabled by default.
2016-07-19   v1.0.2   Update grunt to ^1.0.0. Fix beautify when passed as an object. Fix docs about report values.

See #38199.


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


git-svn-id: http://core.svn.wordpress.org/trunk@39059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:40:34 +00:00
Weston Ruter
985a1f6a97 Customize: Prevent syncing unmodified settings from controls into preview to guard against triggering an infinite reload due to selective refresh fallback behavior.
If a value is sanitized in PHP and differs from the JS value in the pane, a `change` event for the setting is triggered upon refresh. This should be avoided since the value just came from the server as being sanitized. This also fixes periodic issue where selective refresh happens immediately after a full refresh.

Fixes #37032.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:07:32 +00:00
Pascal Birchler
ceeb8ddb46 Plugins: Improve Ajax search of installed plugins.
Removes the highlight from the current filter when performing an Ajax search and adds it back when clearing the search input.

Fixes #37657.
Built from https://develop.svn.wordpress.org/trunk@39099


git-svn-id: http://core.svn.wordpress.org/trunk@39041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:47:30 +00:00
Weston Ruter
5015bd55a2 Customize: Reveal controls pane when clicking on edit shortcuts in mobile preview.
Re-use `paneVisible` state to also manage whether the mobile `preview-only` class is applied to the overlay.

Props seancjones.
See #36678, #36678, #27403.
Fixes #38080.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-30 04:23:44 +00:00
Weston Ruter
d71afc0d9a Customize: Mark newly-added page/post stubs as added (with checkmark) when they are inserted into the list of available items.
Props ryankienstra, celloexpressions.
See #34923.
Fixes #38499.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-29 05:06:31 +00:00
Weston Ruter
75535c596b Customize: Introduce starter content and site freshness state.
A theme can opt-in for tailored starter content to apply to the customizer when previewing the theme on a fresh install, when `fresh_site` is at its initial `1` value. Starter content is staged in the customizer and does not go live unless the changes are published. Initial starter content is added to Twenty Seventeen.

* The `fresh_site` flag is cleared when a published post or page is saved, when widgets are modified, or when the customizer state is saved.
* Starter content is registered via `starter-content` theme support, where the argument is an array containing `widgets`, `posts`, `nav_menus`, `options`, and `theme_mods`. Posts/pages in starter content are created with the `auto-draft` status, re-using the page/post stubs feature added to nav menus and the static front page controls.
* A `get_theme_starter_content` filter allows for plugins to extend a theme's starter content.
* Starter content in themes can/should re-use existing starter content items in core by using named placeholders.
* Import theme starter content into customized state when fresh site.
* Prevent original_title differences from causing refreshes if title is present.
* Ensure nav menu item url is set according to object when previewing.
* Make sure initial saved state is false if there are dirty settings without an existing changeset.
* Ensure dirty settings are cleaned upon changeset publishing.

Props helen, westonruter, ocean90.
Fixes #38114, #38533.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-28 02:57:35 +00:00
Andrea Fercia
7a60d6571c Accessibility: Remove inappropriate content from the Posts and Edit screens headings.
Props grahamarmfield, SergeyBiryukov, trishasalas, valendesigns, rianrietveld, afercia.

See #26601.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 20:39:39 +00:00
Andrea Fercia
432f5e76b2 Accessibility: Improve the Menus post type meta boxes pagination links.
- adds hidden text to the pagination links
- slightly increases the links clickable area
- fixes a JS error when clicking on the current page number
- avoids to generate nested `<div>` elements at each click 

Props xavortm, cwpnolen, afercia.

Fixes #35577.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 15:23:31 +00:00
Weston Ruter
62445cd41b Customize: Check for existence of controls and settings for background properties before attempting to access.
Amends [38948].
See #22058.
Fixes #38523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-27 05:02:35 +00:00
Weston Ruter
71afe657b6 Customize: Add edit shortcuts in customizer preview to visually expose editable elements and focus on the corresponding controls when clicked.
* Edit shortcuts show initially for a moment and then fade away so as to not get in the way of the preview. 
* Visibility of edit shortcuts is toggled by clicking/touching anywhere inert in the document.
* Implements UI for mobile and touch devices which do not support shift-click.
* Adds `editShortcutVisibility` state.
* Adds new methods to `wp.customize.selectiveRefresh.Partial` for managing edit shortcuts.

Incorporates aspects of the Customize Direct Manipulation feature plugin.

Props sirbrillig, mattwiebe, celloexpressions, melchoyce, westonruter, afercia.
Fixes #27403.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 20:03:32 +00:00
Weston Ruter
a86496aea4 Customize: Improve custom background properties UI.
Introduces new control for managing the background position. Adds control for setting the `background-size`.

Props cdog, celloexpressions, grapplerulrich, MikeHansenMe, FolioVision, afercia, helen, melchoyce, karmatosed, westonruter, Kelderic, sebastian.pisula.
Fixes #22058.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 06:52:29 +00:00
Weston Ruter
8d1cb3068a Customize: Add hue-only mode to color picker.
The color control in the customizer can use the new mode by supplying the `mode` param with `hue` (as opposed to the new default `full` value). New control replaces the `range` control in Twenty Seventeen for `colorscheme_hue`. The `wpColorPicker` can opt for hue-only mode via supplying `hue` as the `type` option. Iris Color Picker is updated from v1.0.7 to v1.1.0-beta.

Props mattwiebe, celloexpressions.
Fixes #38263.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 22:33:30 +00:00
Weston Ruter
54465a68db Customize: Fix logic inversion in determining whether a URL is previewable which prevented previewing anything but homepage.
Fixes regression introduced in [38890].

See #38409.
Fixes #38492.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 20:53:29 +00:00
Weston Ruter
30a71555cb Customize: Allow page stubs to be created via dropdown-pages controls in the Static Front Page section.
This ability was previously added to nav menus via the available page items panel. The "Add New Page" button only appears when the `allow_addition` control param is supplied as `true`. Code is adapted from the Customize Posts feature plugin.

Props celloexpressions, westonruter.
See #38013, #34923.
Fixes #38164.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 06:31:31 +00:00
Weston Ruter
afe90360b5 Customize: Prevent absent site icon link from outputting an empty string as href in customizer; use /favicon.ico as fallback.
An empty string causes some browsers to use the current URL as the `href`. When using `history.replaceState()` Chrome will re-fetch the favicon with each call, meaning that `customize.php` gets hit with wasted requests which tax the server.

Fixes #38377.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 04:47:29 +00:00
Weston Ruter
a1777db166 Customize: Skip attaching expansion event handlers to section containers with the cannot-expand class.
Props kkoppenhaver, celloexpressions.
Fixes #37980.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 04:36:39 +00:00
Dion Hulse
e8211f783a Docs: Correct a number of typos/spelling mistakes in inline comments.
Props ottok.
Fixes #38464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-25 00:38:35 +00:00
Weston Ruter
885d1dd89d Customize: Harden url matching to account for varying ports and ensuring matching base pathname for allowed urls
Fixes #38409.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 20:07:31 +00:00
Weston Ruter
1129311849 Customize: Fix live preview button in theme details modal so it includes target theme.
Fixes issue introduced in [38813].

Props celloexpressions.
See #37661.
Fixes #38475.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-24 19:15:29 +00:00
Andrea Fercia
5c555e5d10 Accessibility: Improve the Tags meta box accessibility.
- changes the "X" links in buttons, improves their color contrast ratio and focus style
- adds screen reader text "Remove item: + tagname"
- uses `wp.a11y.speak()` to give screen reader users feedback when adding/removing tags
- makes the `tagcloud-link` toggle a button, with an `aria-expanded` attribute to indicate the tag cloud collapsed/expanded state
- changes colors for the autocomplete highlighted option in order to have a better color contrast ratio
- reduces the font size for the autocomplete on Press This
- removes CSS related to the old `suggest.js` from Press This

Props joedolson, cgrymala, azaozz, afercia.
Fixes #27555.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 18:16:42 +00:00
Peter Wilson
e73ba84b04 Emoji: Load polyfill responsibly.
Improve performance of Emoji tests and loading of the polyfill.

Reduces the number of tests to determine browser support for emoji to those most likely to fail. Adds the defer flag to the loaded scripts for browsers lacking support.

Props superpoincare for perf testing, peterwilsoncc.
Fixes #37817.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-23 00:00:34 +00:00
Pascal Birchler
f88c248a52 Themes: After [38788], further improve the update button when there's no update package.
Prevents running shiny install when no package exists.


Fixes #37774.
Built from https://develop.svn.wordpress.org/trunk@38855


git-svn-id: http://core.svn.wordpress.org/trunk@38798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 10:36:46 +00:00
Weston Ruter
4ba392975a Customize: Add sticky headers for panels and sections.
Includes autoprefixing of CSS.

Props delawski, celloexpressions.
See #35186.
Fixes #34343.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-21 06:37:30 +00:00
Weston Ruter
1ccd9e7a6c Customize: Introduce custom CSS for extending theme styles.
* Custom CSS is associated with a given theme and is displayed in an inline `style` element at the `wp_head` hook after the `wp_print_styles` is called so that it overrides any enqueued stylesheets.
* A `wp_get_custom_css()` function is used for accessing the CSS associated with the current theme (or another theme) and a `wp_get_custom_css` filter for manipulating it.
* CSS is managed in customizer via a new "Additional CSS" section with a single `textarea` control. 
* `WP_Customize_Section::$description_hidden` is introduced for hiding extended descriptions in customizer sections behind a help toggle as done with panels.
* CSS is stored in a `custom_css` post type with the theme (stylesheet) slug as the `post_name`.
* `WP_Customize_Custom_CSS_Setting` is introduced to handle validation of CSS, previewing, and persisting the CSS to the `custom_css` post type.
* The `custom_css` setting is tied to a new `unfiltered_css` capability which maps to `unfiltered_html` by default.
* Escaping the message in the notification template is removed to allow markup (`code` tags) to be rendered.

See https://make.wordpress.org/core/2016/10/11/feature-proposal-better-theme-customizations-via-custom-css-with-live-previews/

Props johnregan3, celloexpressions, folletto, westonruter.
Fixes #35395.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 18:15:31 +00:00