diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js index 1af0085694..bbb2099bfd 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create("tinymce.plugins.wpEditImage",{url:"",editor:{},init:function(a,c){var d=this,b={};d.url=c;d.editor=a;d._createButtons();a.addCommand("WP_EditImage",function(){var i=a.selection.getNode(),g,h,e,f=a.dom.getAttrib(i,"class");if(f.indexOf("mceItem")!=-1||f.indexOf("wpGallery")!=-1||i.nodeName!="IMG"){return}g=tinymce.DOM.getViewPort();h=680<(g.h-70)?680:g.h-70;e=650");f.dom.insertAfter(h,i);f.selection.select(h.firstChild);if(tinymce.isIE){f.selection.setContent("")}else{f.selection.setContent('
');f.selection.setCursorLocation(h,0)}f.dom.events.cancel(j);return false}}});a.onBeforeSetContent.add(function(e,f){f.content=e.wpSetImgCaption(f.content)});a.onPostProcess.add(function(e,f){if(f.get){f.content=e.wpGetImgCaption(f.content)}});a.wpSetImgCaption=function(e){return d._do_shcode(e)};a.wpGetImgCaption=function(e){return d._get_shcode(e)}},_do_shcode:function(a){return a.replace(/(?:

)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(g,d,k){var j,f,e,h,i;j=d.match(/id=['"]([^'"]+)['"] ?/);d=d.replace(j[0],"");f=d.match(/align=['"]([^'"]+)['"] ?/);d=d.replace(f[0],"");e=d.match(/width=['"]([0-9]+)['"] ?/);d=d.replace(e[0],"");h=tinymce.trim(d).replace(/caption=['"]/,"").replace(/['"]$/,"");j=(j&&j[1])?j[1]:"";f=(f&&f[1])?f[1]:"alignnone";e=(e&&e[1])?e[1]:"";if(!e||!h){return k}i=(f=="aligncenter")?"mceTemp mceIEcenter":"mceTemp";return'

'+k+'
'+h+"
"})},_get_shcode:function(a){return a.replace(/
\s*
]+)>\s*
]+>([\s\S]+?)<\/dt>\s*
]+>([\s\S]+?)<\/dd>\s*<\/dl>\s*<\/div>/gi,function(g,d,j,h){var i,f,e;e=j.match(/width="([0-9]+)"/);e=(e&&e[1])?e[1]:"";if(!e||!h){return j}i=d.match(/id="([^"]+)"/);i=(i&&i[1])?i[1]:"";f=d.match(/class="([^"]+)"/);f=(f&&f[1])?f[1]:"";f=f.match(/align[a-z]+/)||"alignnone";h=h.replace(/<[a-z][^<>]+>/g,function(b){return b.replace(/"/g,"'")});h=h.replace(/"/g,""");return'[caption id="'+i+'" align="'+f+'" width="'+e+'" caption="'+h+'"]'+j+"[/caption]"})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_editbtns");d.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});e=d.add("wp_editbtns","img",{src:b.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.edit_img")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_EditImage")});c=d.add("wp_editbtns","img",{src:b.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.del_img")});tinymce.dom.Event.add(c,"mousedown",function(i){var f=tinyMCE.activeEditor,g=f.selection.getNode(),h;if(g.nodeName=="IMG"&&f.dom.getAttrib(g,"class").indexOf("mceItem")==-1){if((h=f.dom.getParent(g,"div"))&&f.dom.hasClass(h,"mceTemp")){f.dom.remove(h)}else{if((h=f.dom.getParent(g,"A"))&&h.childNodes.length==1){f.dom.remove(h)}else{f.dom.remove(g)}}f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.wpEditImage",{url:"",editor:{},init:function(a,c){var d=this,b={};d.url=c;d.editor=a;d._createButtons();a.addCommand("WP_EditImage",function(){var i=a.selection.getNode(),g,h,e,f=a.dom.getAttrib(i,"class");if(f.indexOf("mceItem")!=-1||f.indexOf("wpGallery")!=-1||i.nodeName!="IMG"){return}g=tinymce.DOM.getViewPort();h=680<(g.h-70)?680:g.h-70;e=650");f.dom.insertAfter(h,i);f.selection.select(h.firstChild);if(tinymce.isIE){f.selection.setContent("")}else{f.selection.setContent('
');f.selection.setCursorLocation(h,0)}f.dom.events.cancel(j);return false}}});a.onBeforeSetContent.add(function(e,f){f.content=e.wpSetImgCaption(f.content)});a.onPostProcess.add(function(e,f){if(f.get){f.content=e.wpGetImgCaption(f.content)}});a.wpSetImgCaption=function(e){return d._do_shcode(e)};a.wpGetImgCaption=function(e){return d._get_shcode(e)}},_do_shcode:function(a){return a.replace(/(?:

)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(g,d,k){var j,f,e,h,i;j=d.match(/id=['"]([^'"]+)['"] ?/);d=d.replace(j[0],"");f=d.match(/align=['"]([^'"]+)['"] ?/);d=d.replace(f[0],"");e=d.match(/width=['"]([0-9]+)['"] ?/);d=d.replace(e[0],"");h=tinymce.trim(d).replace(/caption=['"]/,"").replace(/['"]$/,"");j=(j&&j[1])?j[1]:"";f=(f&&f[1])?f[1]:"alignnone";e=(e&&e[1])?e[1]:"";if(!e||!h){return k}i=(f=="aligncenter")?"mceTemp mceIEcenter":"mceTemp";return'

'+k+'
'+h+"
"})},_get_shcode:function(a){return a.replace(/
\s*
]+)>\s*
]+>([\s\S]+?)<\/dt>\s*
]+>([\s\S]+?)<\/dd>\s*<\/dl>\s*<\/div>/gi,function(g,d,j,h){var i,f,e;e=j.match(/width="([0-9]+)"/);e=(e&&e[1])?e[1]:"";if(!e||!h){return j}i=d.match(/id="([^"]+)"/);i=(i&&i[1])?i[1]:"";f=d.match(/class="([^"]+)"/);f=(f&&f[1])?f[1]:"";f=f.match(/align[a-z]+/)||"alignnone";h=h.replace(/<[a-z][^<>]+>/g,function(b){return b.replace(/"/g,"'")});h=h.replace(/"/g,""");return'[caption id="'+i+'" align="'+f+'" width="'+e+'" caption="'+h+'"]'+j+"[/caption]"})},_createButtons:function(){var b=this,a=tinyMCE.activeEditor,d=tinymce.DOM,e,c;d.remove("wp_editbtns");d.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});e=d.add("wp_editbtns","img",{src:b.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.edit_img")});tinymce.dom.Event.add(e,"mousedown",function(g){var f=tinyMCE.activeEditor;f.windowManager.bookmark=f.selection.getBookmark("simple");f.execCommand("WP_EditImage")});c=d.add("wp_editbtns","img",{src:b.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:a.getLang("wpeditimage.del_img")});tinymce.dom.Event.add(c,"mousedown",function(i){var f=tinyMCE.activeEditor,g=f.selection.getNode(),h;if(g.nodeName=="IMG"&&f.dom.getAttrib(g,"class").indexOf("mceItem")==-1){if((h=f.dom.getParent(g,"div"))&&f.dom.hasClass(h,"mceTemp")){f.dom.remove(h)}else{if((h=f.dom.getParent(g,"A"))&&h.childNodes.length==1){f.dom.remove(h)}else{f.dom.remove(g)}}f.execCommand("mceRepaint");return false}})},getInfo:function(){return{longname:"Edit Image",author:"WordPress",authorurl:"http://wordpress.org",infourl:"",version:"1.0"}}});tinymce.PluginManager.add("wpeditimage",tinymce.plugins.wpEditImage)})(); \ No newline at end of file diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index 2d5d202771..a1f4023fd1 100644 Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ diff --git a/wp-includes/version.php b/wp-includes/version.php index 271546153a..87a1315e9d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '3.4-alpha-19983'; +$wp_version = '3.4-alpha-19985'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. @@ -18,7 +18,7 @@ $wp_db_version = 19863; * * @global string $tinymce_version */ -$tinymce_version = '348-19983'; +$tinymce_version = '348-19985'; /** * Holds the cache manifest version