From 2188521ad1f4ce975b62045d75d9d519b752f3ae Mon Sep 17 00:00:00 2001 From: kremalicious Date: Sat, 17 Dec 2011 21:08:26 +0000 Subject: [PATCH] now works on toolbar in frontend too slightly different options page layout git-svn-id: http://plugins.svn.wordpress.org/badged/trunk@476934 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- bubbles-menu.css | 2 +- bubbles-settings.php | 22 +++++++++------------- bubbles.php | 11 +++++++++-- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/bubbles-menu.css b/bubbles-menu.css index c887951..c2c967b 100644 --- a/bubbles-menu.css +++ b/bubbles-menu.css @@ -100,7 +100,7 @@ #bubblesoptions form h2 { border-bottom: 1px solid #eee; border-top: 1px solid #eee; - margin-top: 1em; + margin-top: .5em; padding: 10px 0; } diff --git a/bubbles-settings.php b/bubbles-settings.php index 5545b96..80c9895 100644 --- a/bubbles-settings.php +++ b/bubbles-settings.php @@ -13,27 +13,23 @@

- - + - /> +
+ /> + +
+ /> + +
- - - - - - - - /> - - + diff --git a/bubbles.php b/bubbles.php index 1e94fd9..3ff7fc5 100644 --- a/bubbles.php +++ b/bubbles.php @@ -15,7 +15,6 @@ if (function_exists('load_plugin_textdomain')) { } function bubbles_init() { - bubbles_register_settings(); if ( get_option('menu') == 'yes') { wp_register_style('bubbles-menu-css', plugins_url('/bubbles/bubbles-menu.css'), false, '9001'); @@ -26,7 +25,13 @@ function bubbles_init() { wp_register_style('bubbles-bar-css', plugins_url('/bubbles/bubbles-bar.css'), false, '9001'); wp_enqueue_style('bubbles-bar-css'); } - +} + +function bubbles_bar_only_init() { + if ( get_option('bar') == 'yes') { + wp_register_style('bubbles-bar-css', plugins_url('/bubbles/bubbles-bar.css'), false, '9001'); + wp_enqueue_style('bubbles-bar-css'); + } } function bubbles_settings() { @@ -51,6 +56,8 @@ function bubbles_activation() { if ( is_admin() ) { add_action('admin_init', 'bubbles_init'); add_action('admin_menu', 'bubbles_settings'); +} elseif ( !is_admin() && get_option('bar') == 'yes' ) { + add_action('admin_bar_init', 'bubbles_bar_only_init'); } register_activation_hook(__FILE__, 'bubbles_activation');