Posted By

florent on 10/21/11


Tagged

wordpress theme


Versions (?)

How to Easily Disable Theme Changing


 / Published in: PHP
 

  1. add_action('admin_init', 'slt_lock_theme');
  2. function slt_lock_theme() {
  3. global $submenu, $userdata;
  4. get_currentuserinfo();
  5. if ($userdata->ID != 1) {
  6. unset($submenu['themes.php'][5]);
  7. unset($submenu['themes.php'][15]);
  8. }
  9. }

Report this snippet  

You need to login to post a comment.