This topic has 6 replies, 3 voices, and was last updated 7 years by Radu.

  • Author
  • #153424
     alexlii
    Participant

    I am using a great plugin of Anspress, which provide a frontend UI with WordPress rich content editor, the problem is that the Kleo shortcode button will show up for subscriber role, how to disable it?

    Please check screenshot here.

    http://prntscr.com/eaotyc

    thanks

     

    Alex

    #153606
     Laura
    Moderator

    Hello, will assign the ticket to a higher support level who can help and advise you in your query.
    Thanks! ?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #153899
     Radu
    Moderator

    Hi,

    Please follow this article link : https://archived.seventhqueen.com/kleo/article/remove-kleo-wordpress-tinymce

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #153901
     alexlii
    Participant

    thanks!

    Two questions:

    1# Into which file I should add those codes? thanks.
    2# whether it would be show up depending on user roles? for example, it will show up for administrator, but it will dispear for contributors.

    Thanks in advance!

    Alex

    #153915
     Radu
    Moderator

    Hi,

    I’ve omitted to specify in article where the function should be paste

    The code function needs to be pasted in wp-content/themes/kleo-child/functions.php

    COPY CODE
    
    if( !current_user_can('editor') || !current_user_can('administrator') ) {
        add_action( 'admin_init', 'sq_remove_admin_shortcodes_btn', 12 );
    }
    function sq_remove_admin_shortcodes_btn() {
        global $k_elements_tiny;
        remove_filter( 'mce_external_plugins', array( $k_elements_tiny, 'add_rich_plugins' ) );
        remove_filter( 'mce_buttons', array( $k_elements_tiny, 'register_rich_buttons' ) );
    }
    
    
    

    The above code function needs to be pasted in wp-content/themes/kleo-child/functions.php

    As you can see there it’s a check if it’s not administrator or is not editor the button to be removed

    For further improvement at this you should do it yourself you should figure out

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #154063
     alexlii
    Participant

    Thanks a lot.

    I will tried these code.

    By the way, it would be great if there is an option for different role capability, and please check here for your reference:

    http://prntscr.com/ecj3yj

    Alex

    #154091
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?