Advertisement
pjeaje

Hide Active Widgets Panel in Wordpress

Jul 17th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. Hide Active Widgets Panel in WordPress
  2. This plugin needs improving, but I'm a code noob. I'd like to see the following improvements:
  3. 1. Allow admin access but restrict all other users
  4. 2. include the css file in the plugin (no editing needed)
  5. 3. have a checkbox to enable the hiding feature.
  6.  
  7. <?php
  8.  
  9. /*
  10. Plugin Name: Hide Active Widgets
  11. Plugin URI: http://wordpress.com
  12. Description: Hides the Active Widgets from being displayed on the admin widget page.<br />USAGE: Edit the wp-admin.css file in the plugin folder (NOT the admin core folder!!) with the css changes you want. This plugin simply applies a css file to over-ride the current core admin style sheet.
  13. Author: Peter Easton
  14. Version: 1.0
  15. Author URI: http://byfordwa.com
  16. */
  17.  
  18. function my_admin_head() {
  19.         echo '<link rel="stylesheet" type="text/css" href="' .plugins_url('wp-admin.css', __FILE__). '">';
  20. }
  21.  
  22. add_action('admin_head', 'my_admin_head');
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement