Disable Vibe Shortcodes for Instructors in the front end.

Add following code in Child theme – functions.php

 

For Vibe Shortcodes 3.9.1 + version , releasing 15th Feb’2019

`add_action(‘init’,function(){

if(class_exists(‘VibeShortcodes’) && current_user_can(‘edit_posts’) && !current_user_can(‘manage_options’)){
$s = VibeShortcodes::init();
remove_filter(‘mce_external_plugins’,array($s,’add_rich_plugins’));
remove_filter(‘mce_buttons’,array($s,’register_rich_buttons’));
//add_filter(‘wplms_vibe_shortcodes’,function($return){return 0;});
}
},11);`

 

 

for 3.9 versions :

`add_action(‘init’,function(){

if(class_exists(‘VibeShortcodes’) && current_user_can(‘edit_posts’) && !current_user_can(‘manage_options’)){
remove_filter(‘mce_external_plugins’,array(‘VibeShortcodes’,’add_rich_plugins’));
remove_filter(‘mce_buttons’,array(‘VibeShortcodes’,’register_rich_buttons’));
}

add_filter(‘wplms_vibe_shortcodes’,function($return){return 0;});
});

`

Leave a Reply

Your email address will not be published. Required fields are marked *