[Resolved] Remove Toolset buttons from above the TinyMCE Editor

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 4 replies, has 2 voices.

Last updated by Hassan 7 years ago.

Assigned support staff: Luo Yang.

Author
Posts
#66311

How can I remove the Views icon button and CRED Insert Forms button which appear above the TinyMCE Editor in the post edit pages? Or if I could show/hide those buttons based on user roles and capabilities it'd be even better.

#66934

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi Hassan,

It's possible by create a CSS to hide Views icon button and CRED based on user roles,
Please let me know if you need assistance to do it.

Regards
Luo

#67061

Please advise me how/where do add that CSS.

#67512

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

You can try add a CSS file to your admin side, hide Views icon button and CRED based on user roles:
1) add some codes in your theme/functions.php, like this:

add_action( 'admin_init', 'my_admin_init' );
function my_admin_init() {
if(!current_user_can('manage_links'))
{
wp_enqueue_style( 'myStylesheet', get_stylesheet_directory_uri() . '/myStylesheet.css' );
}
}

more user Capability & Role: http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table

2) create a css file "myStylesheet.css", put it in your theme root folder.with following code:
#wp-content-media-buttons ul.editor_addon_wrapper, #cred-form-shortcode-button.cred-media-button
{
display:none !important;
}

#67547

Works flawlessly!

Many thanks, luo.