* Code editor is integrated into the Theme/Plugin Editor, Additional CSS in Customizer, and Custom HTML widget. Code editor is not yet integrated into the post editor, and it may not be until accessibility concerns are addressed.
* The CodeMirror component in the Custom HTML widget is integrated in a similar way to TinyMCE being integrated into the Text widget, adopting the same approach for integrating dynamic JavaScript-initialized fields.
* Linting is performed for JS, CSS, HTML, and JSON via JSHint, CSSLint, HTMLHint, and JSONLint respectively. Linting is not yet supported for PHP.
* When user lacks `unfiltered_html` the capability, the Custom HTML widget will report any Kses-invalid elements and attributes as errors via a custom Kses rule for HTMLHint.
* When linting errors are detected, the user will be prevented from saving the code until the errors are fixed, reducing instances of broken websites.
* The placeholder value is removed from Custom CSS in favor of a fleshed-out section description which now auto-expands when the CSS field is empty. See #39892.
* The CodeMirror library is included as `wp.CodeMirror` to prevent conflicts with any existing `CodeMirror` global.
* An `wp.codeEditor.initialize()` API in JS is provided to convert a `textarea` into CodeMirror, with a `wp_enqueue_code_editor()` function in PHP to manage enqueueing the assets and settings needed to edit a given type of code.
* A user preference is added to manage whether or not "syntax highlighting" is enabled. The feature is opt-out, being enabled by default.
* Allowed file extensions in the theme and plugin editors have been updated to include formats which CodeMirror has modes for: `conf`, `css`, `diff`, `patch`, `html`, `htm`, `http`, `js`, `json`, `jsx`, `less`, `md`, `php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `scss`, `sass`, `sh`, `bash`, `sql`, `svg`, `xml`, `yml`, `yaml`, `txt`.
Props westonruter, georgestephanis, obenland, melchoyce, pixolin, mizejewski, michelleweber, afercia, grahamarmfield, samikeijonen, rianrietveld, iseulde.
See #38707.
Fixes#12423, #39892.
Built from https://develop.svn.wordpress.org/trunk@41376
git-svn-id: http://core.svn.wordpress.org/trunk@41209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Displays an error notification in the global area when a save attempt is rejected due to invalid settings. An error notification is also displayed when saving fails due to a network error or server error.
* Introduces `wp.customize.Notifications` subclass of `wp.customize.Values` to contain instances of `wp.customize.Notification` and manage their rendering into a container.
* Exposes the global notification area as `wp.customize.notifications` collection instance.
* Updates the `notifications` object on `Control` to use `Notifications` rather than `Values` and to re-use the rendering logic from the former. The old `Control#renderNotifications` method is deprecated.
* Allows notifications to be dismissed by instantiating them with a `dismissible` property.
* Allows `wp.customize.Notification` to be extended with custom templates and `render` functions.
* Triggers a `removed` event on `wp.customize.Values` instances _after_ a value has been removed from the collection.
Props delawski, westonruter, karmatosed, celloexpressions, Fab1en, melchoyce, Kelderic, afercia, adamsilverstein.
See #34893, #39896.
Fixes#35210, #31582, #37727, #37269.
Built from https://develop.svn.wordpress.org/trunk@41374
git-svn-id: http://core.svn.wordpress.org/trunk@41207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Plugin details modal custom implementation in the Plugins page conflicts with
other Thickbox instances added by plugins. Thickbox shows its age and has been
modified over time to suit core needs. However, WordPress should do its best to
not create conflicts with the native Thickbox styles and functionalities. Plugin
authors should be able to use `add_thickbox()` in any admin page as documented,
without having to worry about potential errors.
- fixes a JavaScript error when closing a native Thickbox modal in the Plugins page
- avoids to override the native Thickbox modal styles
- uses a CSS class to target the Plugin details modal and remove a pile of overqualified CSS selectors
Fixes#41417.
Built from https://develop.svn.wordpress.org/trunk@41356
git-svn-id: http://core.svn.wordpress.org/trunk@41189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve JS parsing of our inline JSDocs by introducing `@namespace`, `@lends` and `@memberOf`. Helps set the way for showing our JavaScript documentation on developer.wordpress.org, see https://meta.trac.wordpress.org/ticket/3063.
* Define all used namespaces using @namespace.
* Correctly specify in which namespace each class is using @memberOf.
* Define each usage of the extend function as a prototype assignment using @lends.
* Some comment blocks were moved to correct the parsing of certain definitions.
Props herregroen, atimmer, netweb, SergeyBiryukov.
Fixes#41682.
Built from https://develop.svn.wordpress.org/trunk@41351
git-svn-id: http://core.svn.wordpress.org/trunk@41184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add two new helper functions, `wp.api.getModelByRoute` and `wp.api.getCollectionByRoute`. Passed a route, they return the matching model or collection, or `undefined` if none is found.
Also adds tests to verify these functions work as expected.
Props rcutmore.
Fixes#41111.
Built from https://develop.svn.wordpress.org/trunk@41334
git-svn-id: http://core.svn.wordpress.org/trunk@41165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Update to 2.1.9.
- Include the non-minified plupload.js and moxie.js.
- Remove support for Flash and Silverlight, the available runtime options are `html5` and `html4`.
- Delete plupload.flash.swf and plupload.silverlight.xap.
Fixes#41755.
Built from https://develop.svn.wordpress.org/trunk@41328
git-svn-id: http://core.svn.wordpress.org/trunk@41159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
ALso fixes:
* Accessibility for volume control
* Progress bar tooltip positioning and dimensions correctly set for media with long duration
* Better codec checking
* Minor CSS fix to avoid flickering effect on volume control
Props rafa8626.
See #39686.
Fixes#41640.
Built from https://develop.svn.wordpress.org/trunk@41320
git-svn-id: http://core.svn.wordpress.org/trunk@41151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twemoji 2.3.0 has a rendering issue in Safari, emoji can sometimes be followed by U+FEOF (which is just a flag meaning "render the preceding character as emoji).
Twemoji wasn't catching this character correctly, and Safari rendered it incorrectly.
Twemoji 2.5.0 resolves this issue.
Fixes#41584.
Built from https://develop.svn.wordpress.org/trunk@41250
git-svn-id: http://core.svn.wordpress.org/trunk@41090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
The REST API does not provide a mechanism to distinguish between endpoints representing models and those representing collections, so the Backbone client must make that distinction internally. Previously wp-api.js accounted for `/users/me`, but not for `/settings`. This patch updates the logic so that `/settings` is properly registered as a Backbone model.
When calling `wp.api.init`, additional endpoints can be specified to be models using the `modelEndpoints` argument.
Props @adamsilverstein.
Fixes#41056.
Built from https://develop.svn.wordpress.org/trunk@41112
git-svn-id: http://core.svn.wordpress.org/trunk@40952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Set view state properly when navigating history using the browser back/next button in the media library (grid view). Correctly handle navigating, search, image detail view and image edit mode. Also handle bookmarking/reloading.
Props kucrut, joemcgill, afercia.
Fixes#31846.
Built from https://develop.svn.wordpress.org/trunk@41021
git-svn-id: http://core.svn.wordpress.org/trunk@40871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the edit media screen, ensure that the 'replace' button is disabled until a media item is selected. Fix an issue where clicking the button with no item selected threw a JavaScript error and failed to work.
Props timmydcrawford, subrataemfluence, psiico.
Fixes#40589.
Built from https://develop.svn.wordpress.org/trunk@40902
git-svn-id: http://core.svn.wordpress.org/trunk@40752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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
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
The jQuery `hasClass` method accepts a class name without a prefix '.' (period). Remove an errant class name with a '.' in `wp-mediaelement.js` that broke the selector in certain circumstances.
Props kostasx, Presskopp.
Fixes#40354.
Built from https://develop.svn.wordpress.org/trunk@40659
git-svn-id: http://core.svn.wordpress.org/trunk@40522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This offscreen text is not meant to be revealed on focus and just acts as fallback
for assistive technologies that don't support `aria-label` and `role="slider"`.
Also, revealing it on focus has proven over time to be very fragile and to cause
unexpected layout issues.
See #30281.
Fixes#40707.
Built from https://develop.svn.wordpress.org/trunk@40642
git-svn-id: http://core.svn.wordpress.org/trunk@40503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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
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
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
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
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
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
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
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
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
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
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
Invalid nav menu items are exported as settings in the customize controls since it `is_admin()`, but any such `nav_menu_item` settings are excluded from the preview since it's the frontend. Selective refresh for nav menus needs to ignore the syncing of any such `nav_menu_item` settings that are `_invalid` since they are never rendered, and when a nav menu only contains invalid items, an infinite fallback refresh can ensue.
Fixes#38890.
Built from https://develop.svn.wordpress.org/trunk@39333
git-svn-id: http://core.svn.wordpress.org/trunk@39273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This removes support for the skin tone modifier on emoji involving two or more people. This functionality is opposed by Apple and Google, so there is unlikely to be an input mechanism for such emoji, they oppose it on the grounds that they "...do not think a mechanism should be supported that only permits depiction of multi-person groups (or elements) in which each person has the same skin tone."
See their official notification for further details: http://www.unicode.org/L2/L2016/16332-remove-multi-emb.pdf
This change does not require a CDN update, as no emoji were altered or added, only removed.
See #38113.
Built from https://develop.svn.wordpress.org/trunk@39319
git-svn-id: http://core.svn.wordpress.org/trunk@39259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Set focus before rendering to prevent reload in Firefox.
* Rerender views if they are unloaded.
* Remove timeout added in [29513].
* Fix argument in wp.mce.views.render.
* Empty views on hide. Missed in #36434.
Props gitlost, azaozz, iseulde.
Fixes#38511.
Built from https://develop.svn.wordpress.org/trunk@39282
git-svn-id: http://core.svn.wordpress.org/trunk@39222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds play/pause controls to video headers, along with voice
assistance, using `wp.a11y.speak`, to make custom video headers more
accessible. To make styling the play/pause button easier for themes,
CSS has been omitted from the default implementation.
This also includes a refactor of the `wp.customHeader` code to introduce
a `BaseHandler` class, which can be extended by plugins and themes to modify
or enhance the default video handlers.
Props davidakennedy, afercia, bradyvercher, joemcgill, adamsilverstein, rianrietveld.
Fixes#38678.
Built from https://develop.svn.wordpress.org/trunk@39272
git-svn-id: http://core.svn.wordpress.org/trunk@39212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Add `customize_value_custom_css` filter to `WP_Customize_Custom_CSS::value()` method.
* Introduce `customize_update_custom_css_post_content_args` filter in `WP_Customize_Custom_CSS::update()` method.
* Make clear that `wp_get_custom_css()` and `wp_get_custom_css` filter are specifically for obtaining the value to render/display. Eliminate use of `wp_get_custom_css()` when getting the setting value. Use the underlying `post_value` directly when `is_previewed`.
* Move anonymous functions handing JS previewing for `custom_logo`, `custom_css`, and `background` into named functions on the `wp.customize.settingPreviewHandlers` to allow plugins to override/extend preview logic.
* Update `_custom_background_cb` to always print a `style` tag wen in the customizer preview, and update background preview logic to replace existing style element instead of appending a new style to the head so that background changes don't unexpectedly override any Custom CSS in the preview's stylesheet cascade.
Props westonruter, georgestephanis.
See #22058.
Fixes#38672.
Built from https://develop.svn.wordpress.org/trunk@39209
git-svn-id: http://core.svn.wordpress.org/trunk@39149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Removes the `.customize-partial-edit-shortcut-left-margin` class which was not effective on some themes, created a worse experience for other themes, and which did not recalculate when the preview was reflowed or resized. Now some small-width media queries are added to handle common cases while more dramatic issues can be handled by the theme. Also renames `Partial.positionEditShortcut()`to `Partial.addEditShortcutToPlacement()` which is a more accurate description of its function.
Props sirbrillig, sstoqnov.
See #38651, #27403.
Built from https://develop.svn.wordpress.org/trunk@39202
git-svn-id: http://core.svn.wordpress.org/trunk@39142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.
This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.
Props adamsilverstein, joemcgill.
Fixes#38550.
Built from https://develop.svn.wordpress.org/trunk@39102
git-svn-id: http://core.svn.wordpress.org/trunk@39044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Allow history to be manipulated before DOM ready by sourcing state params from the current URL instead of from the `wp.customize.settings` object, since they will be the same anyway. This fixes a JS error since `wp.customize.settings` is not defined before DOM ready.
Amends [38810].
See #30937.
Fixes#38592.
Built from https://develop.svn.wordpress.org/trunk@39060
git-svn-id: http://core.svn.wordpress.org/trunk@39002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
This adds the ability for themes to add support for videos in custom headers
by passing `'video' => true` as an argument when adding theme support for
custom headers.
Custom video headers are managed through the “Header Visuals” (i.e. “Header Image”)
panel in the Customizer where you can select a video from the media library or set a
URL to an external video (YouTube for now) for use in custom headers.
This introduces several new functions:
`has_header_video()` – Check whether a header video is set or not.
`get_header_video_url()` – Retrieve header video URL for custom header.
`the_header_video_url()` – Display header video URL.
`get_header_video_settings()` – Retrieve header video settings.
`has_custom_header()` – Check whether a custom header is set or not.
`get_custom_header_markup()` – Retrieve the markup for a custom header.
`the_custom_header_markup()` – Print the markup for a custom header.
And a new file, `wp-includes/js/wp-custom-header.js` that handles loading videos
in custom headers.
This also enables video headers in the Twenty Seventeen and Twenty Fourteen themes.
Props davidakennedy, celloexpressions, bradyvercher, laurelfulford, joemcgill.
Fixes#38172.
Built from https://develop.svn.wordpress.org/trunk@38985
git-svn-id: http://core.svn.wordpress.org/trunk@38928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* 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
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