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. git-svn-id: https://develop.svn.wordpress.org/trunk@41338 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
849cf3efb7
commit
706daad00d
|
@ -327,15 +327,15 @@
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
api.prepareLinkPreview = function prepareLinkPreview( element ) {
|
api.prepareLinkPreview = function prepareLinkPreview( element ) {
|
||||||
var queryParams;
|
var queryParams, $element = $( element );
|
||||||
|
|
||||||
// Skip links in admin bar.
|
// Skip links in admin bar.
|
||||||
if ( $( element ).closest( '#wpadminbar' ).length ) {
|
if ( $element.closest( '#wpadminbar' ).length ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore links with href="#", href="#id", or non-HTTP protocols (e.g. javascript: and mailto:).
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,15 +344,20 @@
|
||||||
element.protocol = 'https:';
|
element.protocol = 'https:';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ignore links with class wp-playlist-caption
|
||||||
|
if ( $element.hasClass( 'wp-playlist-caption' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! api.isLinkPreviewable( element ) ) {
|
if ( ! api.isLinkPreviewable( element ) ) {
|
||||||
|
|
||||||
// Style link as unpreviewable only if previewing in iframe; if previewing on frontend, links will be allowed to work normally.
|
// Style link as unpreviewable only if previewing in iframe; if previewing on frontend, links will be allowed to work normally.
|
||||||
if ( api.settings.channel ) {
|
if ( api.settings.channel ) {
|
||||||
$( element ).addClass( 'customize-unpreviewable' );
|
$element.addClass( 'customize-unpreviewable' );
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$( element ).removeClass( 'customize-unpreviewable' );
|
$element.removeClass( 'customize-unpreviewable' );
|
||||||
|
|
||||||
queryParams = api.utils.parseQueryString( element.search.substring( 1 ) );
|
queryParams = api.utils.parseQueryString( element.search.substring( 1 ) );
|
||||||
queryParams.customize_changeset_uuid = api.settings.changeset.uuid;
|
queryParams.customize_changeset_uuid = api.settings.changeset.uuid;
|
||||||
|
|
Loading…
Reference in New Issue