Make WordPress Core

Changeset 27320


Ignore:
Timestamp:
02/27/2014 09:37:36 PM (11 years ago)
Author:
wonderboymusic
Message:

Some playlist cleanup:

  • Check properties against the window object when using _.isUndefined() on globals
  • Fix a typo for $safe_type introduced in [27311]

See #26631.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-editor.js

    r27317 r27320  
    633633        insert: function( html ) {
    634634            var editor,
    635                 hasTinymce = ! _.isUndefined( tinymce ),
    636                 hasQuicktags = ! _.isUndefined( QTags ),
     635                hasTinymce = ! _.isUndefined( window.tinymce ),
     636                hasQuicktags = ! _.isUndefined( window.QTags ),
    637637                wpActiveEditor = window.wpActiveEditor;
    638638
     
    799799
    800800            // If that doesn't work, fall back to `tinymce.activeEditor.id`.
    801             if ( ! id && ! _.isUndefined( tinymce ) && tinymce.activeEditor ) {
     801            if ( ! id && ! _.isUndefined( window.tinymce ) && tinymce.activeEditor ) {
    802802                id = tinymce.activeEditor.id;
    803803            }
     
    930930/*
    931931            // Save a bookmark of the caret position in IE.
    932             if ( ! _.isUndefined( tinymce ) ) {
     932            if ( ! _.isUndefined( window.tinymce ) ) {
    933933                editor = tinymce.get( id );
    934934
  • trunk/src/wp-includes/js/mediaelement/wp-playlist.js

    r27239 r27320  
    1 /*globals window, document, $, jQuery */
     1/*globals window, document, jQuery, _, Backbone, _wpmejsSettings */
    22
    33(function ($, _, Backbone) {
     
    3333            _.bindAll( this, 'bindPlayer', 'ended', 'clickTrack' );
    3434
    35             if ( typeof _wpmejsSettings !== 'undefined' ) {
     35            if ( ! _.isUndefined( window._wpmejsSettings ) ) {
    3636                settings.pluginPath = _wpmejsSettings.pluginPath;
    3737            }
     
    4848                }
    4949                dimensions = this.current.get( 'dimensions' ).resized;
    50                 this.playerNode.attr( 'width', dimensions.width );
    51                 this.playerNode.attr( 'height', dimensions.height );
     50                this.playerNode.attr( dimensions );
    5251            } else {
    5352                if ( ! this.data.images ) {
  • trunk/src/wp-includes/media.php

    r27318 r27320  
    11181118    $data['tracks'] = $tracks;
    11191119
    1120     $safe_type = esc_attr( $safe_type );
     1120    $safe_type = esc_attr( $type );
    11211121    $safe_style = esc_attr( $style );
    11221122
Note: See TracChangeset for help on using the changeset viewer.