Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hide Active Widgets Panel in WordPress
- This plugin needs improving, but I'm a code noob. I'd like to see the following improvements:
- 1. Allow admin access but restrict all other users
- 2. include the css file in the plugin (no editing needed)
- 3. have a checkbox to enable the hiding feature.
- <?php
- /*
- Plugin Name: Hide Active Widgets
- Plugin URI: http://wordpress.com
- 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.
- Author: Peter Easton
- Version: 1.0
- Author URI: http://byfordwa.com
- */
- function my_admin_head() {
- echo '<link rel="stylesheet" type="text/css" href="' .plugins_url('wp-admin.css', __FILE__). '">';
- }
- add_action('admin_head', 'my_admin_head');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement