-
Author
-
February 19, 2017 at 16:20 #153424alexliiParticipant
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.
thanks
Alex
February 21, 2017 at 00:50 #153606LauraModeratorHello, 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 solutionLaura 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 🙂
February 22, 2017 at 16:44 #153899RaduModeratorHi,
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 solutionFebruary 22, 2017 at 17:37 #153901alexliiParticipantthanks!
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
February 22, 2017 at 19:12 #153915RaduModeratorHi,
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 CODEif( !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 solutionFebruary 23, 2017 at 20:57 #154063alexliiParticipantThanks 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:
Alex
February 24, 2017 at 14:15 #154091RaduModeratorYou’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 -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.