WordPress.org

Make WordPress Core

Changeset 41338


Ignore:
Timestamp:
09/06/2017 05:59:53 PM (23 months ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/customize-preview.js

    r40381 r41338  
    328328     */
    329329    api.prepareLinkPreview = function prepareLinkPreview( element ) {
    330         var queryParams;
     330        var queryParams, $element = $( element );
    331331
    332332        // Skip links in admin bar.
    333         if ( $( element ).closest( '#wpadminbar' ).length ) {
     333        if ( $element.closest( '#wpadminbar' ).length ) {
    334334            return;
    335335        }
    336336
    337337        // Ignore links with href="#", href="#id", or non-HTTP protocols (e.g. javascript: and mailto:).
    338         if ( '#' === $( element ).attr( 'href' ).substr( 0, 1 ) || ! /^https?:$/.test( element.protocol ) ) {
     338        if ( '#' === $element.attr( 'href' ).substr( 0, 1 ) || ! /^https?:$/.test( element.protocol ) ) {
    339339            return;
    340340        }
     
    345345        }
    346346
     347        // Ignore links with class wp-playlist-caption
     348        if ( $element.hasClass( 'wp-playlist-caption' ) ) {
     349            return;
     350        }
     351
    347352        if ( ! api.isLinkPreviewable( element ) ) {
    348353
    349354            // Style link as unpreviewable only if previewing in iframe; if previewing on frontend, links will be allowed to work normally.
    350355            if ( api.settings.channel ) {
    351                 $( element ).addClass( 'customize-unpreviewable' );
     356                $element.addClass( 'customize-unpreviewable' );
    352357            }
    353358            return;
    354359        }
    355         $( element ).removeClass( 'customize-unpreviewable' );
     360        $element.removeClass( 'customize-unpreviewable' );
    356361
    357362        queryParams = api.utils.parseQueryString( element.search.substring( 1 ) );
Note: See TracChangeset for help on using the changeset viewer.