[Plugin: WP TinyMCE Excerpt] Bug fix: making sure it doesn't kill "Custom Fields" plu
-
Certain admin pages, such as the popular plugin “custom fields” doesn’t have TinyMCE defined, and still runs the admin_hear-post actions (giving an error, halting the plugin). Fix, wrap it in try/catch:
function tinymce_excerpt() {
jQuery(“#excerpt”).addClass(“mceEditor”);
try {
tinyMCE.execCommand(“mceAddControl”, false, “excerpt”);
tinyMCE.onAddEditor.add(function(mgr,ed) {
if(ed.id==”excerpt”){
ed.settings.theme_advanced_buttons2 =””;
ed.settings.theme_advanced_buttons1 = “bold,italic,underline,seperator,justifyleft,justifycenter,justifyright,separator,link,unlink,seperator,pastetext,pasteword,removeformat,seperator,undo,redo,seperator,spellchecker,”;
}
});
}catch() {
// ignore
}
}https://www.ads-software.com/extend/plugins/wp-tinymce-excerpt/
- The topic ‘[Plugin: WP TinyMCE Excerpt] Bug fix: making sure it doesn't kill "Custom Fields" plu’ is closed to new replies.