0
我已經嘗試了幾個基於iframe的彈出式插件與WordPress的Nextgen畫廊。它總是從frame_event_publisher.js文件中生成一個js錯誤。NextGen Gallery Iframe插件問題
反正有阻止在另一個插件中加載此文件嗎?
我已經嘗試了幾個基於iframe的彈出式插件與WordPress的Nextgen畫廊。它總是從frame_event_publisher.js文件中生成一個js錯誤。NextGen Gallery Iframe插件問題
反正有阻止在另一個插件中加載此文件嗎?
解決這個問題的一種方法是強制排隊腳本。您必須添加一個條件才能在需要時纔將其出列,因爲NextGEN可能需要此腳本才能工作。
add_action('wp_print_scripts', 'dequeue_frame_event_publisher', 100);
function dequeue_frame_event_publisher() {
if (is_admin()) { // Add another condition to check if in an iframe.
wp_dequeue_script('frame_event_publisher');
}
}
你得到的錯誤是什麼? –
我sm得到TypeError:this.find_parent(...)未定義this.find_parent(child).register_child(child.Frame_Event_Publisher); –
我可以確認這仍在發生。要複製,只需在iframe中打開任何管理頁面,就會出現錯誤。 –