#wpadminbar { top: -28px; } html { margin-top: 0px !important; }\r\n"; } else { echo ""; } echo ""; } // Add a little admin css - opacity set to zero for admin bar tab as it displays better function jq_min_add_admin_css() { $options = get_option('jq_min_options'); $maximised = $options['chk_wpadmin']; if ( $maximised != '1' ) { echo "\r\n"; } else { echo ""; } echo ""; } // Delete options table entries ONLY when plugin deactivated AND deleted function jq_min_delete_plugin_options() { delete_option('jq_min_options'); } // Define default option settings function jq_min_add_defaults() { $tmp = get_option('jq_min_options'); if( !$tmp ) { // if no options present set-up defaults $arr = array("chk_wpadmin" => "0", "chk_front_end" => "0"); update_option('jq_min_options', $arr); } } // Add admin menu page function jq_min_add_options_page() { add_options_page('Admin Bar Minimiser Options Page', 'Admin Bar Minimiser', 'manage_options', __FILE__, 'jq_min_render_form'); } // Draw the menu page itself function jq_min_render_form() { ?>

Admin Bar Minimiser

Configure the WordPress 3.1 Admin Bar options below.

If the Admin Bar is enabled (via the user profile page) then you can specify below whether it is shown maximised or minimised by default.

Front end settings
Admin settings

'.__('Settings').''; // make the 'Settings' link appear first array_unshift( $links, $jq_min_links ); } return $links; }