mirror of
https://github.com/kremalicious/Badged.git
synced 2024-12-28 07:37:43 +01:00
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
This commit is contained in:
parent
e35c73a088
commit
2188521ad1
@ -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;
|
||||
}
|
||||
|
||||
|
@ -13,27 +13,23 @@
|
||||
<tr valign="top">
|
||||
<td colspan="2">
|
||||
<h2><?php _e( 'View Options', 'bbls' ); ?></h2>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row" class="indent">
|
||||
<label for="menu"><?php _e( 'Style Notifications in Admin Menu', 'bbls' ); ?></label>
|
||||
<?php _e( 'Style Notifications in', 'bbls' ); ?>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" name="menu" value="yes"<?php echo get_option('menu') == 'yes' ? ' checked' : '';?> />
|
||||
<fieldset>
|
||||
<input type="checkbox" name="menu" id="menu" value="yes"<?php echo get_option('menu') == 'yes' ? ' checked' : '';?> />
|
||||
<label for="menu"><?php _e( 'Admin Menu', 'bbls' ); ?></label>
|
||||
<br />
|
||||
<input type="checkbox" name="bar" id="bar" value="yes"<?php echo get_option('bar') == 'yes' ? ' checked' : '';?> />
|
||||
<label for="bar"><?php _e( 'Toolbar', 'bbls' ); ?></label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row" class="indent">
|
||||
<label for="bar"><?php _e( 'Style Notifications in Adminbar', 'bbls' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" name="bar" value="yes"<?php echo get_option('bar') == 'yes' ? ' checked' : '';?> />
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
11
bubbles.php
11
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');
|
||||
|
Loading…
Reference in New Issue
Block a user