Make WordPress Core

Ticket #22726: 22726.diff

File 22726.diff, 932 bytes (added by ericlewis, 10 years ago)

work in progress

  • wp-includes/js/media-views.js

    diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js
    index 26fe39d..97f06e5 100644
    a b  
    19601960                        this.on( 'router:render:browse', this.browseRouter, this );
    19611961                        this.on( 'content:create:browse', this.browseContent, this );
    19621962                        this.on( 'content:render:upload', this.uploadContent, this );
     1963                        this.on( 'content:create:fromURL', this.createFromURLContent, this );
    19631964                        this.on( 'toolbar:create:select', this.createSelectToolbar, this );
    19641965                },
    19651966
     
    19731974                                browse: {
    19741975                                        text:     l10n.mediaLibraryTitle,
    19751976                                        priority: 40
     1977                                },
     1978                                fromURL: {
     1979                                        text: 'From URL',
     1980                                        priority: 50
    19761981                                }
    19771982                        });
    19781983                },
     
    20182023                        }) );
    20192024                },
    20202025
     2026                createFromURLContent: function() {
     2027                        this.content.set( new media.View({
     2028                                el: '<div>lorem ipsum</div>'
     2029                        }) );
     2030                },
     2031
    20212032                /**
    20222033                 * Toolbars
    20232034                 *