【发布时间】:2012-07-06 16:31:03
【问题描述】:
我有一个主题,它有一个用于编辑器模式的注册短代码按钮。 当您单击它时,会打开一个包含不同选项/简码 (popup.php) 的弹出窗口。
一般来说这很好用,但碰巧在某些域上,弹出窗口不显示短代码选项,但它显示了我的主题/网站的前端。
希望有人遇到过类似的问题来帮忙,因为我真的不知道如何解决这个问题。
可能是域的重定向问题???
通过点击按钮打开弹出窗口的代码。
(function() {
tinymce.create('tinymce.plugins.popup', {
init : function(ed, url) {
// Register commands
ed.addCommand('mcepopup', function() {
ed.windowManager.open({
file : url + '/popup.php', // file that contains HTML for our modal window
width : 700 + parseInt(ed.getLang('button.delta_width', 0)), // size of our window
height : 700 + parseInt(ed.getLang('button.delta_height', 0)), // size of our window
inline : 1
}, {
plugin_url : url
});
});
// Register buttons
ed.addButton('popup', {title : 'Insert Columns', cmd : 'mcepopup', image: url + '/images/button.png' });
}
});
// Register plugin
// first parameter is the button ID and must match ID elsewhere
// second parameter must match the first parameter of the tinymce.create() function above
tinymce.PluginManager.add('popup', tinymce.plugins.popup);
})();
【问题讨论】:
标签: wordpress redirect popup frontend shortcode