<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[27030] trunk/src/wp-includes: TinyMCE: fix the compat3x plugin appending 'en.' to button titles.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/27030">27030</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2014-01-25 01:20:04 +0000 (Sat, 25 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>TinyMCE: fix the compat3x plugin appending 'en.' to button titles. Set charset to UTF-8 in html_entity_decode() for translated strings. See <a href="http://core.trac.wordpress.org/ticket/24067">#24067</a>, see <a href="http://core.trac.wordpress.org/ticket/26875">#26875</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpeditorphp">trunk/src/wp-includes/class-wp-editor.php</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginscompat3xpluginjs">trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js</a></li>
<li><a href="#trunksrcwpincludesjstinymcepluginscompat3xpluginminjs">trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js</a></li>
<li><a href="#trunksrcwpincludesversionphp">trunk/src/wp-includes/version.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/class-wp-editor.php (27029 => 27030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/class-wp-editor.php 2014-01-24 19:05:15 UTC (rev 27029)
+++ trunk/src/wp-includes/class-wp-editor.php 2014-01-25 01:20:04 UTC (rev 27030)
</span><span class="lines">@@ -691,7 +691,7 @@
</span><span class="cx">
</span><span class="cx"> foreach ( $mce_translation as $key => $value ) {
</span><span class="cx"> if ( strpos( $value, '&' ) !== false )
</span><del>- $mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES );
</del><ins>+ $mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" .
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginscompat3xpluginjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js (27029 => 27030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js 2014-01-24 19:05:15 UTC (rev 27029)
+++ trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js 2014-01-25 01:20:04 UTC (rev 27030)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">
</span><span class="cx"> var originalAddButton = editor.addButton;
</span><span class="cx"> editor.addButton = function(name, settings) {
</span><del>- var originalOnPostRender;
</del><ins>+ var originalOnPostRender, string, translated;
</ins><span class="cx">
</span><span class="cx"> function patchedPostRender() {
</span><span class="cx"> editor.controlManager.buttons[name] = this;
</span><span class="lines">@@ -226,7 +226,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ( settings.title ) {
</span><del>- settings.title = tinymce.i18n.translate((editor.settings.language || "en") + "." + settings.title);
</del><ins>+ string = (editor.settings.language || "en") + "." + settings.title;
+ translated = tinymce.i18n.translate(string);
+
+ if ( string !== translated ) {
+ settings.title = translated;
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return originalAddButton.call(this, name, settings);
</span></span></pre></div>
<a id="trunksrcwpincludesjstinymcepluginscompat3xpluginminjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js (27029 => 27030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js 2014-01-24 19:05:15 UTC (rev 27029)
+++ trunk/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js 2014-01-25 01:20:04 UTC (rev 27030)
</span><span class="lines">@@ -1 +1 @@
</span><del>-!function(a){function b(a){!f&&window&&window.console&&(f=!0,console.log("Deprecated TinyMCE API call: "+a))}function c(a,c,d,e){return a=a||this,c?(this.add=function(f,g){function h(b){var h=[];if("string"==typeof d&&(d=d.split(" ")),d&&"function"!=typeof d)for(var i=0;i<d.length;i++)h.push(b[d[i]]);("function"!=typeof d||(h=d(c,b,a)))&&(d||(h=[b]),h.unshift(e||a),f.apply(g||e||a,h)===!1&&b.stopImmediatePropagation())}return b("<target>.on"+c+".add(..)"),a.on(c,h),h},this.addToTop=this.add,this.remove=function(b){return a.off(c,b)},this.dispatch=function(){return a.fire(c),!0},void 0):(this.add=this.addToTop=this.remove=this.dispatch=function(){},void 0)}function d(){}function e(e){function f(b,d){a.each(b.split(" "),function(a){e["on"+a]=new c(e,a,d)})}function g(a,b,c){return[b.level,c]}function h(a){return function
(b,c){return!c.selection&&!a||c.selection==a?[c]:void 0}}function i(){function c(){return i()}var d={},e="add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update";return b("editor.controlManager.*"),a.each(e.split(" "),function(a){d[a]=c}),d}if(!e.controlManager){e.controlManager={buttons:{},setDisabled:function(a,c){b("controlManager.setDisabled(..)"),this.buttons[a]&&this.buttons[a].disabled(c)},setActive:function(a,c){b("controlManager.setActive(..)"),this.buttons[a]&&this.buttons[a].active(c)},onAdd:new c,onPostRender:new c,add:function(a){return a},createButton:i,createColorSplitButton:i,createControl:i,createDropMenu:i,creat
eListBox:i,createMenuButton:i,createSeparator:i,createSplitButton:i,createToolbar:i,createToolbarGroup:i,destroy:d,get:d,setControlType:i},f("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),f("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),f("BeforeExecCommand ExecCommand","command ui value args"),f("PreProcess PostProcess LoadContent SaveContent Change"),f("BeforeSetContent BeforeGetContent SetContent GetContent",h(!1)),f("SetProgressState","state time"),f("VisualAid","element hasVisual"),f("Undo Redo",g),f("NodeChange",function(a,b){return[e.controlManager,b.element,e.selection.isCollapsed(),b]});var j=e.addButton;e.addButton=function(b,c){function d(){return e.controlManager.buttons[b]=this,f?f.call(this):void 0}var f;for(var g in c)"onpostrender"===g.toLowerCase()&am
p;&(f=c[g],c.onPostRender=d);return f||(c.onPostRender=d),c.title&&(c.title=a.i18n.translate((e.settings.language||"en")+"."+c.title)),j.call(this,b,c)},e.on("init",function(){var a=e.undoManager,b=e.selection;a.onUndo=new c(e,"Undo",g,null,a),a.onRedo=new c(e,"Redo",g,null,a),a.onBeforeAdd=new c(e,"BeforeAddUndo",null,a),a.onAdd=new c(e,"AddUndo",null,a),b.onBeforeGetContent=new c(e,"BeforeGetContent",h(!0),b),b.onGetContent=new c(e,"GetContent",h(!0),b),b.onBeforeSetContent=new c(e,"BeforeSetContent",h(!0),b),b.onSetContent=new c(e,"SetContent",h(!0),b)}),e.on("BeforeRenderUI",function(){var d=e.windowManager;d.onOpen=new c,d.onClose=new c,d.createInstance=function(c,d,e,f,g,h){b("windowManager.createInstance(..)");var i=a.resolve(c);return new i(d,e,f,g,h)}})}}var f;a.util.Dispatcher=c,a.onBeforeUnload=new c(a,"BeforeUnload"),a.on
AddEditor=new c(a,"AddEditor","editor"),a.onRemoveEditor=new c(a,"RemoveEditor","editor"),a.util.Cookie={get:d,getHash:d,remove:d,set:d,setHash:d},a.on("SetupEditor",e),a.PluginManager.add("compat3x",e),a.addI18n=function(b,c){var d=a.util.I18n,e=a.each;return"string"==typeof b&&-1===b.indexOf(".")?(d.add(b,c),void 0):(a.is(b,"string")?e(c,function(a,c){d.data[b+"."+c]=a}):e(b,function(a,b){e(a,function(a,c){e(a,function(a,e){"common"===c?d.data[b+"."+e]=a:d.data[b+"."+c+"."+e]=a})})}),void 0)}}(tinymce);
</del><span class="cx">\ No newline at end of file
</span><ins>+!function(a){function b(a){!f&&window&&window.console&&(f=!0,console.log("Deprecated TinyMCE API call: "+a))}function c(a,c,d,e){return a=a||this,c?(this.add=function(f,g){function h(b){var h=[];if("string"==typeof d&&(d=d.split(" ")),d&&"function"!=typeof d)for(var i=0;i<d.length;i++)h.push(b[d[i]]);("function"!=typeof d||(h=d(c,b,a)))&&(d||(h=[b]),h.unshift(e||a),f.apply(g||e||a,h)===!1&&b.stopImmediatePropagation())}return b("<target>.on"+c+".add(..)"),a.on(c,h),h},this.addToTop=this.add,this.remove=function(b){return a.off(c,b)},this.dispatch=function(){return a.fire(c),!0},void 0):(this.add=this.addToTop=this.remove=this.dispatch=function(){},void 0)}function d(){}function e(e){function f(b,d){a.each(b.split(" "),function(a){e["on"+a]=new c(e,a,d)})}function g(a,b,c){return[b.level,c]}function h(a){return function
(b,c){return!c.selection&&!a||c.selection==a?[c]:void 0}}function i(){function c(){return i()}var d={},e="add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update";return b("editor.controlManager.*"),a.each(e.split(" "),function(a){d[a]=c}),d}if(!e.controlManager){e.controlManager={buttons:{},setDisabled:function(a,c){b("controlManager.setDisabled(..)"),this.buttons[a]&&this.buttons[a].disabled(c)},setActive:function(a,c){b("controlManager.setActive(..)"),this.buttons[a]&&this.buttons[a].active(c)},onAdd:new c,onPostRender:new c,add:function(a){return a},createButton:i,createColorSplitButton:i,createControl:i,createDropMenu:i,creat
eListBox:i,createMenuButton:i,createSeparator:i,createSplitButton:i,createToolbar:i,createToolbarGroup:i,destroy:d,get:d,setControlType:i},f("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),f("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),f("BeforeExecCommand ExecCommand","command ui value args"),f("PreProcess PostProcess LoadContent SaveContent Change"),f("BeforeSetContent BeforeGetContent SetContent GetContent",h(!1)),f("SetProgressState","state time"),f("VisualAid","element hasVisual"),f("Undo Redo",g),f("NodeChange",function(a,b){return[e.controlManager,b.element,e.selection.isCollapsed(),b]});var j=e.addButton;e.addButton=function(b,c){function d(){return e.controlManager.buttons[b]=this,f?f.call(this):void 0}var f,g,h;for(var i in c)"onpostrender"===i.toLowerCase(
)&&(f=c[i],c.onPostRender=d);return f||(c.onPostRender=d),c.title&&(g=(e.settings.language||"en")+"."+c.title,h=a.i18n.translate(g),g!==h&&(c.title=h)),j.call(this,b,c)},e.on("init",function(){var a=e.undoManager,b=e.selection;a.onUndo=new c(e,"Undo",g,null,a),a.onRedo=new c(e,"Redo",g,null,a),a.onBeforeAdd=new c(e,"BeforeAddUndo",null,a),a.onAdd=new c(e,"AddUndo",null,a),b.onBeforeGetContent=new c(e,"BeforeGetContent",h(!0),b),b.onGetContent=new c(e,"GetContent",h(!0),b),b.onBeforeSetContent=new c(e,"BeforeSetContent",h(!0),b),b.onSetContent=new c(e,"SetContent",h(!0),b)}),e.on("BeforeRenderUI",function(){var d=e.windowManager;d.onOpen=new c,d.onClose=new c,d.createInstance=function(c,d,e,f,g,h){b("windowManager.createInstance(..)");var i=a.resolve(c);return new i(d,e,f,g,h)}})}}var f;a.util.Dispatcher=c,a.onBeforeUnload=new c(a,&
quot;BeforeUnload"),a.onAddEditor=new c(a,"AddEditor","editor"),a.onRemoveEditor=new c(a,"RemoveEditor","editor"),a.util.Cookie={get:d,getHash:d,remove:d,set:d,setHash:d},a.on("SetupEditor",e),a.PluginManager.add("compat3x",e),a.addI18n=function(b,c){var d=a.util.I18n,e=a.each;return"string"==typeof b&&-1===b.indexOf(".")?(d.add(b,c),void 0):(a.is(b,"string")?e(c,function(a,c){d.data[b+"."+c]=a}):e(b,function(a,b){e(a,function(a,c){e(a,function(a,e){"common"===c?d.data[b+"."+e]=a:d.data[b+"."+c+"."+e]=a})})}),void 0)}}(tinymce);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunksrcwpincludesversionphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/version.php (27029 => 27030)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/version.php 2014-01-24 19:05:15 UTC (rev 27029)
+++ trunk/src/wp-includes/version.php 2014-01-25 01:20:04 UTC (rev 27030)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @global string $tinymce_version
</span><span class="cx"> */
</span><del>-$tinymce_version = '4012-20140121';
</del><ins>+$tinymce_version = '4012-20140124';
</ins><span class="cx">
</span><span class="cx"> /**
</span><span class="cx"> * Holds the required PHP version
</span></span></pre>
</div>
</div>
</body>
</html>