For starters, [27050] is rad. This just cleans up some extra new lines that were littered about, updates *some* of the inline docs (needs more), moves wp.media.controller.ImageDetails closer to its parent class, and de-dupes some code in media-template.php.
See #24409. Built from https://develop.svn.wordpress.org/trunk@27051 git-svn-id: http://core.svn.wordpress.org/trunk@26925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -143,7 +143,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
// extract caption
|
||||
captionBlock = editor.dom.getParents( imageNode, '.wp-caption' );
|
||||
|
||||
@@ -172,7 +171,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
}
|
||||
|
||||
return metadata;
|
||||
|
||||
}
|
||||
|
||||
function updateImage( imageNode, imageData ) {
|
||||
@@ -223,7 +221,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
editor.selection.select( editor.dom.select( 'img', node )[0] );
|
||||
}
|
||||
editor.nodeChanged();
|
||||
|
||||
}
|
||||
|
||||
function createImageAndLink( imageData, mode ) {
|
||||
@@ -232,7 +229,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
|
||||
mode = mode ? mode : 'node';
|
||||
|
||||
|
||||
if ( ! imageData.caption ) {
|
||||
classes.push( 'align' + imageData.align );
|
||||
}
|
||||
@@ -261,13 +257,10 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
} else if ( mode === 'html' ) {
|
||||
return editor.dom.createHTML( 'a', { href: imageData.linkUrl }, editor.dom.createHTML( 'img', props ) );
|
||||
}
|
||||
} else {
|
||||
if ( mode === 'node' ) {
|
||||
return editor.dom.create( 'img', props );
|
||||
} else if ( mode === 'html' ) {
|
||||
return editor.dom.createHTML( 'img', props );
|
||||
}
|
||||
|
||||
} else if ( mode === 'node' ) {
|
||||
return editor.dom.create( 'img', props );
|
||||
} else if ( mode === 'html' ) {
|
||||
return editor.dom.createHTML( 'img', props );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -650,8 +643,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
frame.state('replace-image').on( 'replace', callback );
|
||||
|
||||
frame.open();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user