Guest User

Untitled

a guest
Apr 22nd, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function remove_tdc_for_non_admin() {
  2. if (current_user_can('administrator')) {
  3. echo '<style>
  4. #toplevel_page_tdb_cloud_templates,
  5. .tdc-panel-button, .edit_tdc_composer, #wp-admin-bar-tdc_edit
  6. { display: none !important; }
  7. </style>';
  8.  
  9. }
  10. }
  11. add_action('admin_menu', 'remove_tdc_for_non_admin');
  12.  
  13. function remove_tdc() {
  14. if (current_user_can('administrator')) {
  15. echo '<style>
  16. #wp-admin-bar-tdc_edit,
  17. [id^="wp-admin-bar-tdb_template_"]
  18. { display: none !important; }
  19. </style>';
  20. }
  21. }
  22. add_action('wp_enqueue_scripts', 'remove_tdc');
Advertisement
Add Comment
Please, Sign In to add comment