#wpadminbar { top: -28px; } #adminbar-padding { padding-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() { ?>
Configure the WordPress 3.1 admin bar options below.