From 25b0eedf2bb43469561f77ec45d871b9cae0019b Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 25 Aug 2015 04:38:20 +0000 Subject: [PATCH] TinyMCE: ensure the `wordpress` plugin is loaded before calling `_createToolbar()`. Props hauvong, azaozz. Fixes #33393. Built from https://develop.svn.wordpress.org/trunk@33728 git-svn-id: http://core.svn.wordpress.org/trunk@33696 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../js/tinymce/plugins/wpeditimage/plugin.js | 20 ++++++++++-------- .../tinymce/plugins/wpeditimage/plugin.min.js | 2 +- .../js/tinymce/plugins/wplink/plugin.js | 12 ++++++----- .../js/tinymce/plugins/wplink/plugin.min.js | 2 +- .../js/tinymce/plugins/wpview/plugin.js | 10 +++++---- .../js/tinymce/plugins/wpview/plugin.min.js | 2 +- wp-includes/js/tinymce/wp-tinymce.js.gz | Bin 146897 -> 146913 bytes wp-includes/version.php | 2 +- 8 files changed, 28 insertions(+), 22 deletions(-) diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js index 662a92a1ed..2779cd39dd 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js @@ -61,14 +61,16 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { } ); editor.once( 'preinit', function() { - toolbar = editor.wp._createToolbar( [ - 'wp_img_alignleft', - 'wp_img_aligncenter', - 'wp_img_alignright', - 'wp_img_alignnone', - 'wp_img_edit', - 'wp_img_remove' - ] ); + if ( editor.wp && editor.wp._createToolbar ) { + toolbar = editor.wp._createToolbar( [ + 'wp_img_alignleft', + 'wp_img_aligncenter', + 'wp_img_alignright', + 'wp_img_alignnone', + 'wp_img_edit', + 'wp_img_remove' + ] ); + } } ); editor.on( 'wptoolbar', function( event ) { @@ -88,7 +90,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { editor.selection.select( node ); editor.nodeChanged(); }, 200 ); - } else { + } else if ( toolbar ) { toolbar.hide(); } } ); diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js index 5ffd43b7c1..3f01255379 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wpeditimage",function(a){function b(b){return!(!a.dom.getAttrib(b,"data-mce-placeholder")&&!a.dom.getAttrib(b,"data-mce-object"))}function c(b){return b.replace(/(?:

)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(b,c,d){var e,f,g,h,i,j;return e=c.match(/id=['"]([^'"]*)['"] ?/),e&&(c=c.replace(e[0],"")),f=c.match(/align=['"]([^'"]*)['"] ?/),f&&(c=c.replace(f[0],"")),g=c.match(/class=['"]([^'"]*)['"] ?/),g&&(c=c.replace(g[0],"")),j=c.match(/width=['"]([0-9]*)['"] ?/),j&&(c=c.replace(j[0],"")),d=n(d),i=d.match(/((?:]+>)?]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=n(i[2]),i=n(i[1])):(h=n(c).replace(/caption=['"]/,"").replace(/['"]$/,""),i=d),e=e&&e[1]?e[1].replace(/[<>&]+/g,""):"",f=f&&f[1]?f[1]:"alignnone",g=g&&g[1]?" "+g[1].replace(/[<>&]+/g,""):"",!j&&i&&(j=i.match(/width=['"]([0-9]*)['"]/)),j&&j[1]&&(j=j[1]),j&&h?(j=parseInt(j,10),a.getParam("wpeditimage_html5_captions")||(j+=10),'

'+i+'
'+h+"
"):d})}function d(a){return a.replace(/
]*>([\s\S]+?)<\/div>/g,function(a,b){var c="";return-1===b.indexOf("]+>([\s\S]+?)<\/dd>/i),c&&c[1]?"

"+c[1]+"

":""):(c=b.replace(/\s*
]+)>\s*
]+>([\s\S]+?)<\/dt>\s*
]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi,function(a,b,c,d){var e,f,g,h;return h=c.match(/width="([0-9]*)"/),h=h&&h[1]?h[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",g=f.match(/align[a-z]+/i)||"alignnone",h&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=f.replace(/wp-caption ?|align[a-z]+ ?/gi,""),f&&(f=' class="'+f+'"'),d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"
"),'[caption id="'+e+'" align="'+g+'" width="'+h+'"'+f+"]"+c+" "+d+"[/caption]"):("alignnone"!==g[0]&&(c=c.replace(/>]+>)?]+>(?:<\/a>)?)(

[\s\S]*<\/p>)?[\s\S]*/gi,"

$1

$2")),c)})}function e(b){var c,d,e,f,g,h,i,j,k=[],l=a.dom,m=/^\d+$/;return e={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""},e.url=l.getAttrib(b,"src"),e.alt=l.getAttrib(b,"alt"),e.title=l.getAttrib(b,"title"),i=l.getAttrib(b,"width"),j=l.getAttrib(b,"height"),(!m.test(i)||parseInt(i,10)<1)&&(i=b.naturalWidth||b.width),(!m.test(j)||parseInt(j,10)<1)&&(j=b.naturalHeight||b.height),e.customWidth=e.width=i,e.customHeight=e.height=j,c=tinymce.explode(b.className," "),d=[],tinymce.each(c,function(a){/^wp-image/.test(a)?e.attachment_id=parseInt(a.replace("wp-image-",""),10):/^align/.test(a)?e.align=a.replace("align",""):/^size/.test(a)?e.size=a.replace("size-",""):d.push(a)}),e.extraClasses=d.join(" "),f=l.getParents(b,".wp-caption"),f.length&&(f=f[0],c=f.className.split(" "),tinymce.each(c,function(a){/^align/.test(a)?e.align=a.replace("align",""):a&&"wp-caption"!==a&&k.push(a)}),e.captionClassName=k.join(" "),g=l.select("dd.wp-caption-dd",f),g.length&&(g=g[0],e.caption=a.serializer.serialize(g).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,""))),b.parentNode&&"A"===b.parentNode.nodeName&&(h=b.parentNode,e.linkUrl=l.getAttrib(h,"href"),e.linkTargetBlank="_blank"===l.getAttrib(h,"target")?!0:!1,e.linkRel=l.getAttrib(h,"rel"),e.linkClassName=h.className),e}function f(a){return a&&!(!a.textContent&&!a.innerText)}function g(b){return!b||-1===b.indexOf("<")&&-1===b.indexOf(">")?b:(l||(l=new tinymce.html.Serializer({},a.schema)),l.serialize(a.parser.parse(b,{forced_root_block:!1})))}function h(b,c){var d,e,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a.dom;d=tinymce.explode(c.extraClasses," "),d||(d=[]),c.caption||d.push("align"+c.align),c.attachment_id&&(d.push("wp-image-"+c.attachment_id),c.size&&"custom"!==c.size&&d.push("size-"+c.size)),s=c.width,t=c.height,"custom"===c.size&&(s=c.customWidth,t=c.customHeight),q={src:c.url,width:s||null,height:t||null,alt:c.alt,title:c.title||null,"class":d.join(" ")||null},v.setAttribs(b,q),r={href:c.linkUrl,rel:c.linkRel||null,target:c.linkTargetBlank?"_blank":null,"class":c.linkClassName||null},b.parentNode&&"A"===b.parentNode.nodeName&&!f(b.parentNode)?c.linkUrl?v.setAttribs(b.parentNode,r):v.remove(b.parentNode,!0):c.linkUrl&&((l=v.getParent(b,"a"))&&v.insertAfter(b,l),l=v.create("a",r),b.parentNode.insertBefore(l,b),l.appendChild(b)),m=a.dom.getParent(b,".mceTemp"),h=b.parentNode&&"A"===b.parentNode.nodeName&&!f(b.parentNode)?b.parentNode:b,c.caption?(c.caption=g(c.caption),p=c.attachment_id?"attachment_"+c.attachment_id:null,u="align"+(c.align||"none"),e="wp-caption "+u,c.captionClassName&&(e+=" "+c.captionClassName.replace(/[<>&]+/g,"")),a.getParam("wpeditimage_html5_captions")||(s=parseInt(s,10),s+=10),m?(o=v.select("dl.wp-caption",m),o.length&&v.setAttribs(o,{id:p,"class":e,style:"width: "+s+"px"}),n=v.select(".wp-caption-dd",m),n.length&&v.setHTML(n[0],c.caption)):(p=p?'id="'+p+'" ':"",i="

'+c.caption+"
",k=v.create("div",{"class":"mceTemp"},i),(j=v.getParent(h,"p"))?j.parentNode.insertBefore(k,j):h.parentNode.insertBefore(k,h),a.$(k).find("dt.wp-caption-dt").append(h),j&&v.isEmpty(j)&&v.remove(j))):m&&(j=v.create("p"),m.parentNode.insertBefore(j,m),j.appendChild(h),v.remove(m)),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:a,metadata:c,image:b}),a.nodeChanged()}function i(b){var c,d,f;return"undefined"!=typeof wp&&wp.media?(f=e(b),wp.media.events.trigger("editor:image-edit",{editor:a,metadata:f,image:b}),c=wp.media({frame:"image",state:"image-details",metadata:f}),wp.media.events.trigger("editor:frame-create",{frame:c}),d=function(d){a.focus(),a.undoManager.transact(function(){h(b,d)}),c.detach()},c.state("image-details").on("update",d),c.state("replace-image").on("replace",d),c.on("close",function(){a.focus(),c.detach()}),void c.open()):void a.execCommand("mceImage")}function j(b){var c=a.dom.getParent(b,"div.mceTemp");c||"IMG"!==b.nodeName||(c=a.dom.getParent(b,"a")),c?(c.nextSibling?a.selection.select(c.nextSibling):c.previousSibling?a.selection.select(c.previousSibling):a.selection.select(c.parentNode),a.selection.collapse(!0),a.dom.remove(c)):a.dom.remove(b),a.nodeChanged(),a.undoManager.add()}var k,l,m=tinymce.each,n=tinymce.trim,o=tinymce.Env.iOS;return a.addButton("wp_img_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){j(a.selection.getNode())}}),a.addButton("wp_img_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){i(a.selection.getNode())}}),m({alignleft:"Align left",aligncenter:"Align center",alignright:"Align right",alignnone:"No alignment"},function(b,c){var d=c.slice(5);a.addButton("wp_img_"+c,{tooltip:b,icon:"dashicon dashicons-align-"+d,cmd:"alignnone"===c?"wpAlignNone":"Justify"+d.slice(0,1).toUpperCase()+d.slice(1),onPostRender:function(){var b=this;a.on("NodeChange",function(d){var e;"IMG"===d.element.nodeName&&(e=a.dom.getParent(d.element,".wp-caption")||d.element,"alignnone"===c?b.active(!/\balign(left|center|right)\b/.test(e.className)):b.active(a.dom.hasClass(e,c)))})}})}),a.once("preinit",function(){k=a.wp._createToolbar(["wp_img_alignleft","wp_img_aligncenter","wp_img_alignright","wp_img_alignnone","wp_img_edit","wp_img_remove"])}),a.on("wptoolbar",function(a){"IMG"!==a.element.nodeName||b(a.element)||(a.toolbar=k)}),o&&a.on("click",function(b){if("IMG"===b.target.nodeName){var c=b.target;window.setTimeout(function(){a.selection.select(c),a.nodeChanged()},200)}else k.hide()}),a.on("init",function(){var b=a.dom,c=a.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";b.addClass(a.getBody(),c),a.on("wpLoadImageForm",function(b){if(!a.getParam("wpeditimage_disable_captions")){var c={type:"textbox",flex:1,name:"caption",minHeight:60,multiline:!0,scroll:!0,label:"Image caption"};b.data.splice(b.data.length-1,0,c)}}),a.on("wpNewImageRefresh",function(a){var c,d;(c=b.getParent(a.node,"dl.wp-caption"))&&(c.style.width||(d=parseInt(a.node.clientWidth,10)+10,d=d?d+"px":"50%",b.setStyle(c,"width",d)))}),a.on("wpImageFormSubmit",function(c){var d,e,f,h,i,j=c.imgData.data,k=c.imgData.node,l=c.imgData.caption,m="",n="",o="";return j.id="__wp-temp-img-id",c.imgData.cancel=!0,j.style||(j.style=null),j.src?(l&&(l=l.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),l=l.replace(/(]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"
"),l=g(l)),k?(i=k.id||null,b.setAttribs(k,j),d=b.getParent(k,"dl.wp-caption"),l?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=l):(k.className&&(m=k.className.match(/wp-image-([0-9]+)/),n=k.className.match(/align(left|right|center|none)/)),n?(n=n[0],k.className=k.className.replace(/align(left|right|center|none)/g,"")):n="alignnone",n=' class="wp-caption '+n+'"',m&&(m=' id="attachment_'+m[1]+'"'),o=j.width||k.clientWidth,o&&(o=parseInt(o,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),f=k.parentNode&&"A"===k.parentNode.nodeName?k.parentNode:k,h="
'+l+"
",d=b.create("div",{"class":"mceTemp"},h),(e=b.getParent(f,"p"))?e.parentNode.insertBefore(d,e):f.parentNode.insertBefore(d,f),a.$(d).find("dt.wp-caption-dt").append(f),e&&b.isEmpty(e)&&b.remove(e)):d&&(h="A"===k.parentNode.nodeName?b.getOuterHTML(k.parentNode):b.getOuterHTML(k),e=b.create("p",{},h),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(h=b.createHTML("img",j),l?(f=a.selection.getNode(),j.width&&(o=parseInt(j.width,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),h='
'+h+'
'+l+"
",e="P"===f.nodeName?f:b.getParent(f,"p"),e&&"P"===e.nodeName?(d=b.create("div",{"class":"mceTemp"},h),e.parentNode.insertBefore(d,e),a.selection.select(d),a.nodeChanged(),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('
'+h+"
")):a.selection.setContent(h)),k=b.get("__wp-temp-img-id"),b.setAttrib(k,"id",i),void(c.imgData.node=k)):void(k&&((d=b.getParent(k,"div.mceTemp"))?b.remove(d):"A"===k.parentNode.nodeName?b.remove(k.parentNode):b.remove(k),a.nodeChanged()))}),a.on("wpLoadImageData",function(c){var d,e=c.imgData.data,f=c.imgData.node;(d=b.getParent(f,"dl.wp-caption"))&&(d=b.select("dd.wp-caption-dd",d)[0],d&&(e.caption=a.serializer.serialize(d).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,"")))}),b.bind(a.getDoc(),"dragstart",function(c){var d=a.selection.getNode();"IMG"===d.nodeName&&b.getParent(d,".wp-caption")&&c.preventDefault()}),tinymce.Env.ie&&tinymce.Env.ie>10&&b.bind(a.getBody(),"mscontrolselect",function(c){"IMG"===c.target.nodeName&&b.getParent(c.target,".wp-caption")?a.getBody().focus():"DL"===c.target.nodeName&&b.hasClass(c.target,"wp-caption")&&c.target.focus()})}),a.on("ObjectResized",function(b){var c=b.target;"IMG"===c.nodeName&&a.undoManager.transact(function(){var d,e,f=a.dom;c.className=c.className.replace(/\bsize-[^ ]+/,""),(d=f.getParent(c,".wp-caption"))&&(e=b.width||f.getAttrib(c,"width"),e&&(e=parseInt(e,10),a.getParam("wpeditimage_html5_captions")||(e+=10),f.setStyle(d,"width",e+"px")))})}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g,h=b.command,i=a.dom;if("mceInsertContent"===h)(c=i.getParent(a.selection.getNode(),"div.mceTemp"))&&(d=i.create("p"),i.insertAfter(d,c),a.selection.setCursorLocation(d,0),a.nodeChanged());else if("JustifyLeft"===h||"JustifyRight"===h||"JustifyCenter"===h||"wpAlignNone"===h){if(c=a.selection.getNode(),f="align"+h.slice(7).toLowerCase(),e=a.dom.getParent(c,".wp-caption"),"IMG"!==c.nodeName&&!e)return;c=e||c,g=a.dom.hasClass(c,f)?" alignnone":" "+f,c.className=n(c.className.replace(/ ?align(left|center|right|none)/g,"")+g),a.nodeChanged(),b.preventDefault(),k&&k.reposition(),a.fire("ExecCommand",{command:h,ui:b.ui,value:b.value})}}),a.on("keydown",function(b){var c,d,e,f,g=a.selection,h=b.keyCode,i=a.dom,k=tinymce.util.VK;if(h===k.ENTER)c=g.getNode(),d=i.getParent(c,"div.mceTemp"),d&&(i.events.cancel(b),tinymce.each(i.select("dt, dd",d),function(a){i.isEmpty(a)&&i.remove(a)}),f=tinymce.Env.ie&&tinymce.Env.ie<11?"":'
',e=i.create("p",null,f),"DD"===c.nodeName?i.insertAfter(e,d):d.parentNode.insertBefore(e,d),a.nodeChanged(),g.setCursorLocation(e,0));else if((h===k.DELETE||h===k.BACKSPACE)&&(c=g.getNode(),"DIV"===c.nodeName&&i.hasClass(c,"mceTemp")?d=c:("IMG"===c.nodeName||"DT"===c.nodeName||"A"===c.nodeName)&&(d=i.getParent(c,"div.mceTemp")),d))return i.events.cancel(b),j(c),!1}),tinymce.Env.gecko&&a.on("undo redo",function(){"IMG"===a.selection.getNode().nodeName&&a.selection.collapse()}),a.wpSetImgCaption=function(a){return c(a)},a.wpGetImgCaption=function(a){return d(a)},a.on("BeforeSetContent",function(b){"raw"!==b.format&&(b.content=a.wpSetImgCaption(b.content))}),a.on("PostProcess",function(b){b.get&&(b.content=a.wpGetImgCaption(b.content))}),a.wp=a.wp||{},a.wp.isPlaceholder=b,{_do_shcode:c,_get_shcode:d}}); \ No newline at end of file +tinymce.PluginManager.add("wpeditimage",function(a){function b(b){return!(!a.dom.getAttrib(b,"data-mce-placeholder")&&!a.dom.getAttrib(b,"data-mce-object"))}function c(b){return b.replace(/(?:

)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g,function(b,c,d){var e,f,g,h,i,j;return e=c.match(/id=['"]([^'"]*)['"] ?/),e&&(c=c.replace(e[0],"")),f=c.match(/align=['"]([^'"]*)['"] ?/),f&&(c=c.replace(f[0],"")),g=c.match(/class=['"]([^'"]*)['"] ?/),g&&(c=c.replace(g[0],"")),j=c.match(/width=['"]([0-9]*)['"] ?/),j&&(c=c.replace(j[0],"")),d=n(d),i=d.match(/((?:]+>)?]+>(?:<\/a>)?)([\s\S]*)/i),i&&i[2]?(h=n(i[2]),i=n(i[1])):(h=n(c).replace(/caption=['"]/,"").replace(/['"]$/,""),i=d),e=e&&e[1]?e[1].replace(/[<>&]+/g,""):"",f=f&&f[1]?f[1]:"alignnone",g=g&&g[1]?" "+g[1].replace(/[<>&]+/g,""):"",!j&&i&&(j=i.match(/width=['"]([0-9]*)['"]/)),j&&j[1]&&(j=j[1]),j&&h?(j=parseInt(j,10),a.getParam("wpeditimage_html5_captions")||(j+=10),'

"):d})}function d(a){return a.replace(/
]*>([\s\S]+?)<\/div>/g,function(a,b){var c="";return-1===b.indexOf("]+>([\s\S]+?)<\/dd>/i),c&&c[1]?"

"+c[1]+"

":""):(c=b.replace(/\s*
]+)>\s*
]+>([\s\S]+?)<\/dt>\s*
]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi,function(a,b,c,d){var e,f,g,h;return h=c.match(/width="([0-9]*)"/),h=h&&h[1]?h[1]:"",f=b.match(/class="([^"]*)"/),f=f&&f[1]?f[1]:"",g=f.match(/align[a-z]+/i)||"alignnone",h&&d?(e=b.match(/id="([^"]*)"/),e=e&&e[1]?e[1]:"",f=f.replace(/wp-caption ?|align[a-z]+ ?/gi,""),f&&(f=' class="'+f+'"'),d=d.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),d=d.replace(/\s*\n\s*/g,"
"),'[caption id="'+e+'" align="'+g+'" width="'+h+'"'+f+"]"+c+" "+d+"[/caption]"):("alignnone"!==g[0]&&(c=c.replace(/>]+>)?]+>(?:<\/a>)?)(

[\s\S]*<\/p>)?[\s\S]*/gi,"

$1

$2")),c)})}function e(b){var c,d,e,f,g,h,i,j,k=[],l=a.dom,m=/^\d+$/;return e={attachment_id:!1,size:"custom",caption:"",align:"none",extraClasses:"",link:!1,linkUrl:"",linkClassName:"",linkTargetBlank:!1,linkRel:"",title:""},e.url=l.getAttrib(b,"src"),e.alt=l.getAttrib(b,"alt"),e.title=l.getAttrib(b,"title"),i=l.getAttrib(b,"width"),j=l.getAttrib(b,"height"),(!m.test(i)||parseInt(i,10)<1)&&(i=b.naturalWidth||b.width),(!m.test(j)||parseInt(j,10)<1)&&(j=b.naturalHeight||b.height),e.customWidth=e.width=i,e.customHeight=e.height=j,c=tinymce.explode(b.className," "),d=[],tinymce.each(c,function(a){/^wp-image/.test(a)?e.attachment_id=parseInt(a.replace("wp-image-",""),10):/^align/.test(a)?e.align=a.replace("align",""):/^size/.test(a)?e.size=a.replace("size-",""):d.push(a)}),e.extraClasses=d.join(" "),f=l.getParents(b,".wp-caption"),f.length&&(f=f[0],c=f.className.split(" "),tinymce.each(c,function(a){/^align/.test(a)?e.align=a.replace("align",""):a&&"wp-caption"!==a&&k.push(a)}),e.captionClassName=k.join(" "),g=l.select("dd.wp-caption-dd",f),g.length&&(g=g[0],e.caption=a.serializer.serialize(g).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,""))),b.parentNode&&"A"===b.parentNode.nodeName&&(h=b.parentNode,e.linkUrl=l.getAttrib(h,"href"),e.linkTargetBlank="_blank"===l.getAttrib(h,"target")?!0:!1,e.linkRel=l.getAttrib(h,"rel"),e.linkClassName=h.className),e}function f(a){return a&&!(!a.textContent&&!a.innerText)}function g(b){return!b||-1===b.indexOf("<")&&-1===b.indexOf(">")?b:(l||(l=new tinymce.html.Serializer({},a.schema)),l.serialize(a.parser.parse(b,{forced_root_block:!1})))}function h(b,c){var d,e,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a.dom;d=tinymce.explode(c.extraClasses," "),d||(d=[]),c.caption||d.push("align"+c.align),c.attachment_id&&(d.push("wp-image-"+c.attachment_id),c.size&&"custom"!==c.size&&d.push("size-"+c.size)),s=c.width,t=c.height,"custom"===c.size&&(s=c.customWidth,t=c.customHeight),q={src:c.url,width:s||null,height:t||null,alt:c.alt,title:c.title||null,"class":d.join(" ")||null},v.setAttribs(b,q),r={href:c.linkUrl,rel:c.linkRel||null,target:c.linkTargetBlank?"_blank":null,"class":c.linkClassName||null},b.parentNode&&"A"===b.parentNode.nodeName&&!f(b.parentNode)?c.linkUrl?v.setAttribs(b.parentNode,r):v.remove(b.parentNode,!0):c.linkUrl&&((l=v.getParent(b,"a"))&&v.insertAfter(b,l),l=v.create("a",r),b.parentNode.insertBefore(l,b),l.appendChild(b)),m=a.dom.getParent(b,".mceTemp"),h=b.parentNode&&"A"===b.parentNode.nodeName&&!f(b.parentNode)?b.parentNode:b,c.caption?(c.caption=g(c.caption),p=c.attachment_id?"attachment_"+c.attachment_id:null,u="align"+(c.align||"none"),e="wp-caption "+u,c.captionClassName&&(e+=" "+c.captionClassName.replace(/[<>&]+/g,"")),a.getParam("wpeditimage_html5_captions")||(s=parseInt(s,10),s+=10),m?(o=v.select("dl.wp-caption",m),o.length&&v.setAttribs(o,{id:p,"class":e,style:"width: "+s+"px"}),n=v.select(".wp-caption-dd",m),n.length&&v.setHTML(n[0],c.caption)):(p=p?'id="'+p+'" ':"",i="

'+c.caption+"
",k=v.create("div",{"class":"mceTemp"},i),(j=v.getParent(h,"p"))?j.parentNode.insertBefore(k,j):h.parentNode.insertBefore(k,h),a.$(k).find("dt.wp-caption-dt").append(h),j&&v.isEmpty(j)&&v.remove(j))):m&&(j=v.create("p"),m.parentNode.insertBefore(j,m),j.appendChild(h),v.remove(m)),wp.media.events&&wp.media.events.trigger("editor:image-update",{editor:a,metadata:c,image:b}),a.nodeChanged()}function i(b){var c,d,f;return"undefined"!=typeof wp&&wp.media?(f=e(b),wp.media.events.trigger("editor:image-edit",{editor:a,metadata:f,image:b}),c=wp.media({frame:"image",state:"image-details",metadata:f}),wp.media.events.trigger("editor:frame-create",{frame:c}),d=function(d){a.focus(),a.undoManager.transact(function(){h(b,d)}),c.detach()},c.state("image-details").on("update",d),c.state("replace-image").on("replace",d),c.on("close",function(){a.focus(),c.detach()}),void c.open()):void a.execCommand("mceImage")}function j(b){var c=a.dom.getParent(b,"div.mceTemp");c||"IMG"!==b.nodeName||(c=a.dom.getParent(b,"a")),c?(c.nextSibling?a.selection.select(c.nextSibling):c.previousSibling?a.selection.select(c.previousSibling):a.selection.select(c.parentNode),a.selection.collapse(!0),a.dom.remove(c)):a.dom.remove(b),a.nodeChanged(),a.undoManager.add()}var k,l,m=tinymce.each,n=tinymce.trim,o=tinymce.Env.iOS;return a.addButton("wp_img_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){j(a.selection.getNode())}}),a.addButton("wp_img_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){i(a.selection.getNode())}}),m({alignleft:"Align left",aligncenter:"Align center",alignright:"Align right",alignnone:"No alignment"},function(b,c){var d=c.slice(5);a.addButton("wp_img_"+c,{tooltip:b,icon:"dashicon dashicons-align-"+d,cmd:"alignnone"===c?"wpAlignNone":"Justify"+d.slice(0,1).toUpperCase()+d.slice(1),onPostRender:function(){var b=this;a.on("NodeChange",function(d){var e;"IMG"===d.element.nodeName&&(e=a.dom.getParent(d.element,".wp-caption")||d.element,"alignnone"===c?b.active(!/\balign(left|center|right)\b/.test(e.className)):b.active(a.dom.hasClass(e,c)))})}})}),a.once("preinit",function(){a.wp&&a.wp._createToolbar&&(k=a.wp._createToolbar(["wp_img_alignleft","wp_img_aligncenter","wp_img_alignright","wp_img_alignnone","wp_img_edit","wp_img_remove"]))}),a.on("wptoolbar",function(a){"IMG"!==a.element.nodeName||b(a.element)||(a.toolbar=k)}),o&&a.on("click",function(b){if("IMG"===b.target.nodeName){var c=b.target;window.setTimeout(function(){a.selection.select(c),a.nodeChanged()},200)}else k&&k.hide()}),a.on("init",function(){var b=a.dom,c=a.getParam("wpeditimage_html5_captions")?"html5-captions":"html4-captions";b.addClass(a.getBody(),c),a.on("wpLoadImageForm",function(b){if(!a.getParam("wpeditimage_disable_captions")){var c={type:"textbox",flex:1,name:"caption",minHeight:60,multiline:!0,scroll:!0,label:"Image caption"};b.data.splice(b.data.length-1,0,c)}}),a.on("wpNewImageRefresh",function(a){var c,d;(c=b.getParent(a.node,"dl.wp-caption"))&&(c.style.width||(d=parseInt(a.node.clientWidth,10)+10,d=d?d+"px":"50%",b.setStyle(c,"width",d)))}),a.on("wpImageFormSubmit",function(c){var d,e,f,h,i,j=c.imgData.data,k=c.imgData.node,l=c.imgData.caption,m="",n="",o="";return j.id="__wp-temp-img-id",c.imgData.cancel=!0,j.style||(j.style=null),j.src?(l&&(l=l.replace(/\r\n|\r/g,"\n").replace(/<\/?[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),l=l.replace(/(]*>)\s*\n\s*/g,"$1").replace(/\s*\n\s*/g,"
"),l=g(l)),k?(i=k.id||null,b.setAttribs(k,j),d=b.getParent(k,"dl.wp-caption"),l?d?(e=b.select("dd.wp-caption-dd",d)[0])&&(e.innerHTML=l):(k.className&&(m=k.className.match(/wp-image-([0-9]+)/),n=k.className.match(/align(left|right|center|none)/)),n?(n=n[0],k.className=k.className.replace(/align(left|right|center|none)/g,"")):n="alignnone",n=' class="wp-caption '+n+'"',m&&(m=' id="attachment_'+m[1]+'"'),o=j.width||k.clientWidth,o&&(o=parseInt(o,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),f=k.parentNode&&"A"===k.parentNode.nodeName?k.parentNode:k,h="
'+l+"
",d=b.create("div",{"class":"mceTemp"},h),(e=b.getParent(f,"p"))?e.parentNode.insertBefore(d,e):f.parentNode.insertBefore(d,f),a.$(d).find("dt.wp-caption-dt").append(f),e&&b.isEmpty(e)&&b.remove(e)):d&&(h="A"===k.parentNode.nodeName?b.getOuterHTML(k.parentNode):b.getOuterHTML(k),e=b.create("p",{},h),b.insertAfter(e,d.parentNode),a.selection.select(e),a.nodeChanged(),b.remove(d.parentNode))):(h=b.createHTML("img",j),l?(f=a.selection.getNode(),j.width&&(o=parseInt(j.width,10),a.getParam("wpeditimage_html5_captions")||(o+=10),o=' style="width: '+o+'px"'),h='
'+h+'
'+l+"
",e="P"===f.nodeName?f:b.getParent(f,"p"),e&&"P"===e.nodeName?(d=b.create("div",{"class":"mceTemp"},h),e.parentNode.insertBefore(d,e),a.selection.select(d),a.nodeChanged(),b.isEmpty(e)&&b.remove(e)):a.selection.setContent('
'+h+"
")):a.selection.setContent(h)),k=b.get("__wp-temp-img-id"),b.setAttrib(k,"id",i),void(c.imgData.node=k)):void(k&&((d=b.getParent(k,"div.mceTemp"))?b.remove(d):"A"===k.parentNode.nodeName?b.remove(k.parentNode):b.remove(k),a.nodeChanged()))}),a.on("wpLoadImageData",function(c){var d,e=c.imgData.data,f=c.imgData.node;(d=b.getParent(f,"dl.wp-caption"))&&(d=b.select("dd.wp-caption-dd",d)[0],d&&(e.caption=a.serializer.serialize(d).replace(/]*>/g,"$&\n").replace(/^

/,"").replace(/<\/p>$/,"")))}),b.bind(a.getDoc(),"dragstart",function(c){var d=a.selection.getNode();"IMG"===d.nodeName&&b.getParent(d,".wp-caption")&&c.preventDefault()}),tinymce.Env.ie&&tinymce.Env.ie>10&&b.bind(a.getBody(),"mscontrolselect",function(c){"IMG"===c.target.nodeName&&b.getParent(c.target,".wp-caption")?a.getBody().focus():"DL"===c.target.nodeName&&b.hasClass(c.target,"wp-caption")&&c.target.focus()})}),a.on("ObjectResized",function(b){var c=b.target;"IMG"===c.nodeName&&a.undoManager.transact(function(){var d,e,f=a.dom;c.className=c.className.replace(/\bsize-[^ ]+/,""),(d=f.getParent(c,".wp-caption"))&&(e=b.width||f.getAttrib(c,"width"),e&&(e=parseInt(e,10),a.getParam("wpeditimage_html5_captions")||(e+=10),f.setStyle(d,"width",e+"px")))})}),a.on("BeforeExecCommand",function(b){var c,d,e,f,g,h=b.command,i=a.dom;if("mceInsertContent"===h)(c=i.getParent(a.selection.getNode(),"div.mceTemp"))&&(d=i.create("p"),i.insertAfter(d,c),a.selection.setCursorLocation(d,0),a.nodeChanged());else if("JustifyLeft"===h||"JustifyRight"===h||"JustifyCenter"===h||"wpAlignNone"===h){if(c=a.selection.getNode(),f="align"+h.slice(7).toLowerCase(),e=a.dom.getParent(c,".wp-caption"),"IMG"!==c.nodeName&&!e)return;c=e||c,g=a.dom.hasClass(c,f)?" alignnone":" "+f,c.className=n(c.className.replace(/ ?align(left|center|right|none)/g,"")+g),a.nodeChanged(),b.preventDefault(),k&&k.reposition(),a.fire("ExecCommand",{command:h,ui:b.ui,value:b.value})}}),a.on("keydown",function(b){var c,d,e,f,g=a.selection,h=b.keyCode,i=a.dom,k=tinymce.util.VK;if(h===k.ENTER)c=g.getNode(),d=i.getParent(c,"div.mceTemp"),d&&(i.events.cancel(b),tinymce.each(i.select("dt, dd",d),function(a){i.isEmpty(a)&&i.remove(a)}),f=tinymce.Env.ie&&tinymce.Env.ie<11?"":'
',e=i.create("p",null,f),"DD"===c.nodeName?i.insertAfter(e,d):d.parentNode.insertBefore(e,d),a.nodeChanged(),g.setCursorLocation(e,0));else if((h===k.DELETE||h===k.BACKSPACE)&&(c=g.getNode(),"DIV"===c.nodeName&&i.hasClass(c,"mceTemp")?d=c:("IMG"===c.nodeName||"DT"===c.nodeName||"A"===c.nodeName)&&(d=i.getParent(c,"div.mceTemp")),d))return i.events.cancel(b),j(c),!1}),tinymce.Env.gecko&&a.on("undo redo",function(){"IMG"===a.selection.getNode().nodeName&&a.selection.collapse()}),a.wpSetImgCaption=function(a){return c(a)},a.wpGetImgCaption=function(a){return d(a)},a.on("BeforeSetContent",function(b){"raw"!==b.format&&(b.content=a.wpSetImgCaption(b.content))}),a.on("PostProcess",function(b){b.get&&(b.content=a.wpGetImgCaption(b.content))}),a.wp=a.wp||{},a.wp.isPlaceholder=b,{_do_shcode:c,_get_shcode:d}}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wplink/plugin.js b/wp-includes/js/tinymce/plugins/wplink/plugin.js index 17d40a23bf..b13c46a935 100644 --- a/wp-includes/js/tinymce/plugins/wplink/plugin.js +++ b/wp-includes/js/tinymce/plugins/wplink/plugin.js @@ -136,11 +136,13 @@ } ); editor.on( 'preinit', function() { - toolbar = editor.wp._createToolbar( [ - 'wp_link_preview', - 'wp_link_edit', - 'wp_link_remove' - ], true ); + if ( editor.wp && editor.wp._createToolbar ) { + toolbar = editor.wp._createToolbar( [ + 'wp_link_preview', + 'wp_link_edit', + 'wp_link_remove' + ], true ); + } } ); } ); } )( window.tinymce ); diff --git a/wp-includes/js/tinymce/plugins/wplink/plugin.min.js b/wp-includes/js/tinymce/plugins/wplink/plugin.min.js index 0915a08801..5096e42e80 100644 --- a/wp-includes/js/tinymce/plugins/wplink/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wplink/plugin.min.js @@ -1 +1 @@ -!function(a){a.ui.WPLinkPreview=a.ui.Control.extend({url:"#",renderHtml:function(){return'

"},setURL:function(b){var c,d;this.url!==b&&(this.url=b,b=window.decodeURIComponent(b),b=b.replace(/^(?:https?:)?\/\/(?:www\.)?/,""),-1!==(c=b.indexOf("?"))&&(b=b.slice(0,c)),-1!==(c=b.indexOf("#"))&&(b=b.slice(0,c)),b=b.replace(/(?:index)?\.html$/,""),"/"===b.charAt(b.length-1)&&(b=b.slice(0,-1)),b.length>40&&-1!==(c=b.indexOf("/"))&&-1!==(d=b.lastIndexOf("/"))&&d!==c&&(c+b.length-d<40&&(d=-(40-(c+1))),b=b.slice(0,c+1)+"\u2026"+b.slice(d)),a.$(this.getEl().firstChild).attr("href",this.url).text(b))}}),a.PluginManager.add("wplink",function(b){var c;b.addCommand("WP_Link",function(){window.wpLink&&window.wpLink.open(b.id)}),b.addShortcut("Alt+Shift+A","","WP_Link"),b.addShortcut("Meta+K","","WP_Link"),b.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),b.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),b.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),b.on("pastepreprocess",function(c){var d=c.content,e=/^(?:https?:)?\/\/\S+$/i;b.selection.isCollapsed()||e.test(b.selection.getContent())||(d=d.replace(/<[^>]+>/g,""),d=a.trim(d),e.test(d)&&(b.execCommand("mceInsertLink",!1,{href:b.dom.decode(d)}),c.preventDefault()))}),b.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){var a=this;b.on("wptoolbar",function(d){var e,f,g=b.dom.getParent(d.element,"a");g&&(e=b.$(g),f=e.attr("href"),f&&!e.find("img").length&&(a.setURL(f),d.element=g,d.toolbar=c))})}}),b.addButton("wp_link_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),b.addButton("wp_link_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",cmd:"unlink"}),b.on("preinit",function(){c=b.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0)})})}(window.tinymce); \ No newline at end of file +!function(a){a.ui.WPLinkPreview=a.ui.Control.extend({url:"#",renderHtml:function(){return'"},setURL:function(b){var c,d;this.url!==b&&(this.url=b,b=window.decodeURIComponent(b),b=b.replace(/^(?:https?:)?\/\/(?:www\.)?/,""),-1!==(c=b.indexOf("?"))&&(b=b.slice(0,c)),-1!==(c=b.indexOf("#"))&&(b=b.slice(0,c)),b=b.replace(/(?:index)?\.html$/,""),"/"===b.charAt(b.length-1)&&(b=b.slice(0,-1)),b.length>40&&-1!==(c=b.indexOf("/"))&&-1!==(d=b.lastIndexOf("/"))&&d!==c&&(c+b.length-d<40&&(d=-(40-(c+1))),b=b.slice(0,c+1)+"\u2026"+b.slice(d)),a.$(this.getEl().firstChild).attr("href",this.url).text(b))}}),a.PluginManager.add("wplink",function(b){var c;b.addCommand("WP_Link",function(){window.wpLink&&window.wpLink.open(b.id)}),b.addShortcut("Alt+Shift+A","","WP_Link"),b.addShortcut("Meta+K","","WP_Link"),b.addButton("link",{icon:"link",tooltip:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]"}),b.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink"}),b.addMenuItem("link",{icon:"link",text:"Insert/edit link",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0}),b.on("pastepreprocess",function(c){var d=c.content,e=/^(?:https?:)?\/\/\S+$/i;b.selection.isCollapsed()||e.test(b.selection.getContent())||(d=d.replace(/<[^>]+>/g,""),d=a.trim(d),e.test(d)&&(b.execCommand("mceInsertLink",!1,{href:b.dom.decode(d)}),c.preventDefault()))}),b.addButton("wp_link_preview",{type:"WPLinkPreview",onPostRender:function(){var a=this;b.on("wptoolbar",function(d){var e,f,g=b.dom.getParent(d.element,"a");g&&(e=b.$(g),f=e.attr("href"),f&&!e.find("img").length&&(a.setURL(f),d.element=g,d.toolbar=c))})}}),b.addButton("wp_link_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",cmd:"WP_Link"}),b.addButton("wp_link_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",cmd:"unlink"}),b.on("preinit",function(){b.wp&&b.wp._createToolbar&&(c=b.wp._createToolbar(["wp_link_preview","wp_link_edit","wp_link_remove"],!0))})})}(window.tinymce); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.js b/wp-includes/js/tinymce/plugins/wpview/plugin.js index 44481941ae..9db30087e9 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -713,10 +713,12 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { } ); editor.once( 'preinit', function() { - toolbar = editor.wp._createToolbar( [ - 'wp_view_edit', - 'wp_view_remove' - ] ); + if ( editor.wp && editor.wp._createToolbar ) { + toolbar = editor.wp._createToolbar( [ + 'wp_view_edit', + 'wp_view_remove' + ] ); + } } ); editor.on( 'wptoolbar', function( event ) { diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js index 86bdc6e312..e8d508922e 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(a){a.stopPropagation()}function e(b,c){var d=b?"before":"after",e=b?0:1;i(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function f(b,c,d){var f=a.dom,g=f.create("p");w.ie&&w.ie<11||(g.innerHTML='
'),c?b.parentNode.insertBefore(g,b):f.insertAfter(g,b),i(),c&&d===x.ENTER?e(c,b):a.selection.setCursorLocation(g,0),a.nodeChanged()}function g(b){a.undoManager.transact(function(){f(b),wp.mce.views.remove(a,b)})}function h(b){var c,e=a.dom;b&&(b!==n&&(a.getBody().focus(),i(),n=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},wp.mce.views.getText(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",d),e.bind(n,"beforedeactivate focusin focusout",d),C?a.selection.select(c):a.selection.select(c,!0)),a.nodeChanged(),a.fire("wpview-selected",b))}function i(){var b,c=a.dom;n&&(b=a.dom.select(".wpview-clipboard",n)[0],c.unbind(b),c.remove(b),c.unbind(n,"beforedeactivate focusin focusout click mouseup",d),c.setAttrib(n,"data-mce-selected",null)),n=null}function j(a,b){return"

"+window.decodeURIComponent(b)+"

"}function k(a){return a.replace(/]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g,j).replace(/

]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j)}function l(a){v("div[data-wpview-text], p[data-wpview-marker]",a).each(function(a,b){b.innerHTML="."})}function m(a){return 47>=a&&a!==x.SPACEBAR&&a!==x.ENTER&&a!==x.DELETE&&a!==x.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var n,o,p,q,r,s,t,u,v=a.$,w=tinymce.Env,x=tinymce.util.VK,y=tinymce.dom.TreeWalker,z=!1,A=!0,B=function(){return!1},C=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.level.content&&(a.level.content=k(a.level.content))}),a.on("BeforeSetContent",function(b){var c;if(b.selection||wp.mce.views.unbind(),b.content){if(!b.load&&(n&&g(n),c=a.selection.getNode(),c&&c!==a.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(b.content))){if(c=a.dom.getParent(c,"p"),!c||!/^[\s\uFEFF\u00A0]*$/.test(v(c).text()||""))return;c.innerHTML=""}b.content=wp.mce.views.setMarkers(b.content)}}),a.on("pastePreProcess",function(a){var b=a.content;b&&(b=tinymce.trim(b.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(b)&&(a.content=b))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,f,g,h=c.clientX,i=c.clientY,j=a.getBody(),k=j.getBoundingClientRect(),l=j.firstChild,m=j.lastChild;l&&m&&(d=l.getBoundingClientRect(),f=m.getBoundingClientRect(),if.bottom&&(g=b(m))?(e(!1,g),c.preventDefault()):(hk.right)&&tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return i=b.top&&i<=b.bottom?(hk.right&&(e(!1,a),c.preventDefault()),!1):void 0}))}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new y(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(a){var d=b(a.target);return A=!1,d?(a.stopImmediatePropagation(),a.preventDefault(),"touchend"===a.type&&c?c=!1:h(d),!1):(("touchend"===a.type||"mousedown"===a.type)&&i(),void("touchend"===a.type&&c&&(c=!1)))},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]})}),a.on("PreProcess",function(a){l(a.node)},!0),a.on("hide",function(){wp.mce.views.unbind(),i(),l()}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/

]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g,j).replace(/

]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j))}),a.on("keydown",function(c){var d,j,k,l,o,q,r,s=c.keyCode,t=a.dom,u=a.selection;if(n){if((c.metaKey||c.ctrlKey)&&s!==x.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(z=n));if(j=b(u.getNode()),j!==n)return void i();s===x.LEFT?(e(!0,j),c.preventDefault()):s===x.UP?(j.previousSibling?b(j.previousSibling)?e(!0,j.previousSibling):(i(),u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):s===x.RIGHT?(e(!1,j),c.preventDefault()):s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!1,j.nextSibling):(i(),u.setCursorLocation(j.nextSibling,0)):e(!1,j),c.preventDefault()):m(s)||(g(n),(s===x.ENTER||s===x.DELETE||s===x.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),p=d,j=b(d),u.isCollapsed()||(o=u.getRng(),(j=b(o.endContainer))?(q=o.cloneRange(),u.select(j.previousSibling,!0),u.collapse(),r=u.getRng(),q.setEnd(r.endContainer,r.endOffset),u.setRng(q)):(j=b(o.startContainer))&&(q=o.cloneRange(),q.setStart(j.nextSibling,0),u.setRng(q))),!j)return void(c.keyCode===x.BACKSPACE&&(a.dom.isEmpty(d)?(j=b(d.previousSibling))&&(e(!1,j),a.dom.remove(d),c.preventDefault()):(o=u.getRng())&&0===o.startOffset&&0===o.endOffset&&(j=b(d.previousSibling))&&(e(!1,j),c.preventDefault())));if(!(k=t.hasClass(j,"wpview-selection-before"))&&!(l=t.hasClass(j,"wpview-selection-after")))return;if(m(s))return;l&&s===x.UP||k&&s===x.BACKSPACE?(j.previousSibling?b(j.previousSibling)?e(!1,j.previousSibling):t.isEmpty(j.previousSibling)&&s===x.BACKSPACE?t.remove(j.previousSibling):(u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):!l||s!==x.DOWN&&s!==x.RIGHT?!k||s!==x.UP&&s!==x.LEFT?k&&s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!0,j.nextSibling):u.setCursorLocation(j.nextSibling,0):e(!1,j),c.preventDefault()):l&&s===x.LEFT||k&&s===x.RIGHT?(h(j),c.preventDefault()):l&&s===x.BACKSPACE?(g(j),c.preventDefault()):l?f(j):k&&f(j,!0,s):(j.previousSibling&&(b(j.previousSibling)?e(s===x.UP,j.previousSibling):(u.select(j.previousSibling,!0),u.collapse())),c.preventDefault()):(j.nextSibling&&(b(j.nextSibling)?e(s===x.RIGHT,j.nextSibling):u.setCursorLocation(j.nextSibling,0)),c.preventDefault()),s===x.ENTER&&c.preventDefault()}}),a.on("keyup",function(){z&&(g(z),z=!1)}),a.on("focus",function(){var c;r=!0,a.dom.addClass(a.getBody(),"has-focus"),A&&(c=b(a.getBody().firstChild))&&e(!0,c),A=!1}),a.on("blur",function(){r=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var f=a.dom,g=a.dom.select(".wpview-wrap"),h=d.element.className,j=b(d.element),k=p;if(p=!1,clearInterval(o),tinymce.each(g,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),r&&j)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||q||(i(),q++,e(!0,j));else{if(q=0,i(),k===j.previousSibling)return void e(!0,j);if(k===j.nextSibling)return void e(!1,j);f.addClass(j,h),o=setInterval(function(){f.hasClass(j,"wpview-cursor-hide")?f.removeClass(j,"wpview-cursor-hide"):f.addClass(j,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((t="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(f(c,t),s=c)}),a.on("ExecCommand",function(){var b,c;n&&(b=n,i(),h(b)),s&&(c=s[t?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),e(t,s)),s=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),a.addButton("wp_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){n&&wp.mce.views.edit(a,n)}}),a.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){n&&g(n)}}),a.once("preinit",function(){u=a.wp._createToolbar(["wp_view_edit","wp_view_remove"])}),a.on("wptoolbar",function(a){n&&(a.element=n,a.toolbar=u)}),a.wp=a.wp||{},a.wp.getView=b,a.wp.setViewCursor=e,{getView:b}):{getView:B}}); \ No newline at end of file +tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(a){a.stopPropagation()}function e(b,c){var d=b?"before":"after",e=b?0:1;i(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function f(b,c,d){var f=a.dom,g=f.create("p");w.ie&&w.ie<11||(g.innerHTML='
'),c?b.parentNode.insertBefore(g,b):f.insertAfter(g,b),i(),c&&d===x.ENTER?e(c,b):a.selection.setCursorLocation(g,0),a.nodeChanged()}function g(b){a.undoManager.transact(function(){f(b),wp.mce.views.remove(a,b)})}function h(b){var c,e=a.dom;b&&(b!==n&&(a.getBody().focus(),i(),n=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},wp.mce.views.getText(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",d),e.bind(n,"beforedeactivate focusin focusout",d),C?a.selection.select(c):a.selection.select(c,!0)),a.nodeChanged(),a.fire("wpview-selected",b))}function i(){var b,c=a.dom;n&&(b=a.dom.select(".wpview-clipboard",n)[0],c.unbind(b),c.remove(b),c.unbind(n,"beforedeactivate focusin focusout click mouseup",d),c.setAttrib(n,"data-mce-selected",null)),n=null}function j(a,b){return"

"+window.decodeURIComponent(b)+"

"}function k(a){return a.replace(/]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g,j).replace(/

]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j)}function l(a){v("div[data-wpview-text], p[data-wpview-marker]",a).each(function(a,b){b.innerHTML="."})}function m(a){return 47>=a&&a!==x.SPACEBAR&&a!==x.ENTER&&a!==x.DELETE&&a!==x.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var n,o,p,q,r,s,t,u,v=a.$,w=tinymce.Env,x=tinymce.util.VK,y=tinymce.dom.TreeWalker,z=!1,A=!0,B=function(){return!1},C=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.level.content&&(a.level.content=k(a.level.content))}),a.on("BeforeSetContent",function(b){var c;if(b.selection||wp.mce.views.unbind(),b.content){if(!b.load&&(n&&g(n),c=a.selection.getNode(),c&&c!==a.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(b.content))){if(c=a.dom.getParent(c,"p"),!c||!/^[\s\uFEFF\u00A0]*$/.test(v(c).text()||""))return;c.innerHTML=""}b.content=wp.mce.views.setMarkers(b.content)}}),a.on("pastePreProcess",function(a){var b=a.content;b&&(b=tinymce.trim(b.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(b)&&(a.content=b))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,f,g,h=c.clientX,i=c.clientY,j=a.getBody(),k=j.getBoundingClientRect(),l=j.firstChild,m=j.lastChild;l&&m&&(d=l.getBoundingClientRect(),f=m.getBoundingClientRect(),if.bottom&&(g=b(m))?(e(!1,g),c.preventDefault()):(hk.right)&&tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return i=b.top&&i<=b.bottom?(hk.right&&(e(!1,a),c.preventDefault()),!1):void 0}))}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new y(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(a){var d=b(a.target);return A=!1,d?(a.stopImmediatePropagation(),a.preventDefault(),"touchend"===a.type&&c?c=!1:h(d),!1):(("touchend"===a.type||"mousedown"===a.type)&&i(),void("touchend"===a.type&&c&&(c=!1)))},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]})}),a.on("PreProcess",function(a){l(a.node)},!0),a.on("hide",function(){wp.mce.views.unbind(),i(),l()}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/

]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g,j).replace(/

]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j))}),a.on("keydown",function(c){var d,j,k,l,o,q,r,s=c.keyCode,t=a.dom,u=a.selection;if(n){if((c.metaKey||c.ctrlKey)&&s!==x.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(z=n));if(j=b(u.getNode()),j!==n)return void i();s===x.LEFT?(e(!0,j),c.preventDefault()):s===x.UP?(j.previousSibling?b(j.previousSibling)?e(!0,j.previousSibling):(i(),u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):s===x.RIGHT?(e(!1,j),c.preventDefault()):s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!1,j.nextSibling):(i(),u.setCursorLocation(j.nextSibling,0)):e(!1,j),c.preventDefault()):m(s)||(g(n),(s===x.ENTER||s===x.DELETE||s===x.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),p=d,j=b(d),u.isCollapsed()||(o=u.getRng(),(j=b(o.endContainer))?(q=o.cloneRange(),u.select(j.previousSibling,!0),u.collapse(),r=u.getRng(),q.setEnd(r.endContainer,r.endOffset),u.setRng(q)):(j=b(o.startContainer))&&(q=o.cloneRange(),q.setStart(j.nextSibling,0),u.setRng(q))),!j)return void(c.keyCode===x.BACKSPACE&&(a.dom.isEmpty(d)?(j=b(d.previousSibling))&&(e(!1,j),a.dom.remove(d),c.preventDefault()):(o=u.getRng())&&0===o.startOffset&&0===o.endOffset&&(j=b(d.previousSibling))&&(e(!1,j),c.preventDefault())));if(!(k=t.hasClass(j,"wpview-selection-before"))&&!(l=t.hasClass(j,"wpview-selection-after")))return;if(m(s))return;l&&s===x.UP||k&&s===x.BACKSPACE?(j.previousSibling?b(j.previousSibling)?e(!1,j.previousSibling):t.isEmpty(j.previousSibling)&&s===x.BACKSPACE?t.remove(j.previousSibling):(u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):!l||s!==x.DOWN&&s!==x.RIGHT?!k||s!==x.UP&&s!==x.LEFT?k&&s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!0,j.nextSibling):u.setCursorLocation(j.nextSibling,0):e(!1,j),c.preventDefault()):l&&s===x.LEFT||k&&s===x.RIGHT?(h(j),c.preventDefault()):l&&s===x.BACKSPACE?(g(j),c.preventDefault()):l?f(j):k&&f(j,!0,s):(j.previousSibling&&(b(j.previousSibling)?e(s===x.UP,j.previousSibling):(u.select(j.previousSibling,!0),u.collapse())),c.preventDefault()):(j.nextSibling&&(b(j.nextSibling)?e(s===x.RIGHT,j.nextSibling):u.setCursorLocation(j.nextSibling,0)),c.preventDefault()),s===x.ENTER&&c.preventDefault()}}),a.on("keyup",function(){z&&(g(z),z=!1)}),a.on("focus",function(){var c;r=!0,a.dom.addClass(a.getBody(),"has-focus"),A&&(c=b(a.getBody().firstChild))&&e(!0,c),A=!1}),a.on("blur",function(){r=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var f=a.dom,g=a.dom.select(".wpview-wrap"),h=d.element.className,j=b(d.element),k=p;if(p=!1,clearInterval(o),tinymce.each(g,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),r&&j)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||q||(i(),q++,e(!0,j));else{if(q=0,i(),k===j.previousSibling)return void e(!0,j);if(k===j.nextSibling)return void e(!1,j);f.addClass(j,h),o=setInterval(function(){f.hasClass(j,"wpview-cursor-hide")?f.removeClass(j,"wpview-cursor-hide"):f.addClass(j,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((t="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(f(c,t),s=c)}),a.on("ExecCommand",function(){var b,c;n&&(b=n,i(),h(b)),s&&(c=s[t?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),e(t,s)),s=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),a.addButton("wp_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){n&&wp.mce.views.edit(a,n)}}),a.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){n&&g(n)}}),a.once("preinit",function(){a.wp&&a.wp._createToolbar&&(u=a.wp._createToolbar(["wp_view_edit","wp_view_remove"]))}),a.on("wptoolbar",function(a){n&&(a.element=n,a.toolbar=u)}),a.wp=a.wp||{},a.wp.getView=b,a.wp.setViewCursor=e,{getView:b}):{getView:B}}); \ 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 1bb6ed9643ff109c0ec963a394728e03061dc0df..403adede06c49a4ff638379a6579f6f0aeeedf8f 100644 GIT binary patch delta 6063 zcmV;g7f|TY`v~Ft2!MnEv;tBlf7s;kmgBP4Y@0bQbwj#;p{Lo9pBFkwn%JB~MQ2W$ zh#lQkQ(3)NL20REnYG*U8oj3`wJCy;u1O6z;<2g$fwYN6v=I_7JQtN4_9trY(<-QL zX}vEmPIpE>Y}#4t*9w?Cso2~%I>3cretRSONvdSPS^TM&^Dak;e%di9e-S5qRVJLK z&GutiISW6`lAI4hgov$;+TOOlD9JJmQYeveMVDPLtu{$My&=Ad66 zhm$pJE-(;*d4`y*;uptWiahRJOP7RW1nxU5|I5IP@{QQ2e z!Bo=N-ey|RP1hV}d6-FgyG|z#y*NnCEChnCW72<#fxu`GZ&4=jr;M!x^*wYt6C*Um zpPA*jJVH!Y@A?|C6X>QxH?n?bNc@&vo;HOs3>QZ-7*O8IFLB&MfBJ%MJ7f0X8Gnk> z>hh@jpVM18ZTd!J8rUkVM<;gsjmoVt@%Cf7x7~F8VSK|OQ<+~+ZEhCKR+u}~b5kRn zaNJcY!|k%+oSmT9Y)J3`h?|YaZ2Fy9oc<)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=^y1w~_sBlSR{YN|vSi(M{g|xQzoNxqQ*RBlQ zf7R)d`Su@PefLgn#-rxVSn~byy6cZ>I8$jo4OTb|3Q>cb@CaKvW z)8Y*_u+N*^aA7y_9^?Cp_L+s#NXU<(CsLDu{O@tnNtax$2pg%? zdi7o$87X6J&YU{wP#8H&F0pD!T}}qM16by_@Ue)8Vv%A=s@}UkuJ@8 zJK1b*^n)4M&)H&5nzoo#i9uO=S#ND+Fe)21tN++WwKt{}xu^Faz4^<=g~+q={L5?o zhIeE$HlMn09as0QPua3|?pS87f6yUow$zq8@E2K^<}RIAL39JxkWmQSCoJvi zh=ciTCId}P;a{D?E$eaQ>frr`p|?im&&)wHXJefZjn4e`rNvQ51$TddL-hX$SRhp1 zZtC&7MS8M$D2^$u_l^_}!gC3X;Y!U*^9EXDOo~|mLDY$98zHuxrWd%@e?JhE)N0pM zvfP5uX|f&g zl4d{Y%T)Ew??%-2N!mL1B$eT#%8g*l@3YSnGK^&UH>?9+8mE)2LPf4y(FL$wu(uP*K=@8e@;9&U)F>#Nkhm8zl`dC6=qrbl;%v9OhqNY>J8cr|h_8dywk}GmrY|L^WJ_Y38C!r%4Bj7E#ACOP_ zt9a|YvH^OD4aw*NjZ<97s8%sASf6f@;fi7O%XPM^yJ?syUCfl{e|5l$swLOCyjXR; z$`pH%XU(H`1&ONQ`?&BL_KhkF%q7c!%o1g-=y*U+?R~A;azCqubG89Pto?w|c4dLO zZYNpQpG%liV)ngqpgqPWu4s^hs4Oiu3pMdXQ>g}ESv2vVLzbOtsl8(D+4Us}r;V7l z-1L7APFG3U?;k)WJzZ}{Cbh<*+P{avL`Bo9Z8N7~i5R-x;`2>&_b>Pxr1H3wM>)&m ZBD_=Y0mdDfhv#tr{{IWf!ma7P1^@w-9V`F< diff --git a/wp-includes/version.php b/wp-includes/version.php index 8050a8bc6b..0f7e8314de 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-33727'; +$wp_version = '4.4-alpha-33728'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.