1
0
mirror of https://github.com/kremalicious/Badged.git synced 2024-11-22 18:00:01 +01:00

Renaming the plugin to Badged

git-svn-id: http://plugins.svn.wordpress.org/badged/trunk@476939 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
kremalicious 2011-12-17 21:11:20 +00:00
parent 3557e0e0b2
commit 9ce0161df3
11 changed files with 122 additions and 117 deletions

View File

@ -1,32 +1,32 @@
<div class="wrap" id="bubblesoptions">
<div class="wrap" id="badgedoptions">
<header>
<div class="icon32"></div>
<h2><?php _e( 'Bubbles Settings', 'bbls' ); ?></h2>
<h2><?php _e( 'Badged Settings', 'bdgd' ); ?></h2>
</header>
<form method="post" action="options.php">
<?php settings_fields( 'bubbles' ); ?>
<?php settings_fields( 'badged' ); ?>
<table class="form-table">
<tr valign="top">
<td colspan="2">
<h2><?php _e( 'View', 'bbls' ); ?></h2>
<h2><?php _e( 'View', 'bdgd' ); ?></h2>
</td>
</tr>
<tr valign="top">
<th scope="row" class="indent">
<?php _e( 'Style Notifications in', 'bbls' ); ?>
<?php _e( 'Style Notifications in', 'bdgd' ); ?>
</th>
<td>
<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>
<label for="menu"><?php _e( 'Admin Menu', 'bdgd' ); ?></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>
<label for="bar"><?php _e( 'Toolbar', 'bdgd' ); ?></label>
</fieldset>
</td>
</tr>
@ -38,7 +38,7 @@
</form>
<footer>
<p><?php _e('Thanks for using Bubbles. Created by', 'bbls'); ?> <a href="http://mkretschmann.com">Matthias Kretschmann</a> (<a href="https://twitter.com/kremalicious">@kremalicious</a>)</p>
<p><?php _e('Thanks for using Badged. Created by', 'bdgd'); ?> <a href="http://mkretschmann.com">Matthias Kretschmann</a> (<a href="https://twitter.com/kremalicious">@kremalicious</a>)</p>
</footer>
</div>

76
badged.php Normal file
View File

@ -0,0 +1,76 @@
<?php
/**
* Plugin Name: Badged
* Plugin URI: http://kremalicious.com
* Description: Transforms the standard WordPress update & comment notification badges into iOS-styled ones. Just activate and enjoy the red Badges.
* Author: Matthias Kretschmann
* Author URI: http://matthiaskretschmann.com
* Version: 0.3
* License: GPL
*/
if (function_exists('load_plugin_textdomain')) {
load_plugin_textdomain('bdgd', false, dirname(plugin_basename(__FILE__)).'/languages' );
}
function badged_init() {
badged_register_settings();
if ( get_option('menu') == 'yes') {
wp_register_style('badged-menu-css', plugins_url('css/badged-menu.css', __FILE__), false, '9001');
wp_enqueue_style('badged-menu-css');
}
if ( get_option('bar') == 'yes') {
wp_register_style('badged-bar-css', plugins_url('css/badged-bar.css', __FILE__), false, '9001');
wp_enqueue_style('badged-bar-css');
}
}
function badged_bar_only_init() {
if ( get_option('bar') == 'yes') {
wp_register_style('badged-bar-css', plugins_url('css/badged-bar.css', __FILE__), false, '9001');
wp_enqueue_style('badged-bar-css');
}
}
function badged_settings() {
add_options_page('Badged Options', 'Badged', 'manage_options', 'badged_settings', 'badged_settings_page');
}
function badged_register_settings() {
register_setting('badged', 'menu');
register_setting('badged', 'bar');
}
function badged_settings_page() {
require_once('badged-settings.php');
}
function badged_activation() {
badged_register_settings();
update_option('menu', 'yes');
update_option('bar', 'yes');
}
if ( is_admin() ) {
add_action('admin_init', 'badged_init');
add_action('admin_menu', 'badged_settings');
} elseif ( !is_admin() && get_option('bar') == 'yes' ) {
add_action('admin_bar_init', 'badged_bar_only_init');
}
register_activation_hook(__FILE__, 'badged_activation');
// Add settings link on plugin page
function badged_settings_link($links) {
$settings_link = '<a href="options-general.php?page=badged_settings">'. __('Settings') .'</a>';
array_unshift($links, $settings_link);
return $links;
}
$plugin = plugin_basename(__FILE__);
add_filter('plugin_action_links_'.$plugin, 'badged_settings_link' );
?>

View File

@ -1,76 +0,0 @@
<?php
/**
* Plugin Name: Bubbles
* Plugin URI: http://kremalicious.com
* Description: Transforms the standard WordPress update & comment notification bubbles into iOS-styled ones. Just activate and enjoy the red bubbles.
* Author: Matthias Kretschmann
* Author URI: http://matthiaskretschmann.com
* Version: 0.1.0
* License: GPL
*/
if (function_exists('load_plugin_textdomain')) {
load_plugin_textdomain('bbls', false, dirname(plugin_basename(__FILE__)).'/languages' );
}
function bubbles_init() {
bubbles_register_settings();
if ( get_option('menu') == 'yes') {
wp_register_style('bubbles-menu-css', plugins_url('css/bubbles-menu.css', __FILE__), false, '9001');
wp_enqueue_style('bubbles-menu-css');
}
if ( get_option('bar') == 'yes') {
wp_register_style('bubbles-bar-css', plugins_url('css/bubbles-bar.css', __FILE__), 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('css/bubbles-bar.css', __FILE__), false, '9001');
wp_enqueue_style('bubbles-bar-css');
}
}
function bubbles_settings() {
add_options_page('Bubbles Options', 'Bubbles', 'manage_options', 'bubbles_settings', 'bubbles_settings_page');
}
function bubbles_register_settings() {
register_setting('bubbles', 'menu');
register_setting('bubbles', 'bar');
}
function bubbles_settings_page() {
require_once('bubbles-settings.php');
}
function bubbles_activation() {
bubbles_register_settings();
update_option('menu', 'yes');
update_option('bar', 'yes');
}
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');
// Add settings link on plugin page
function bubbles_settings_link($links) {
$settings_link = '<a href="options-general.php?page=bubbles_settings">'. __('Settings') .'</a>';
array_unshift($links, $settings_link);
return $links;
}
$plugin = plugin_basename(__FILE__);
add_filter('plugin_action_links_'.$plugin, 'bubbles_settings_link' );
?>

View File

@ -1,6 +1,6 @@
/* ============================================================== */
/* Bubbles */
/* Badged */
/* ------------------------ */
/* CSS Styles for the Admin Bar only */
/* by Matthias Kretschmann | http://mkretschmann.com */

View File

@ -1,6 +1,6 @@
/* ============================================================== */
/* Bubbles */
/* Badged */
/* ------------------------ */
/* CSS Styles for the Admin Menu only */
/* by Matthias Kretschmann | http://mkretschmann.com */
@ -45,7 +45,7 @@
margin-top: -1px;
}
/* darker shadow for bubbles on active menus */
/* darker shadow for badged on active menus */
#adminmenu li.current a .awaiting-mod,
#adminmenu li a.wp-has-current-submenu .update-plugins {
-webkit-box-shadow: 0px 2px 2px #444 !important;
@ -97,19 +97,19 @@
/* The Options Page */
/* ============================================================== */
#bubblesoptions form h2 {
#badgedoptions form h2 {
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
margin-top: .5em;
padding: 10px 0;
}
#bubblesoptions footer {
#badgedoptions footer {
border-top: 1px solid #eee;
color: #666;
}
#bubblesoptions .icon32 {
background-image: url(../img/icon-bubbles-32.png);
#badgedoptions .icon32 {
background-image: url(../img/icon-badged-32.png);
background-repeat: no-repeat;
}

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

BIN
languages/bdgd-de_DE.mo Normal file

Binary file not shown.

View File

@ -19,33 +19,38 @@ msgstr ""
"X-Poedit-SearchPath-0: .\n"
"X-Textdomain-Support: yes"
#: bubbles-settings.php:21
#@ bbls
msgid "Style Notifications in"
msgstr "Benachrichtigungen ersetzen in"
#: badged-settings.php:5
#@ bdgd
msgid "Badged Settings"
msgstr "Badged Einstellungen"
#: bubbles-settings.php:26
#@ bbls
msgid "Admin Menu"
msgstr "Admin Menü"
#: bubbles-settings.php:29
#@ bbls
msgid "Toolbar"
msgstr "Werkzeugleiste"
#: bubbles-settings.php:5
#@ bbls
msgid "Bubbles Settings"
msgstr "Bubbles Einstellungen"
#: bubbles-settings.php:41
#@ bbls
msgid "Thanks for using Bubbles. Created by"
msgstr "Danke für das Benutzen von Bubbles. Erstellt von"
#: bubbles-settings.php:15
#@ bbls
#: badged-settings.php:15
#@ bdgd
msgid "View"
msgstr "Anzeige"
#: badged-settings.php:21
#@ bdgd
msgid "Style Notifications in"
msgstr "Benachrichtigungen ersetzen in"
#: badged-settings.php:26
#@ bdgd
msgid "Admin Menu"
msgstr "Admin-Menü"
#: badged-settings.php:29
#@ bdgd
msgid "Toolbar"
msgstr "Werkzeugleiste"
#: badged-settings.php:41
#@ bdgd
msgid "Thanks for using Badged. Created by"
msgstr "Danke für die Nutzung von Badged. Erstellt von"
#: badged.php:68
#@ default
msgid "Settings"
msgstr ""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB