WordPress.org

Make WordPress Core

Changeset 22851


Ignore:
Timestamp:
11/26/2012 10:49:45 PM (5 years ago)
Author:
ryan
Message:

Rename 'id' to 'state' in menu item view.

Props koopersmith
fixes #22594

File:
1 edited

Legend:

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

    r22841 r22851  
    23402340        className: 'media-menu',
    23412341
    2342         toView: function( options, id ) {
     2342        toView: function( options, state ) {
    23432343            options = options || {};
    2344             options.id = options.id || id;
     2344            options.state = options.state || state;
    23452345            return new media.view.MenuItem( options ).render();
    23462346        },
    23472347
    2348         select: function( id ) {
    2349             var view = this.get( id );
     2348        select: function( state ) {
     2349            var view = this.get( state );
    23502350
    23512351            if ( ! view )
     
    23742374            if ( options.click )
    23752375                options.click.call( this );
    2376             else if ( options.id )
    2377                 this.controller.state( options.id );
     2376            else if ( options.state )
     2377                this.controller.state( options.state );
    23782378        },
    23792379
Note: See TracChangeset for help on using the changeset viewer.