편집기 모드에 등록 된 단축 코드 버튼이있는 테마가 있습니다. 클릭하면 다른 옵션/단축 코드 (popup.php)로 팝업이 열립니다.Wordpress shortcode popup에는 프론트 엔드가 포함되어 있습니다.
일반적으로이 방법은 정상적으로 작동하지만 일부 도메인에서는 팝업에 단축 코드 옵션이 표시되지 않지만 내 테마/사이트의 프론트 엔드는 표시됩니다.
이 문제를 해결할 수있는 방법을 모르기 때문에 누군가 비슷한 문제에 직면하기를 바랍니다.
아마도 도메인의 리디렉션 문제입니까?
버튼을 클릭하여 팝업을 열려면 코드.
(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);
)();