Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Hide tagDiv Composer UI for non-admin users in wp-admin
- */
- function td_hide_tdc_for_non_admins_admin() {
- if (current_user_can('administrator')) {
- return;
- }
- echo '<style>
- #toplevel_page_tdb_cloud_templates,
- .tdc-panel-button,
- .edit_tdc_composer,
- #wp-admin-bar-tdc_edit {
- display: none !important;
- }
- </style>';
- }
- add_action('admin_head', 'td_hide_tdc_for_non_admins_admin');
- /**
- * Hide tagDiv Composer UI for non-admin users on the frontend
- */
- function td_hide_tdc_for_non_admins_frontend() {
- if (current_user_can('administrator')) {
- return;
- }
- echo '<style>
- #wp-admin-bar-tdc_edit,
- [id^="wp-admin-bar-tdb_template_"] {
- display: none !important;
- }
- </style>';
- }
- add_action('wp_head', 'td_hide_tdc_for_non_admins_frontend');
Advertisement
Add Comment
Please, Sign In to add comment