• Hi,

    An icon for this plugin is appearing in the editor for all users when they are using the forum. An icon called “Widget Shortcode” from this plugin. Is it possible to remove this access from regular users?

Viewing 1 replies (of 1 total)
  • Plugin Author shazdeh

    (@shazdeh)

    Hi!
    Sorry for delay in response. You can use this snippet:

    
    <?php
    
    function custom_disable_widget_shortcode_tinymce() {
    	if( class_exists( 'Widget_Shortcode' ) && ! ( is_user_logged_in() && current_user_can( 'manage_options' ) ) )
    		remove_filter( 'mce_external_plugins', array( Widget_Shortcode::get_instance(), 'mce_external_plugins' ) );
    }
    add_action( 'init', 'custom_disable_widget_shortcode_tinymce' );
    

    And this will disable the shortcode generator in the plugin for non-administrators. You can add it to your theme’s functions.php file, or your functionality plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Widget icon appearing in the editor for all users?’ is closed to new replies.