tinymce.PluginManager.add("wplink",function(a){a.addCommand("WP_Link",function(){"undefined"!=typeof window.wpLink&&window.wpLink.open(a.id)}),a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Alt+Shift+A",cmd:"WP_Link",onPostRender:function(){var b=this;a.on("nodechange",function(c){var d=c.element;b.disabled(a.selection.isCollapsed()&&"A"!==d.nodeName),b.active("A"===d.nodeName&&!d.name)})}}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Alt+Shift+A",cmd:"WP_Link",stateSelector:"a[href]",context:"insert",prependToContext:!0})});