Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Implements hook_element_info_alter().
- */
- function mymodule_element_info_alter(&$type) {
- if (isset($type['text_format'])) {
- $type['text_format']['#process'][] = 'mymodule_process_format';
- }
- }
- function mymodule_process_format($element) {
- global $user;
- //hide for all except superadmin
- if ($user->uid <> 1) {
- hide($element['format']);
- }
- return $element;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement