Customize: Do not show `cursor: not-allowed` on audio/video track titles within playlists in preview.

Props scott.deluzio, mitraval192, westonruter.
See #31517.
Fixes #41489.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-09-06 18:00:43 +00:00
parent 4c60dfa69b
commit 0391928790
3 changed files with 12 additions and 7 deletions

View File

@ -327,15 +327,15 @@
* @returns {void}
*/
api.prepareLinkPreview = function prepareLinkPreview( element ) {
var queryParams;
var queryParams, $element = $( element );
// Skip links in admin bar.
if ( $( element ).closest( '#wpadminbar' ).length ) {
if ( $element.closest( '#wpadminbar' ).length ) {
return;
}
// Ignore links with href="#", href="#id", or non-HTTP protocols (e.g. javascript: and mailto:).
if ( '#' === $( element ).attr( 'href' ).substr( 0, 1 ) || ! /^https?:$/.test( element.protocol ) ) {
if ( '#' === $element.attr( 'href' ).substr( 0, 1 ) || ! /^https?:$/.test( element.protocol ) ) {
return;
}
@ -344,15 +344,20 @@
element.protocol = 'https:';
}
// Ignore links with class wp-playlist-caption
if ( $element.hasClass( 'wp-playlist-caption' ) ) {
return;
}
if ( ! api.isLinkPreviewable( element ) ) {
// Style link as unpreviewable only if previewing in iframe; if previewing on frontend, links will be allowed to work normally.
if ( api.settings.channel ) {
$( element ).addClass( 'customize-unpreviewable' );
$element.addClass( 'customize-unpreviewable' );
}
return;
}
$( element ).removeClass( 'customize-unpreviewable' );
$element.removeClass( 'customize-unpreviewable' );
queryParams = api.utils.parseQueryString( element.search.substring( 1 ) );
queryParams.customize_changeset_uuid = api.settings.changeset.uuid;

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41337';
$wp_version = '4.9-alpha-41338';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.