WP-Tiles icon indicating copy to clipboard operation
WP-Tiles copied to clipboard

Need ability to disable shortcode button

Open TrishaM opened this issue 8 years ago • 0 comments

We absolutely love this plugin, hands down the best at what it does, BUT....

We need to be able to stop non-Admin users from generating WP-Tiles shortcode in the Post Write/Edit screen - have tried every solution we could find online for removing the tinyMCE buttons added by plugins without success.

When I try to echo the button names so I can target the WPTiles shortcode button, I see an error message that is this:

**Warning: array_merge(): Argument #1 is not an array in /homepages/8/d116188896/htdocs/BAI_2016/wp-content/plugins/wp-tiles/vafpress-framework/classes/shortcodegenerator.php on line 318

Warning: implode(): Invalid arguments passed in /homepages/8/d116188896/htdocs/BAI_2016/wp-includes/class-wp-editor.php on line 681**

SO it stops loading the button and echoing the button names just before the WP-Tiles button is displayed - when I remove my code to echo the button names, then the buttons all load up fine, including the WP-Tiles shortcode button, but since I can't figure out what it's named, I can't use the code example provided at the WP Codex for removing tinyMCE buttons.

Mike, can you please tell me how I can remove the registration of that shortcode button from your plugin? Ideally we'd love a future update that includes an option to disable that button based on user-level (e.g. allow for Editors but not Authors/Contributors, or disallow for everyone except admins).

For now though we have serious problems with users messing up our site layout and really need to just remove the button. Admins are fine without it as they know how to manually insert shortcode where needed.

Thanks for any help you can offer!

TrishaM avatar Jun 25 '16 23:06 TrishaM