Ticket #28532: 28532.3.diff
File 28532.3.diff, 1.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/js/mce-view.js
124 124 */ 125 125 register: function( type, constructor ) { 126 126 var defaultConstructor = { 127 shortcode: type,127 type: type, 128 128 View: {}, 129 129 toView: function( content ) { 130 var match = wp.shortcode.next( this. shortcode, content );130 var match = wp.shortcode.next( this.type, content ); 131 131 132 132 if ( ! match ) { 133 133 return; … … 488 488 * @param {HTMLElement} node 489 489 */ 490 490 edit: function( node ) { 491 var media = wp.media[ this. shortcode ],491 var media = wp.media[ this.type ], 492 492 self = this, 493 493 frame, data, callback; 494 494 … … 501 501 } ); 502 502 503 503 callback = function( selection ) { 504 var shortcode = wp.media[ self. shortcode ].shortcode( selection ).string();504 var shortcode = wp.media[ self.type ].shortcode( selection ).string(); 505 505 $( node ).attr( 'data-wpview-text', window.encodeURIComponent( shortcode ) ); 506 506 wp.mce.views.refreshView( self, shortcode ); 507 507 frame.detach(); … … 819 819 self = this, 820 820 frame, 821 821 data, 822 isURL = 'embedURL' === this. shortcode;822 isURL = 'embedURL' === this.type; 823 823 824 824 $( document ).trigger( 'media:edit' ); 825 825