Make WordPress Core


Ignore:
Timestamp:
02/27/2014 07:21:04 PM (13 years ago)
Author:
wonderboymusic
Message:

wp.media.collection should be its own civilized instantiable class, not a wrapper/factory. The class shall contain no reference to specific instances, and shall not try to grab static properties of itself. self, meet this.

See #26631.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r27242 r27313  
    433433
    434434                <#
    435                         var playlist = 'playlist-edit' === data.controller.id, emptyModel = 'undefined' === typeof data.model.style;
     435                        var playlist = 'playlist-edit' === data.controller.id, emptyModel = _.isEmpty(data.model);
    436436                #>
    437437                <label class="setting">
    438438                        <span><?php _e( 'Show Tracklist' ); ?></span>
    439                         <input type="checkbox" data-setting="_tracklist" <# if ( playlist && emptyModel ) { #>
     439                        <input type="checkbox" data-setting="tracklist" <# if ( playlist && emptyModel ) { #>
    440440                                checked="checked"
    441441                        <# } #> />
    … …  
    444444                <label class="setting">
    445445                        <span><?php _e( 'Show Track Numbers' ); ?></span>
    446                         <input type="checkbox" data-setting="_tracknumbers" <# if ( playlist && emptyModel ) { #>
     446                        <input type="checkbox" data-setting="tracknumbers" <# if ( playlist && emptyModel ) { #>
    447447                                checked="checked"
    448448                        <# } #> />
    … …  
    451451                <label class="setting">
    452452                        <span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
    453                         <input type="checkbox" data-setting="_artists" <# if ( playlist && emptyModel ) { #>
     453                        <input type="checkbox" data-setting="artists" <# if ( playlist && emptyModel ) { #>
    454454                                checked="checked"
    455455                        <# } #> />
    … …  
    458458                <label class="setting">
    459459                        <span><?php _e( 'Show Images' ); ?></span>
    460                         <input type="checkbox" data-setting="_images" <# if ( emptyModel ) { #>
     460                        <input type="checkbox" data-setting="images" <# if ( emptyModel ) { #>
    461461                                checked="checked"
    462462                        <# } #> />
Note: See TracChangeset for help on using the changeset viewer.