Compare commits
81 Commits
Author | SHA1 | Date |
---|---|---|
Matthias Kretschmann | 0d89d0398c | |
Matthias Kretschmann | 1ce463465c | |
Matthias Kretschmann | b942f506ad | |
Matthias Kretschmann | b430656a38 | |
Matthias Kretschmann | 2692aa2954 | |
Matthias Kretschmann | 60ab9dcbea | |
Matthias Kretschmann | fac64327c2 | |
Matthias Kretschmann | 69a6906814 | |
Matthias Kretschmann | bf486225bd | |
Matthias Kretschmann | 76c3185e10 | |
Matthias Kretschmann | 77567958d4 | |
Matthias Kretschmann | c42e81d885 | |
Matthias Kretschmann | 363d463dd1 | |
Matthias Kretschmann | 3c3feecc27 | |
Matthias Kretschmann | e6a4b7360a | |
Matthias Kretschmann | 16fb91cbc0 | |
Matthias Kretschmann | 537cb16a67 | |
Matthias Kretschmann | 6d0709596e | |
Matthias Kretschmann | f3ba54da68 | |
Matthias Kretschmann | 69abb14e47 | |
Matthias Kretschmann | c93dd3541a | |
Matthias Kretschmann | 8123122e7f | |
Matthias Kretschmann | f2907c1202 | |
Matthias Kretschmann | a4550c648f | |
Matthias Kretschmann | d63f10048a | |
Matthias Kretschmann | 6f24c7ca59 | |
Matthias Kretschmann | 78b0f18bbf | |
Matthias Kretschmann | 7ddb0c09c1 | |
Matthias Kretschmann | 59aaa624d4 | |
Matthias Kretschmann | dfc6f9c0f1 | |
Matthias Kretschmann | d05b0c3a84 | |
Matthias Kretschmann | 4385d3c101 | |
Matthias Kretschmann | d2c5467701 | |
Matthias Kretschmann | 4b4dd1bc2b | |
Matthias Kretschmann | 35a6106257 | |
Matthias Kretschmann | 51ac00b1d0 | |
Matthias Kretschmann | ff28912f4b | |
Matthias Kretschmann | 4188240bf5 | |
Matthias Kretschmann | 580479cd2c | |
Matthias Kretschmann | 6eb2a08972 | |
Matthias Kretschmann | 79024f0098 | |
Matthias Kretschmann | 313bdee0ac | |
Matthias Kretschmann | 5a04b33962 | |
Matthias Kretschmann | dec8ac0341 | |
Matthias Kretschmann | c2bd03660a | |
Matthias Kretschmann | 0d2ddba183 | |
Matthias Kretschmann | 0340f54cbe | |
Matthias Kretschmann | 5d89f5e03c | |
Matthias Kretschmann | b6eaccfb70 | |
Matthias Kretschmann | a38485723b | |
Matthias Kretschmann | ffb74acd6c | |
Matthias Kretschmann | a4f802d266 | |
Matthias Kretschmann | 12b1397bf2 | |
Matthias Kretschmann | df7d685f61 | |
Matthias Kretschmann | c0d7bb0171 | |
Matthias Kretschmann | 0c4d6342cb | |
Matthias Kretschmann | 20837f440e | |
Matthias Kretschmann | 8eae6b4448 | |
Matthias Kretschmann | d4cca78102 | |
kremalicious | ac48519ebd | |
Matthias Kretschmann | 67b096d170 | |
Matthias Kretschmann | 717251fce0 | |
kremalicious | ba90cf6279 | |
Matthias Kretschmann | a2d79838f3 | |
Matthias Kretschmann | cbba0db32b | |
Matthias Kretschmann | 1c33b1739e | |
Matthias Kretschmann | c5e1756758 | |
kremalicious | c97216919a | |
kremalicious | 2efceca5c9 | |
kremalicious | 23786a3076 | |
kremalicious | 0c32baae2e | |
kremalicious | 9ce0161df3 | |
kremalicious | 3557e0e0b2 | |
kremalicious | 145c642e5d | |
kremalicious | 86fa8c41fb | |
kremalicious | 1da78e2e1c | |
kremalicious | 2188521ad1 | |
kremalicious | e35c73a088 | |
kremalicious | c45fac9244 | |
kremalicious | fffdc131be | |
plugin-master | 35b28ed1af |
|
@ -0,0 +1 @@
|
|||
node_modules
|
|
@ -0,0 +1,111 @@
|
|||
module.exports = function(grunt){
|
||||
'use strict';
|
||||
|
||||
// banner
|
||||
grunt.log.writeln("");
|
||||
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
grunt.log.writeln("");
|
||||
grunt.log.writeln(" Just what do you think you're doing, Matthias? ");
|
||||
grunt.log.writeln("");
|
||||
grunt.log.writeln(" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
grunt.log.writeln("");
|
||||
|
||||
// Grunt config
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
// less
|
||||
less: {
|
||||
dist: {
|
||||
options: {
|
||||
compress: true,
|
||||
cleancss: true,
|
||||
report: 'min'
|
||||
},
|
||||
files: {
|
||||
'badged/admin/assets/css/badged.min.css' : 'badged/admin/assets/less/badged.less',
|
||||
'badged/admin/assets/css/badged-ios6.min.css' : 'badged/admin/assets/less/badged-ios6.less',
|
||||
'badged/admin/assets/css/admin.min.css' : 'badged/admin/assets/less/admin.less',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// image optimization
|
||||
imagemin: {
|
||||
dist: {
|
||||
options: {
|
||||
optimizationLevel: 7
|
||||
},
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
cwd: 'badged/admin/assets/img/',
|
||||
src: ['**/*.{png,jpg,jpeg,gif}'],
|
||||
dest: 'badged/admin/assets/img/'
|
||||
},
|
||||
{
|
||||
expand: true,
|
||||
cwd: 'assets/',
|
||||
src: ['**/*.{png,jpg,jpeg,gif}'],
|
||||
dest: 'assets/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
// svg optimization
|
||||
svgmin: {
|
||||
dist: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
cwd: 'badged/admin/assets/img/',
|
||||
src: ['**/*.svg'],
|
||||
dest: 'badged/admin/assets/img/'
|
||||
},
|
||||
{
|
||||
expand: true,
|
||||
cwd: 'assets/',
|
||||
src: ['**/*.svg'],
|
||||
dest: 'assets/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
// watch
|
||||
watch: {
|
||||
less: {
|
||||
files: ['badged/admin/assets/less/*.less'],
|
||||
tasks: ['less']
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Load NPM Tasks, smart code stolen from @bluemaex <https://github.com/bluemaex>
|
||||
require('fs').readdirSync('node_modules').filter(function (file) {
|
||||
return file && file.indexOf('grunt-') > -1;
|
||||
}).forEach(function (file) {
|
||||
grunt.loadNpmTasks(file);
|
||||
});
|
||||
|
||||
// Default Task
|
||||
grunt.registerTask('default', [
|
||||
'watch'
|
||||
]);
|
||||
|
||||
// Dev server
|
||||
grunt.registerTask('server', [
|
||||
'less',
|
||||
'watch'
|
||||
]);
|
||||
|
||||
// Production build
|
||||
grunt.registerTask('build', [
|
||||
'imagemin',
|
||||
'svgmin',
|
||||
'less'
|
||||
]);
|
||||
|
||||
};
|
|
@ -0,0 +1,87 @@
|
|||
|
||||
# Badged
|
||||
-----------------------------------
|
||||
**iOS Style Notification Badges for WordPress**
|
||||
|
||||
<img src="https://raw.github.com/kremalicious/Badged/master/design/Badged%20Teaser%20kremalicious-assets/Badged-Teaser-kremalicious@2x.png" width="680" height="212" />
|
||||
|
||||
Badged transforms the standard WordPress update & comment notification badges into iOS-styled ones. Upon activation it automatically replaces the badge styles in the admin menu and the toolbar. An optional settings page allows to control whether the badges show up as the new default iOS style or styled as pre-iOS 7 badges.
|
||||
|
||||
The badges are created without any images by using only CSS (box shadows, gradients, pseudo elements, you name it) and were tested in current versions of Safari, Chrome, Firefox, Opera & Internet Explorer. It should degrade gracefully in older browsers with some details missing like drop shadows or the highlight shine.
|
||||
|
||||
The plugin is localized in english, german & spanish.
|
||||
|
||||
* * *
|
||||
|
||||
[Badged Blog Post](http://kremalicious.com/badged/) | [Badged on github](https://github.com/kremalicious/badged) | **[Donate](http://krlc.us/givecoffee)**
|
||||
|
||||
* * *
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Just install using the automatic backend installer under Plugins > Add New, activate and enjoy the red badges.
|
||||
|
||||
For manual installation:
|
||||
|
||||
1. Upload the badged plugin folder to the `/wp-content/plugins/` directory
|
||||
2. Activate the plugin through the *Plugins* menu in WordPress
|
||||
3. Enjoy
|
||||
|
||||
(optional) Adjust options under Settings > Badges
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### v1.0.1
|
||||
|
||||
* tested for WP 4.0
|
||||
* Spanish translation, muchas gracias to Andrew Kurtis from [webhostinghub.com](http://www.webhostinghub.com)
|
||||
* don't style comments badge with 0 comments
|
||||
* improved styles
|
||||
* admin settings page fixes
|
||||
* plugin icon and updated banner & screenshots
|
||||
|
||||
### v1.0.0
|
||||
|
||||
* new default style based on iOS 7
|
||||
* new setting to switch back to pre-iOS 7 style
|
||||
* rewritten from the ground up based on Tom McFarlin's excellent [WordPress Plugin Boilerplate](https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate)
|
||||
* settings through WordPress Settings API
|
||||
* Retina banner for WordPress plugin repository listing
|
||||
* drop IE 8 support (still present in pre-iOS 7 style)
|
||||
* using Grunt for optimized images and minified css
|
||||
* confusing and ridiculous version number jump
|
||||
|
||||
### v0.3.6
|
||||
|
||||
* tested for WP 3.4
|
||||
* settings page: Retina ready icon for high dpi devices, css only submit button
|
||||
* updated german translation
|
||||
|
||||
### v0.3.5
|
||||
|
||||
* IE 8 improvements: box shadow, light gradient through DXImageTransform filters (but no rounded corners, sorry)
|
||||
* current versions of IE & Opera are now among the tested browsers
|
||||
* updated settings page links
|
||||
|
||||
### v0.3.4
|
||||
|
||||
* more descriptive readme and settings footer with links to blog post & github page
|
||||
* updated translation
|
||||
|
||||
### v0.3.2
|
||||
|
||||
* Make the plugin work if symlinked
|
||||
|
||||
### v0.3
|
||||
|
||||
* initial beta release
|
||||
|
||||
### v0.2
|
||||
|
||||
* added options to control whether the badges show up in admin menu or toolbar (default is both)
|
||||
|
||||
### v0.1
|
||||
|
||||
* initial alpha release
|
After Width: | Height: | Size: 237 KiB |
After Width: | Height: | Size: 116 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid" width="128" height="128" viewBox="0 0 128 128"><defs><style>.cls-3 { fill: #d0f2f5; } .cls-4 { fill: #7cacb0; }</style></defs><g id="iconsvg"><path id="rect-1" class="cls-3" d="M0 0h128v128H0z"/><circle id="circle-1" class="cls-4" cx="65" cy="65" r="46"/><path d="M64.145 57.234V81h4.5V47.578h-3.33c-.593 2.594-1.49 4.24-2.694 4.934-1.202.695-3.327 1.19-6.374 1.488v3.234h7.9z" id="path-1" class="cls-3" fill-rule="evenodd"/></g></svg>
|
After Width: | Height: | Size: 506 B |
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden ?>
|
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
@ -1,44 +0,0 @@
|
|||
<div class="wrap" id="badgedoptions">
|
||||
|
||||
<header>
|
||||
<div class="icon32"></div>
|
||||
<h2><?php _e( 'Badged Settings', 'bdgd' ); ?></h2>
|
||||
</header>
|
||||
|
||||
<form method="post" action="options.php">
|
||||
<?php settings_fields( 'badged' ); ?>
|
||||
|
||||
<table class="form-table">
|
||||
|
||||
<tr valign="top">
|
||||
<td colspan="2">
|
||||
<h2><?php _e( 'View', 'bdgd' ); ?></h2>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row" class="indent">
|
||||
<?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', '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', 'bdgd' ); ?></label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<?php submit_button(); ?>
|
||||
|
||||
</form>
|
||||
|
||||
<footer>
|
||||
<p><?php _e('Thanks for using Badged', 'bdgd'); ?> · <?php _e('Created by', 'bdgd'); ?> <a href="http://mkretschmann.com">Matthias Kretschmann</a> (<a href="https://twitter.com/kremalicious">@kremalicious</a>)</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
123
badged.php
|
@ -1,123 +0,0 @@
|
|||
<?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.2
|
||||
* License: GPL
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Make the plugin work if symlinked
|
||||
*
|
||||
* Thanks to:
|
||||
* http://alexking.org/blog/2011/12/15/wordpress-plugins-and-symlinks
|
||||
*
|
||||
* @since 0.3.2
|
||||
*
|
||||
*/
|
||||
|
||||
$badged_plugin_file = __FILE__;
|
||||
|
||||
if (isset($plugin)) {
|
||||
$badged_plugin_file = $plugin;
|
||||
}
|
||||
else if (isset($mu_plugin)) {
|
||||
$badged_plugin_file = $mu_plugin;
|
||||
}
|
||||
else if (isset($network_plugin)) {
|
||||
$badged_plugin_file = $network_plugin;
|
||||
}
|
||||
|
||||
define('BADGED_PLUGIN_FILE', $badged_plugin_file);
|
||||
define('BADGED_PLUGIN_PATH', WP_PLUGIN_DIR.'/'.basename(dirname($badged_plugin_file)));
|
||||
|
||||
|
||||
/**
|
||||
* Load translation
|
||||
*
|
||||
*/
|
||||
if (function_exists('load_plugin_textdomain')) {
|
||||
load_plugin_textdomain('bdgd', false, BADGED_PLUGIN_PATH.'/languages' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register the styles depending on options
|
||||
*
|
||||
*/
|
||||
function badged_init() {
|
||||
badged_register_settings();
|
||||
if ( get_option('menu') == 'yes') {
|
||||
wp_register_style('badged-menu-css', plugins_url('css/badged-menu.css', BADGED_PLUGIN_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', BADGED_PLUGIN_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', BADGED_PLUGIN_FILE), false, '9001');
|
||||
wp_enqueue_style('badged-bar-css');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the options page with our settings
|
||||
*
|
||||
*/
|
||||
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');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set default options upon activation
|
||||
*
|
||||
*/
|
||||
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(BADGED_PLUGIN_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(BADGED_PLUGIN_FILE);
|
||||
add_filter('plugin_action_links_'.$plugin, 'badged_settings_link' );
|
||||
|
||||
?>
|
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
#badgedoptions a,#badgedoptions input.button-primary,#badgedoptions .kremalicious{text-decoration:none;-webkit-transition:all .2s ease-in-out 0;transition:all .2s ease-in-out 0}
|
||||
#badgedoptions form h3{font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:18px;font-weight:400;border-bottom:1px solid #e3e3e3;border-top:1px solid #e3e3e3;margin-top:.5em;padding:10px 0}
|
||||
#badgedoptions footer{border-top:1px solid #e3e3e3;color:#666}
|
||||
#badgedoptions .radio-row{margin-bottom:0}
|
||||
.kremalicious{background:url('../img/kremalicious-cloud.svg') no-repeat left -2px;background-size:16px;width:16px;height:16px;margin-left:10px;margin-right:1px;margin-bottom:-1px;display:inline-block;vertical-align:bottom;opacity:.5}.kremalicious-link:hover .kremalicious{opacity:1}
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
#adminmenu .awaiting-mod,#adminmenu span.update-plugins,#sidemenu li a span.update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow,#wp-admin-bar-updates .ab-label,#wp-admin-bar-comments .ab-label{font-size:11px;font-weight:normal;font-family:Helvetica,Verdana,Geneva,sans-serif;line-height:17px;color:#fff;text-align:center;text-shadow:0 1px 1px #771717;background-color:#d5231f !important;box-shadow:0px 2px 2px #000 !important;border:2px solid #fff;background-image:-webkit-linear-gradient(top, rgba(255,255,255,0.3), rgba(255,255,255,0));background-image:linear-gradient(top, rgba(255,255,255,0.3), rgba(255,255,255,0));background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4dffffff', endColorstr='#00ffffff', GradientType=0);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-radius:10px;background-clip:padding-box;min-width:20px;height:20px;padding-left:3px;padding-right:3px;display:inline-block;margin-left:2px;margin-top:-2px;position:relative}#adminmenu .awaiting-mod:before,#adminmenu span.update-plugins:before,#sidemenu li a span.update-plugins:before,#sidemenu a .update-plugins:before,#rightnow .reallynow:before,#wp-admin-bar-updates .ab-label:before,#wp-admin-bar-comments .ab-label:before{content:"";position:absolute;left:0;top:0;width:100%;height:100%;border-radius:10px;background-clip:padding-box;box-shadow:inset 0 0 3px #631212;background:-webkit-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0, rgba(255,255,255,0.3) 59%, rgba(255,255,255,0) 65%, rgba(255,255,255,0) 100%);background:radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0, rgba(255,255,255,0.3) 59%, rgba(255,255,255,0) 65%, rgba(255,255,255,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4dffffff', endColorstr='#00ffffff', GradientType=1)}
|
||||
#adminmenu li.current a .awaiting-mod,#adminmenu li a.wp-has-current-submenu .update-plugins{box-shadow:0px 2px 2px #444 !important}
|
||||
#adminmenu li .awaiting-mod span,#adminmenu li span.update-plugins span,#sidemenu li a span.update-plugins span{padding:0 2px}
|
||||
#wp-admin-bar-comments .ab-label.count-0{font-size:13px;background:none !important;border:none;box-shadow:none !important;text-shadow:none;min-width:0;margin:0;padding:0}#wp-admin-bar-comments .ab-label.count-0:before{display:none}
|
||||
.ie8 #adminmenu .awaiting-mod,.ie8 #adminmenu span.update-plugins,.ie8 #sidemenu li a span.update-plugins,.ie8 #sidemenu a .update-plugins,.ie8 #rightnow .reallynow,.ie8 #wp-admin-bar-updates .ab-label,.ie8 #wp-admin-bar-comments .ab-label{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4dffffff', endColorstr='#00ffffff', GradientType=0) progid:DXImageTransform.Microsoft.Shadow(color=#888888, direction=180, strength=3) progid:DXImageTransform.Microsoft.Shadow(color=#b3b3b3, direction=90, strength=2) progid:DXImageTransform.Microsoft.Shadow(color=#b3b3b3, direction=270, strength=2) }
|
||||
.ie8 #adminmenu li.current a .awaiting-mod,.ie8 #adminmenu li a.wp-has-current-submenu .update-plugins{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4dffffff', endColorstr='#00ffffff', GradientType=0) progid:DXImageTransform.Microsoft.Shadow(color=#444444, direction=180, strength=3) progid:DXImageTransform.Microsoft.Shadow(color=#666666, direction=90, strength=2) progid:DXImageTransform.Microsoft.Shadow(color=#666666, direction=270, strength=2) }
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
#adminmenu .awaiting-mod,#adminmenu span.update-plugins,#sidemenu li a span.update-plugins,#sidemenu a .update-plugins,#rightnow .reallynow,#wp-admin-bar-updates .ab-label,#wp-admin-bar-comments .ab-label{font-size:12px;font-weight:200;font-family:'Helvetica Neue',Helvetica,Verdana,Geneva,sans-serif;line-height:20px;color:#fff;text-align:center;background:#ff0000 !important;box-shadow:0 1px 0 rgba(0,0,0,0.2) !important;text-shadow:none !important;min-width:20px;height:20px;border-radius:20px;background-clip:padding-box;display:inline-block;margin-top:-2px;vertical-align:baseline}
|
||||
#wp-admin-bar-comments .ab-label.count-0{background:none !important;min-width:0}
|
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden ?>
|
After Width: | Height: | Size: 964 B |
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden ?>
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.99 10V9h-2.07V8h1.733v-.97H13.92V6h.704V5h-.694v-.05h-.01v-.684H13v.683h-1.162V3.924l1.776-.018s.15-.005.387-.005C13.24 2.952 10.627 2 9.315 2c-1.78 0-3.293 1.466-3.88 3.042C5.084 4.567 4.528 4 3.894 4 2.835 4 1.98 5.112 1.98 6.17c0 .086.015.17.026.254C.866 6.91.066 8.04.066 9.357c0 1.76 1.43 3.63 3.19 3.63h8.3V13h2.026v-.766h-1.745v-.694H13v.683h.92v-.683h1.03v-.347h-1.03V10h2.07zM13 9h-1.162V8H13v1zm0-1.97h-1.162V6H13v1.03zm-2.246-.368l.022-.325.39-.022L11.16 6h.33v1.03h-1.083v-.368h.347zm.715-2.732h.02v1.02h-.354l-.015-.695.37-.022-.022-.303zM9 8l1.168-.265V8h1.322v1h-.683v.09H9.065L9 8zm2.14 2h.35v1.605c-.175-.468-.322-.995-.346-1.497L11.14 10zM13 11.193h-1.162V10H13v1.193z"/></svg>
|
After Width: | Height: | Size: 831 B |
|
@ -0,0 +1,54 @@
|
|||
/////////////////////////////////////
|
||||
//
|
||||
// Badged Settings Page
|
||||
// ------------------------
|
||||
// by Matthias Kretschmann
|
||||
// mkretschmann.com
|
||||
//
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
@import 'scaffolding.less';
|
||||
|
||||
// isolate settings style just in case
|
||||
#badgedoptions {
|
||||
|
||||
a,
|
||||
input.button-primary,
|
||||
.kremalicious {
|
||||
text-decoration: none;
|
||||
.transition;
|
||||
}
|
||||
|
||||
form h3 {
|
||||
font-family: HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
border-bottom: 1px solid @admin-border-color;
|
||||
border-top: 1px solid @admin-border-color;
|
||||
margin-top: .5em;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px solid @admin-border-color;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.radio-row { margin-bottom: 0 }
|
||||
}
|
||||
|
||||
.kremalicious {
|
||||
background: url('../img/kremalicious-cloud.svg') no-repeat left -2px;
|
||||
background-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 1px;
|
||||
margin-bottom: -1px;
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
opacity: .5;
|
||||
|
||||
.kremalicious-link:hover & { opacity: 1 }
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
/////////////////////////////////////
|
||||
//
|
||||
// Badged pre-iOS7 styles
|
||||
// ------------------------
|
||||
// by Matthias Kretschmann
|
||||
// mkretschmann.com
|
||||
//
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
@import 'scaffolding.less';
|
||||
|
||||
// Select all instances of the WP notification bubble
|
||||
// using the same selectors WP uses
|
||||
#adminmenu .awaiting-mod,
|
||||
#adminmenu span.update-plugins,
|
||||
#sidemenu li a span.update-plugins,
|
||||
#sidemenu a .update-plugins,
|
||||
#rightnow .reallynow,
|
||||
#wp-admin-bar-updates .ab-label,
|
||||
#wp-admin-bar-comments .ab-label {
|
||||
|
||||
font-size: @font-size-ios6;
|
||||
font-weight: @font-weight-ios6;
|
||||
font-family: @font-family-ios6;
|
||||
line-height: @line-height-ios6;
|
||||
color: @font-color-ios6;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 1px #771717;
|
||||
|
||||
/* need to be rude for these */
|
||||
background-color: #d5231f !important;
|
||||
box-shadow: 0px 2px 2px #000 !important;
|
||||
border: 2px solid #fff;
|
||||
|
||||
#gradient > .vertical(rgba(255,255,255,0.3), rgba(255,255,255,0));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=0 );
|
||||
|
||||
.box-sizing(border-box);
|
||||
.border-radius;
|
||||
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
display: inline-block;
|
||||
margin-left: 2px;
|
||||
margin-top: -2px;
|
||||
position: relative;
|
||||
|
||||
// inject another styling layer, for inset shadow & shine gradient
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.border-radius;
|
||||
box-shadow: inset 0 0 3px #631212;
|
||||
|
||||
background: -webkit-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=1 );
|
||||
}
|
||||
}
|
||||
|
||||
/* darker shadow for badged on active menus */
|
||||
#adminmenu li.current a .awaiting-mod,
|
||||
#adminmenu li a.wp-has-current-submenu .update-plugins {
|
||||
box-shadow: 0px 2px 2px #444 !important;
|
||||
}
|
||||
|
||||
/* a bit less padding on the number inside */
|
||||
#adminmenu li .awaiting-mod span,
|
||||
#adminmenu li span.update-plugins span,
|
||||
#sidemenu li a span.update-plugins span {
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Don't style comments badge with 0 comments
|
||||
//
|
||||
#wp-admin-bar-comments .ab-label.count-0 {
|
||||
font-size: 13px;
|
||||
background: none !important;
|
||||
border: none;
|
||||
box-shadow: none !important;
|
||||
text-shadow: none;
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&:before { display: none }
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================== */
|
||||
/* IE 8 Only Styles */
|
||||
/* ============================================================== */
|
||||
|
||||
.ie8 #adminmenu .awaiting-mod,
|
||||
.ie8 #adminmenu span.update-plugins,
|
||||
.ie8 #sidemenu li a span.update-plugins,
|
||||
.ie8 #sidemenu a .update-plugins,
|
||||
.ie8 #rightnow .reallynow,
|
||||
.ie8 #wp-admin-bar-updates .ab-label,
|
||||
.ie8 #wp-admin-bar-comments .ab-label {
|
||||
filter:
|
||||
progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=0 )
|
||||
progid:DXImageTransform.Microsoft.Shadow(color=#888888,direction=180,strength=3) /* box-shadow replacement, bottom */
|
||||
progid:DXImageTransform.Microsoft.Shadow(color=#b3b3b3,direction=90,strength=2) /* right */
|
||||
progid:DXImageTransform.Microsoft.Shadow(color=#b3b3b3,direction=270,strength=2) /* left */;
|
||||
}
|
||||
|
||||
/* darker shadow for badged on active menus */
|
||||
.ie8 #adminmenu li.current a .awaiting-mod,
|
||||
.ie8 #adminmenu li a.wp-has-current-submenu .update-plugins {
|
||||
filter:
|
||||
progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=0 )
|
||||
progid:DXImageTransform.Microsoft.Shadow(color=#444444,direction=180,strength=3) /* bottom */
|
||||
progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=90,strength=2) /* right */
|
||||
progid:DXImageTransform.Microsoft.Shadow(color=#666666,direction=270,strength=2) /* left */;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/////////////////////////////////////
|
||||
//
|
||||
// Badged
|
||||
// ------------------------
|
||||
// by Matthias Kretschmann
|
||||
// mkretschmann.com
|
||||
//
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
@import 'scaffolding.less';
|
||||
|
||||
// Select all instances of the WP notification bubble
|
||||
// using the same selectors WP uses
|
||||
#adminmenu .awaiting-mod,
|
||||
#adminmenu span.update-plugins,
|
||||
#sidemenu li a span.update-plugins,
|
||||
#sidemenu a .update-plugins,
|
||||
#rightnow .reallynow,
|
||||
#wp-admin-bar-updates .ab-label,
|
||||
#wp-admin-bar-comments .ab-label {
|
||||
|
||||
font-size: @font-size;
|
||||
font-weight: @font-weight;
|
||||
font-family: @font-family;
|
||||
line-height: @line-height;
|
||||
color: @font-color;
|
||||
text-align: center;
|
||||
|
||||
// WP defaults overwrites, need to be rude for these
|
||||
background: #ff0000 !important;
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,.2) !important;
|
||||
text-shadow: none !important;
|
||||
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
.border-radius(20px);
|
||||
display: inline-block;
|
||||
|
||||
margin-top: -2px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Don't style comments badge with 0 comments
|
||||
//
|
||||
#wp-admin-bar-comments .ab-label.count-0 {
|
||||
background: none !important;
|
||||
min-width: 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden ?>
|
|
@ -0,0 +1,57 @@
|
|||
/////////////////////////////////////
|
||||
// Scaffolding
|
||||
/////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
// Variables
|
||||
//
|
||||
|
||||
@font-size: 12px;
|
||||
@line-height: 20px;
|
||||
@font-weight: 200;
|
||||
@font-family: 'Helvetica Neue', Helvetica, Verdana, Geneva, sans-serif;
|
||||
@font-color: #fff;
|
||||
|
||||
@font-size-ios6: 11px;
|
||||
@line-height-ios6: 17px;
|
||||
@font-weight-ios6: normal;
|
||||
@font-family-ios6: Helvetica, Verdana, Geneva, sans-serif;
|
||||
@font-color-ios6: #fff;
|
||||
|
||||
@admin-border-color: #e3e3e3;
|
||||
|
||||
// High DPI Media Query
|
||||
@highDPI: ~"print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) ";
|
||||
|
||||
//
|
||||
// Mixins
|
||||
//
|
||||
|
||||
// Border Radius
|
||||
.border-radius(@radius: 10px) {
|
||||
border-radius: @radius;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
// Gradients
|
||||
#gradient {
|
||||
.vertical(@startColor: #555, @endColor: #333) {
|
||||
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
||||
background-image: linear-gradient(top, @startColor, @endColor); // The standard
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
}
|
||||
|
||||
// Transitions
|
||||
.transition(@transition: all .2s ease-in-out 0s) {
|
||||
-webkit-transition: @transition;
|
||||
transition: @transition;
|
||||
}
|
||||
|
||||
// Box sizing
|
||||
.box-sizing(@boxmodel) {
|
||||
-webkit-box-sizing: @boxmodel;
|
||||
-moz-box-sizing: @boxmodel;
|
||||
box-sizing: @boxmodel;
|
||||
}
|
|
@ -0,0 +1,421 @@
|
|||
<?php
|
||||
/**
|
||||
* Badged
|
||||
*
|
||||
* @package Badged
|
||||
* @author Matthias Kretschmann <m@kretschmann.io>
|
||||
* @license GPL-2.0+
|
||||
* @link http://kremalicious.com/badged/
|
||||
* @copyright 2014 Matthias Kretschmann
|
||||
*/
|
||||
|
||||
/**
|
||||
* Plugin class.
|
||||
*
|
||||
*
|
||||
* @package Badged
|
||||
* @author Matthias Kretschmann <m@kretschmann.io>
|
||||
*/
|
||||
class Badged {
|
||||
|
||||
/**
|
||||
* Plugin version, used for cache-busting of style and script file references.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '1.0.0';
|
||||
|
||||
/**
|
||||
*
|
||||
* Unique identifier.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
protected $plugin_slug = 'badged';
|
||||
|
||||
/**
|
||||
* Instance of this class.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var object
|
||||
*/
|
||||
protected static $instance = null;
|
||||
|
||||
/**
|
||||
* Slug of the plugin screen.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @var string
|
||||
*/
|
||||
protected $plugin_screen_hook_suffix = null;
|
||||
|
||||
/**
|
||||
* Initialize the plugin by loading scripts & styles and adding a
|
||||
* settings page and menu.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private function __construct() {
|
||||
|
||||
// Load plugin text domain
|
||||
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
||||
|
||||
// Activate plugin when new blog is added
|
||||
add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
|
||||
|
||||
// Load admin style sheets
|
||||
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
||||
|
||||
// Load admin bar style sheets
|
||||
if ( is_admin_bar_showing() ) {
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_adminbar_styles' ) );
|
||||
}
|
||||
|
||||
// Add the options page and menu item.
|
||||
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
|
||||
|
||||
// init settings, nicely isolated
|
||||
if ( ! empty ( $GLOBALS['pagenow'] )
|
||||
and ( 'options-general.php' === $GLOBALS['pagenow']
|
||||
or 'options.php' === $GLOBALS['pagenow']
|
||||
)
|
||||
) {
|
||||
add_action( 'admin_init', array( $this, 'initialize_badged_settings' ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an instance of this class.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return object A single instance of this class.
|
||||
*/
|
||||
public static function get_instance() {
|
||||
|
||||
// If the single instance hasn't been set, set it now.
|
||||
if ( null == self::$instance ) {
|
||||
self::$instance = new self;
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the plugin is activated.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @param boolean $network_wide True if WPMU superadmin uses
|
||||
* "Network Activate" action, false if
|
||||
* WPMU is disabled or plugin is
|
||||
* activated on an individual blog.
|
||||
*/
|
||||
public static function activate( $network_wide ) {
|
||||
|
||||
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
||||
|
||||
if ( $network_wide ) {
|
||||
|
||||
// Get all blog ids
|
||||
$blog_ids = self::get_blog_ids();
|
||||
|
||||
foreach ( $blog_ids as $blog_id ) {
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
self::single_activate();
|
||||
}
|
||||
|
||||
restore_current_blog();
|
||||
|
||||
} else {
|
||||
self::single_activate();
|
||||
}
|
||||
|
||||
} else {
|
||||
self::single_activate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when the plugin is deactivated.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @param boolean $network_wide True if WPMU superadmin uses
|
||||
* "Network Deactivate" action, false if
|
||||
* WPMU is disabled or plugin is
|
||||
* deactivated on an individual blog.
|
||||
*/
|
||||
public static function deactivate( $network_wide ) {
|
||||
|
||||
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
||||
|
||||
if ( $network_wide ) {
|
||||
|
||||
// Get all blog ids
|
||||
$blog_ids = self::get_blog_ids();
|
||||
|
||||
foreach ( $blog_ids as $blog_id ) {
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
self::single_deactivate();
|
||||
|
||||
}
|
||||
|
||||
restore_current_blog();
|
||||
|
||||
} else {
|
||||
self::single_deactivate();
|
||||
}
|
||||
|
||||
} else {
|
||||
self::single_deactivate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a new site is activated with a WPMU environment.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @param int $blog_id ID of the new blog.
|
||||
*/
|
||||
public function activate_new_site( $blog_id ) {
|
||||
|
||||
if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
self::single_activate();
|
||||
restore_current_blog();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all blog ids of blogs in the current network that are:
|
||||
* - not archived
|
||||
* - not spam
|
||||
* - not deleted
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return array|false The blog ids, false if no matches.
|
||||
*/
|
||||
private static function get_blog_ids() {
|
||||
|
||||
global $wpdb;
|
||||
|
||||
// get an array of blog ids
|
||||
$sql = "SELECT blog_id FROM $wpdb->blogs
|
||||
WHERE archived = '0' AND spam = '0'
|
||||
AND deleted = '0'";
|
||||
|
||||
return $wpdb->get_col( $sql );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired for each blog when the plugin is activated.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function single_activate() {
|
||||
|
||||
// construct the default option array
|
||||
$options = get_option('badged_settings');
|
||||
$options['style'] = 'ios7';
|
||||
|
||||
// set option
|
||||
update_option( 'badged_settings', $options );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired for each blog when the plugin is deactivated.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private static function single_deactivate() {
|
||||
|
||||
// deregister all settings
|
||||
unregister_setting(
|
||||
'badged_settings',
|
||||
'badged_settings'
|
||||
);
|
||||
|
||||
// clean up options in database
|
||||
delete_option('badged_settings');
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the plugin text domain for translation.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function load_plugin_textdomain() {
|
||||
|
||||
$domain = $this->plugin_slug;
|
||||
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
||||
|
||||
load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
||||
load_plugin_textdomain( $domain, FALSE, basename( BADGED_PATH ) . '/languages/' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register and enqueue admin-specific style sheet.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @return null Return early if no settings page is registered.
|
||||
*/
|
||||
public function enqueue_admin_styles() {
|
||||
|
||||
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$screen = get_current_screen();
|
||||
if ( $screen->id == $this->plugin_screen_hook_suffix ) {
|
||||
wp_register_style( $this->plugin_slug .'-admin-styles', BADGED_URL . 'admin/assets/css/admin.min.css', array(), self::VERSION );
|
||||
wp_enqueue_style( $this->plugin_slug .'-admin-styles' );
|
||||
}
|
||||
|
||||
$options = get_option( 'badged_settings' );
|
||||
|
||||
// Default Style
|
||||
if ( 'ios7' == $options['style'] ) {
|
||||
wp_register_style( $this->plugin_slug .'-badged-styles', BADGED_URL . 'admin/assets/css/badged.min.css', array(), self::VERSION );
|
||||
wp_enqueue_style( $this->plugin_slug .'-badged-styles' );
|
||||
}
|
||||
|
||||
// Old Style
|
||||
if ( 'ios6' == $options['style'] ) {
|
||||
wp_register_style( $this->plugin_slug .'-badged-styles', BADGED_URL . 'admin/assets/css/badged-ios6.min.css', array(), self::VERSION );
|
||||
wp_enqueue_style( $this->plugin_slug .'-badged-styles' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register and enqueue admin bar specific style sheet.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function enqueue_adminbar_styles() {
|
||||
|
||||
$options = get_option( 'badged_settings' );
|
||||
|
||||
// Default Style
|
||||
if ( 'ios7' == $options['style'] ) {
|
||||
wp_register_style( $this->plugin_slug .'-badged-styles', BADGED_URL . 'admin/assets/css/badged.min.css', array(), self::VERSION );
|
||||
wp_enqueue_style( $this->plugin_slug .'-badged-styles' );
|
||||
}
|
||||
|
||||
// Old Style
|
||||
if ( 'ios6' == $options['style'] ) {
|
||||
wp_register_style( $this->plugin_slug .'-badged-styles', BADGED_URL . 'admin/assets/css/badged-ios6.min.css', array(), self::VERSION );
|
||||
wp_enqueue_style( $this->plugin_slug .'-badged-styles' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function add_plugin_admin_menu() {
|
||||
|
||||
$this->plugin_screen_hook_suffix = add_options_page(
|
||||
__( 'Badged Settings', $this->plugin_slug ),
|
||||
__( 'Badged', $this->plugin_slug ),
|
||||
'manage_options',
|
||||
'badged_settings',
|
||||
array( $this, 'display_plugin_admin_page' )
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the settings page for this plugin.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function display_plugin_admin_page() {
|
||||
include_once( 'views/admin.php' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set default options
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function badged_default_settings() {
|
||||
|
||||
$defaults = array(
|
||||
'style' => 'ios7'
|
||||
);
|
||||
|
||||
return apply_filters( 'badged_default_settings', $defaults );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Register settings
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function initialize_badged_settings() {
|
||||
|
||||
if ( false == get_option( 'badged_settings' ) ) {
|
||||
add_option(
|
||||
'badged_settings',
|
||||
apply_filters(
|
||||
'badged_default_settings',
|
||||
$this->badged_default_settings()
|
||||
)
|
||||
);
|
||||
} // end if
|
||||
|
||||
add_settings_section(
|
||||
'badged_style_section',
|
||||
__( 'Style', 'badged' ),
|
||||
array( $this, 'badged_style_settings_callback' ),
|
||||
'badged_settings'
|
||||
);
|
||||
|
||||
add_settings_field(
|
||||
'Badged Style',
|
||||
__( 'Set Style', 'badged' ),
|
||||
array( $this, 'badged_style_settings_radios_callback' ),
|
||||
'badged_settings',
|
||||
'badged_style_section'
|
||||
);
|
||||
|
||||
register_setting(
|
||||
'badged_settings',
|
||||
'badged_settings'
|
||||
);
|
||||
}
|
||||
|
||||
public function badged_style_settings_callback() {
|
||||
echo '<p></p>';
|
||||
}
|
||||
|
||||
public function badged_style_settings_radios_callback() {
|
||||
|
||||
$options = get_option( 'badged_settings' );
|
||||
|
||||
$html = '<p class="radio-row">';
|
||||
$html .= '<input type="radio" id="style_ios7" name="badged_settings[style]" value="ios7"' . checked( 'ios7', $options['style'], false ) . '/>';
|
||||
$html .= ' ';
|
||||
$html .= '<label for="style_ios7">iOS 7</label>';
|
||||
$html .= '</p>';
|
||||
$html .= '<p class="radio-row">';
|
||||
$html .= '<input type="radio" id="style_ios6" name="badged_settings[style]" value="ios6"' . checked( 'ios6', $options['style'], false ) . '/>';
|
||||
$html .= ' ';
|
||||
$html .= '<label for="style_ios6">iOS 6</label>';
|
||||
$html .= '</p>';
|
||||
|
||||
echo $html;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* Represents the view for the administration dashboard.
|
||||
*
|
||||
* @package Badged
|
||||
* @author Matthias Kretschmann <m@kretschmann.io>
|
||||
* @license GPL-2.0+
|
||||
* @link http://kremalicious.com/badged/
|
||||
* @copyright 2014 Matthias Kretschmann
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="wrap" id="badgedoptions">
|
||||
<header>
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
||||
</header>
|
||||
|
||||
<form action="options.php" method="POST">
|
||||
<?php
|
||||
settings_fields( 'badged_settings' );
|
||||
do_settings_sections( 'badged_settings' );
|
||||
|
||||
submit_button(); ?>
|
||||
</form>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
<?php _e('Thanks for using', 'badged'); ?> <a href="https://kremalicious.com/badged/" title="Badged Blog Post">Badged</a> (<a href="https://github.com/kremalicious/Badged/" title="Badged On Github">github</a>) · <a href="http://krlc.us/givecoffee"><strong><?php _e('Donate', 'badged'); ?></strong></a>
|
||||
<span class="alignright"><?php _e('Created by', 'badged'); ?> <a class="kremalicious-link" href="http://mkretschmann.com"><span class="kremalicious"></span> Matthias Kretschmann</a> (<a href="https://twitter.com/kremalicious">@kremalicious</a>)</span>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden ?>
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
/**
|
||||
* Badged
|
||||
*
|
||||
* Transforms the standard WordPress update & comment notification badges into iOS-styled ones.
|
||||
* Just activate and enjoy the red badges.
|
||||
*
|
||||
* @package Badged
|
||||
* @author Matthias Kretschmann <m@kretschmann.io>
|
||||
* @license GPL-2.0+
|
||||
* @link http://kremalicious.com/badged/
|
||||
* @copyright 2014 Matthias Kretschmann
|
||||
*
|
||||
* @wordpress-plugin
|
||||
* Plugin Name: Badged
|
||||
* Plugin URI: http://kremalicious.com/badged/
|
||||
* 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: 1.0.1
|
||||
* License: GPL-2.0+
|
||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
* Domain Path: /languages
|
||||
* Text Domain: badged
|
||||
* GitHub Plugin URI: https://github.com/kremalicious/Badged
|
||||
*/
|
||||
|
||||
// If this file is called directly, abort.
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the plugin work if symlinked
|
||||
*
|
||||
* Thanks to:
|
||||
* http://alexking.org/blog/2011/12/15/wordpress-plugins-and-symlinks
|
||||
*
|
||||
* @since 0.3.2
|
||||
*
|
||||
*/
|
||||
|
||||
$badged_plugin_file = __FILE__;
|
||||
|
||||
if (isset($plugin)) {
|
||||
$badged_plugin_file = $plugin;
|
||||
}
|
||||
else if (isset($mu_plugin)) {
|
||||
$badged_plugin_file = $mu_plugin;
|
||||
}
|
||||
else if (isset($network_plugin)) {
|
||||
$badged_plugin_file = $network_plugin;
|
||||
}
|
||||
|
||||
// Define constants
|
||||
if ( ! defined( 'BADGED_FILE' ) ){
|
||||
define('BADGED_FILE', $badged_plugin_file);
|
||||
}
|
||||
if ( ! defined( 'BADGED_URL' ) ){
|
||||
define('BADGED_URL', plugin_dir_url($badged_plugin_file));
|
||||
}
|
||||
if ( ! defined( 'BADGED_PATH' ) ){
|
||||
define('BADGED_PATH', WP_PLUGIN_DIR.'/'.basename(dirname($badged_plugin_file)).'/');
|
||||
}
|
||||
if ( ! defined( 'BADGED_BASENAME' ) ){
|
||||
define('BADGED_BASENAME', plugin_basename( $badged_plugin_file ));
|
||||
}
|
||||
|
||||
/**
|
||||
* Let's roll
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
*/
|
||||
|
||||
require_once( BADGED_PATH . '/admin/class-badged-admin.php' );
|
||||
add_action( 'plugins_loaded', array( 'Badged', 'get_instance' ) );
|
||||
|
||||
register_activation_hook( $badged_plugin_file, array( 'Badged', 'activate' ) );
|
||||
register_deactivation_hook( $badged_plugin_file, array( 'Badged', 'deactivate' ) );
|
|
@ -0,0 +1,76 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: POEditor.com\n"
|
||||
"Project-Id-Version: Badged\n"
|
||||
"Language: de\n"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:330
|
||||
msgid "Badged Settings"
|
||||
msgstr "Badged Einstellungen"
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:30
|
||||
msgid "Created by"
|
||||
msgstr "Erstellt von"
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:29
|
||||
msgid "Thanks for using"
|
||||
msgstr "Danke für die Nutzung von"
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:29
|
||||
msgid "Donate"
|
||||
msgstr "Spenden"
|
||||
|
||||
#. translators: plugin header field 'Name'
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:331
|
||||
#: badged.php:0
|
||||
msgid "Badged"
|
||||
msgstr "Badged"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:379
|
||||
msgid "Style"
|
||||
msgstr "Stil"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:386
|
||||
msgid "Set Style"
|
||||
msgstr "Stil setzen"
|
||||
|
||||
#. translators: plugin header field 'PluginURI'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "http://kremalicious.com/badged/"
|
||||
msgstr "http://kremalicious.com/badged/"
|
||||
|
||||
#. translators: plugin header field 'Description'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "Transforms the standard WordPress update & comment notification badges into iOS-styled ones. Just activate and enjoy the red badges."
|
||||
msgstr "Wandelt die Standard WordPress Kommentar- und Aktualisierungs-Benachrichtigungen im iOS-Stil um. Einfach aktivieren und die roten Benachrichtigungen genießen."
|
||||
|
||||
#. translators: plugin header field 'Author'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "Matthias Kretschmann"
|
||||
msgstr "Matthias Kretschmann"
|
||||
|
||||
#. translators: plugin header field 'AuthorURI'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "http://matthiaskretschmann.com"
|
||||
msgstr "http://matthiaskretschmann.com"
|
||||
|
||||
#. translators: plugin header field 'Version'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "1.0.0"
|
||||
msgstr "1.0.0"
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.5.5\n"
|
||||
"Project-Id-Version: Badged\n"
|
||||
"Language: en-us\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:330
|
||||
msgid "Badged Settings"
|
||||
msgstr "Ajustes de Badged "
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:30
|
||||
msgid "Created by"
|
||||
msgstr "Creado por"
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:29
|
||||
msgid "Thanks for using"
|
||||
msgstr "Gracias por usar"
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:29
|
||||
msgid "Donate"
|
||||
msgstr "Donar"
|
||||
|
||||
#. translators: plugin header field 'Name'
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:331 badged.php:0
|
||||
msgid "Badged"
|
||||
msgstr "Badged"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:379
|
||||
msgid "Style"
|
||||
msgstr "Estilo"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:386
|
||||
msgid "Set Style"
|
||||
msgstr "Modificar Estilo"
|
||||
|
||||
#. translators: plugin header field 'PluginURI'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "http://kremalicious.com/badged/"
|
||||
msgstr "http://kremalicious.com/badged/"
|
||||
|
||||
#. translators: plugin header field 'Description'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid ""
|
||||
"Transforms the standard WordPress update & comment notification badges into "
|
||||
"iOS-styled ones. Just activate and enjoy the red badges."
|
||||
msgstr ""
|
||||
"Transforma la actualización de WordPress y los badges de notificaciones de "
|
||||
"comentarios y actualizaciones en unos con estilo iOS. Basta con activar y "
|
||||
"disfrutar de las insignias rojas."
|
||||
|
||||
#. translators: plugin header field 'Author'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "Matthias Kretschmann"
|
||||
msgstr "Matthias Kretschmann"
|
||||
|
||||
#. translators: plugin header field 'AuthorURI'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "http://matthiaskretschmann.com"
|
||||
msgstr "http://matthiaskretschmann.com"
|
||||
|
||||
#. translators: plugin header field 'Version'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "1.0.0"
|
||||
msgstr "1.0.0"
|
|
@ -0,0 +1,76 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: POEditor.com\n"
|
||||
"Project-Id-Version: Badged\n"
|
||||
"Language: en-us\n"
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:330
|
||||
msgid "Badged Settings"
|
||||
msgstr ""
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:30
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:29
|
||||
msgid "Thanks for using"
|
||||
msgstr ""
|
||||
|
||||
#. badged
|
||||
#: admin/views/admin.php:29
|
||||
msgid "Donate"
|
||||
msgstr ""
|
||||
|
||||
#. translators: plugin header field 'Name'
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:331
|
||||
#: badged.php:0
|
||||
msgid "Badged"
|
||||
msgstr ""
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:379
|
||||
msgid "Style"
|
||||
msgstr ""
|
||||
|
||||
#. badged
|
||||
#: admin/class-badged-admin.php:386
|
||||
msgid "Set Style"
|
||||
msgstr ""
|
||||
|
||||
#. translators: plugin header field 'PluginURI'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "http://kremalicious.com/badged/"
|
||||
msgstr ""
|
||||
|
||||
#. translators: plugin header field 'Description'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "Transforms the standard WordPress update & comment notification badges into iOS-styled ones. Just activate and enjoy the red badges."
|
||||
msgstr ""
|
||||
|
||||
#. translators: plugin header field 'Author'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "Matthias Kretschmann"
|
||||
msgstr ""
|
||||
|
||||
#. translators: plugin header field 'AuthorURI'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "http://matthiaskretschmann.com"
|
||||
msgstr ""
|
||||
|
||||
#. translators: plugin header field 'Version'
|
||||
#. badged
|
||||
#: badged.php:0
|
||||
msgid "1.0.0"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden ?>
|
|
@ -0,0 +1,91 @@
|
|||
=== Badged ===
|
||||
Contributors: kremalicious
|
||||
Donate link: http://krlc.us/givecoffee
|
||||
Tags: notification, adminmenu, toolbar, adminbar, ios, badge, badged, badges
|
||||
Requires at least: 2.7
|
||||
Tested up to: 4.0
|
||||
Stable tag: 1.0.1
|
||||
|
||||
iOS Style Notification Badges for WordPress
|
||||
|
||||
== Description ==
|
||||
|
||||
Badged transforms the standard WordPress update & comment notification badges into iOS-styled ones. Upon activation it automatically replaces the badge styles in the admin menu and the toolbar. An optional settings page allows to control whether the badges show up as the new default iOS style or styled as pre-iOS 7 badges.
|
||||
|
||||
The badges are created without any images by using only CSS (box shadows, gradients, pseudo elements, you name it) and were tested in current versions of Safari, Chrome, Firefox, Opera & Internet Explorer. It should degrade gracefully in older browsers with some details missing like drop shadows or the highlight shine.
|
||||
|
||||
The plugin is localized in english, german & spanish.
|
||||
|
||||
* * *
|
||||
|
||||
[Badged Blog Post](http://kremalicious.com/badged/) | [Badged on github](https://github.com/kremalicious/badged) | [Donate](http://krlc.us/givecoffee)
|
||||
|
||||
|
||||
== Installation ==
|
||||
|
||||
Just install using the automatic backend installer under Plugins > Add New, activate and enjoy the red badges.
|
||||
|
||||
For manual installation:
|
||||
|
||||
1. Upload the badged plugin folder to the '/wp-content/plugins/' directory
|
||||
2. Activate the plugin through the 'Plugins' menu in WordPress
|
||||
3. Enjoy
|
||||
|
||||
(optional) Adjust options under Settings > Badges
|
||||
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Restyled notifications in Admin Menu
|
||||
2. Restyled notifications in Admin Bar
|
||||
3. Settings page
|
||||
4. Restyled pre-iOS 7 notifications in Admin Menu
|
||||
5. Restyled pre-iOS 7 notifications in Admin Bar
|
||||
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= v1.0.1 =
|
||||
|
||||
* tested for WP 4.0
|
||||
* Spanish translation, muchas gracias to Andrew Kurtis from [webhostinghub.com](http://www.webhostinghub.com)
|
||||
* don't style comments badge with 0 comments
|
||||
* improved styles
|
||||
* admin settings page fixes
|
||||
* plugin icon and updated banner & screenshots
|
||||
|
||||
= v1.0.0 =
|
||||
* new default style based on iOS 7
|
||||
* new setting to switch back to pre-iOS 7 style
|
||||
* rewritten from the ground up based on Tom McFarlin's excellent [WordPress Plugin Boilerplate](https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate)
|
||||
* settings through WordPress Settings API
|
||||
* Retina banner for WordPress plugin repository listing
|
||||
* drop IE 8 support (still present in pre-iOS 7 style)
|
||||
* using Grunt for optimized images and minified css
|
||||
* confusing and ridiculous version number jump
|
||||
|
||||
= v0.3.6 =
|
||||
* tested for WP 3.4
|
||||
* settings page: Retina ready icon for high dpi devices, css only submit button
|
||||
* updated german translation
|
||||
|
||||
= v0.3.5 =
|
||||
* IE 8 improvements: box shadow, light gradient through DXImageTransform filters (but no rounded corners, sorry)
|
||||
* current versions of IE & Opera are now among the tested browsers
|
||||
* updated settings page links
|
||||
|
||||
= v0.3.4 =
|
||||
* more descriptive readme and settings footer with links to blog post & github page
|
||||
* updated translation
|
||||
|
||||
= v0.3.2 =
|
||||
* Make the plugin work if symlinked
|
||||
|
||||
= v0.3 =
|
||||
* initial beta release
|
||||
|
||||
= v0.2 =
|
||||
* added options to control whether the badges show up in admin menu or toolbar (default is both)
|
||||
|
||||
= v0.1 =
|
||||
* initial alpha release
|
|
@ -1,69 +0,0 @@
|
|||
|
||||
/* ============================================================== */
|
||||
/* Badged */
|
||||
/* ------------------------ */
|
||||
/* CSS Styles for the Admin Bar only */
|
||||
/* by Matthias Kretschmann | http://mkretschmann.com */
|
||||
/* ============================================================== */
|
||||
|
||||
#wp-admin-bar-updates .ab-label,
|
||||
#wp-admin-bar-comments .ab-label {
|
||||
background-color: #d5231f !important;
|
||||
color: #fff; /* just in case, is white per WP default */
|
||||
font: 11px/15px Helvetica, Verdana, Geneva, sans-serif;
|
||||
text-shadow: 0 1px 1px #771717;
|
||||
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.3)), color-stop(100%,rgba(255,255,255,0)));
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
background-image: linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=0 );
|
||||
|
||||
border: 2px solid #fff;
|
||||
-webkit-border-radius: 10px; /* just in case, is 10px per WP default */
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
|
||||
margin-top: -1px;
|
||||
|
||||
padding: 0 3px;
|
||||
position: relative;
|
||||
-webkit-box-shadow: 0px 2px 2px #000 !important;
|
||||
-moz-box-shadow: 0px 2px 2px #000 !important;
|
||||
box-shadow: 0px 2px 2px #000 !important;
|
||||
}
|
||||
|
||||
|
||||
/* inject another styling layer, for inset shadow & shine gradient */
|
||||
#wp-admin-bar-updates .ab-label:before,
|
||||
#wp-admin-bar-comments .ab-label:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
|
||||
-webkit-box-shadow: inset 0 0 3px #631212;
|
||||
-moz-box-shadow: inset 0 0 3px #631212;
|
||||
box-shadow: inset 0 0 3px #631212;
|
||||
|
||||
background: -moz-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.3) 59%, rgba(255,255,255,0) 65%, rgba(255,255,255,0) 100%);
|
||||
background: -webkit-gradient(radial, center -5px, 0px, center -5px, 100%, color-stop(0%,rgba(255,255,255,0.3)), color-stop(59%,rgba(255,255,255,0.3)), color-stop(65%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,0)));
|
||||
background: -webkit-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: -o-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: -ms-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=1 );
|
||||
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
|
||||
/* ============================================================== */
|
||||
/* Badged */
|
||||
/* ------------------------ */
|
||||
/* CSS Styles for the Admin Menu only */
|
||||
/* by Matthias Kretschmann | http://mkretschmann.com */
|
||||
/* ============================================================== */
|
||||
|
||||
|
||||
/* Select all instances of the WP notification bubble using the
|
||||
same selectors WP uses */
|
||||
|
||||
#adminmenu .awaiting-mod,
|
||||
#adminmenu span.update-plugins,
|
||||
#sidemenu li a span.update-plugins,
|
||||
#sidemenu a .update-plugins,
|
||||
#rightnow .reallynow {
|
||||
/* need to be rude for these */
|
||||
background-color: #d5231f !important;
|
||||
-webkit-box-shadow: 0px 2px 2px #888 !important;
|
||||
-moz-box-shadow: 0px 2px 2px #888 !important;
|
||||
box-shadow: 0px 2px 2px #888 !important;
|
||||
|
||||
color: #fff; /* just in case, is white per WP default */
|
||||
font: 11px/15px Helvetica, Verdana, Geneva, sans-serif;
|
||||
text-shadow: 0 1px 1px #771717;
|
||||
|
||||
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0.3)), color-stop(100%,rgba(255,255,255,0)));
|
||||
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
background-image: -o-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
background-image: linear-gradient(top, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=0 );
|
||||
|
||||
border: 2px solid #fff;
|
||||
-webkit-border-radius: 10px; /* just in case, is 10px per WP default */
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
-moz-box-shadow: 0px 2px 2px #444 !important;
|
||||
box-shadow: 0px 2px 2px #444 !important;
|
||||
}
|
||||
|
||||
/* inject another styling layer, for inset shadow & shine gradient */
|
||||
#adminmenu .awaiting-mod:before,
|
||||
#adminmenu .update-plugins:before,
|
||||
#sidemenu .update-plugins:before,
|
||||
.reallynow:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
-webkit-border-radius: 10px;
|
||||
-moz-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
|
||||
-webkit-box-shadow: inset 0 0 3px #631212;
|
||||
-moz-box-shadow: inset 0 0 3px #631212;
|
||||
box-shadow: inset 0 0 3px #631212;
|
||||
|
||||
background: -moz-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.3) 59%, rgba(255,255,255,0) 65%, rgba(255,255,255,0) 100%);
|
||||
background: -webkit-gradient(radial, center -5px, 0px, center -5px, 100%, color-stop(0%,rgba(255,255,255,0.3)), color-stop(59%,rgba(255,255,255,0.3)), color-stop(65%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,0)));
|
||||
background: -webkit-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: -o-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: -ms-radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
background: radial-gradient(center -5px, circle, rgba(255,255,255,0.3) 0%,rgba(255,255,255,0.3) 59%,rgba(255,255,255,0) 65%,rgba(255,255,255,0) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4dffffff', endColorstr='#00ffffff',GradientType=1 );
|
||||
|
||||
}
|
||||
|
||||
/* a bit less padding on the number inside */
|
||||
#adminmenu li .awaiting-mod span,
|
||||
#adminmenu li span.update-plugins span,
|
||||
#sidemenu li a span.update-plugins span {
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* ============================================================== */
|
||||
/* The Options Page */
|
||||
/* ============================================================== */
|
||||
|
||||
#badgedoptions form h2 {
|
||||
border-bottom: 1px solid #eee;
|
||||
border-top: 1px solid #eee;
|
||||
margin-top: .5em;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#badgedoptions footer {
|
||||
border-top: 1px solid #eee;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#badgedoptions .icon32 {
|
||||
background-image: url(../img/icon-badged-32.png);
|
||||
background-repeat: no-repeat;
|
||||
}
|
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 261 KiB |
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,61 +0,0 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Poedit-Language: \n"
|
||||
"X-Poedit-Country: \n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
||||
"X-Poedit-Basepath: \n"
|
||||
"X-Poedit-Bookmarks: \n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Textdomain-Support: yes"
|
||||
|
||||
#: badged-settings.php:5
|
||||
#@ bdgd
|
||||
msgid "Badged Settings"
|
||||
msgstr "Badged Einstellungen"
|
||||
|
||||
#: 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.php:68
|
||||
#@ default
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
|
||||
#: badged-settings.php:41
|
||||
#@ bdgd
|
||||
msgid "Thanks for using Badged"
|
||||
msgstr "Danke für die Nutzung von Badged"
|
||||
|
||||
#: badged-settings.php:41
|
||||
#@ bdgd
|
||||
msgid "Created by"
|
||||
msgstr "Erstellt von"
|
||||
|
|
@ -1 +0,0 @@
|
|||
MIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "Badged",
|
||||
"author": "Matthias Kretschmann <m@kretschmann.io>",
|
||||
"description": "iOS Style Notification Badges for WordPress",
|
||||
"version": "1.0.1",
|
||||
"main": "Gruntfile.js",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-imagemin": "~0.1.4",
|
||||
"grunt-contrib-less": "~0.6.4",
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
"grunt-svgmin": "~1.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:kremalicious/Badged.git"
|
||||
}
|
||||
}
|
44
readme.txt
|
@ -1,44 +0,0 @@
|
|||
=== Badged ===
|
||||
Contributors: kremalicious
|
||||
Donate link: http://kremalicious.com/
|
||||
Tags: notification, adminmenu, toolbar, ios, badge
|
||||
Requires at least: 2.7
|
||||
Tested up to: 3.3
|
||||
Stable tag: 0.3.2
|
||||
|
||||
iOS Style Notification Badges for WordPress
|
||||
|
||||
== Description ==
|
||||
|
||||
Badged transforms the standard WordPress update & comment notification badges into iOS-styled ones.
|
||||
|
||||
The badges are CSS only and were tested in current versions of Safari, Chrome & Firefox. It should degrade gracefully in older Browsers with some details missing like drop shadows or the highlight shine.
|
||||
|
||||
|
||||
== Installation ==
|
||||
|
||||
Just install, activate and enjoy the red badges:
|
||||
|
||||
1. Upload the badged plugin folder to the '/wp-content/plugins/' directory
|
||||
2. Activate the plugin through the 'Plugins' menu in WordPress
|
||||
3. Enjoy
|
||||
|
||||
(optional) Adjust options under Settings > Badges
|
||||
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Restyled notifications in Toolbar
|
||||
2. Restyled notifications in Admin Menu
|
||||
3. Settings page
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= v0.3 =
|
||||
* initial beta release
|
||||
|
||||
= v0.2 =
|
||||
* added options to control whether the badges show up in admin menu or toolbar (default is both)
|
||||
|
||||
= v0.1 =
|
||||
* initial alpha release
|
BIN
screenshot-3.png
Before Width: | Height: | Size: 14 KiB |