cleanup
This commit is contained in:
parent
8123122e7f
commit
c93dd3541a
|
@ -3,8 +3,8 @@ Contributors: kremalicious
|
||||||
Donate link: http://krlc.us/givecoffee
|
Donate link: http://krlc.us/givecoffee
|
||||||
Tags: notification, adminmenu, toolbar, ios, badge
|
Tags: notification, adminmenu, toolbar, ios, badge
|
||||||
Requires at least: 2.7
|
Requires at least: 2.7
|
||||||
Tested up to: 3.4
|
Tested up to: 3.8
|
||||||
Stable tag: 0.3.6
|
Stable tag: 1.0.0
|
||||||
|
|
||||||
iOS Style Notification Badges for WordPress
|
iOS Style Notification Badges for WordPress
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
/* Badged */
|
/* Badged pre-iOS7 styles */
|
||||||
/* ------------------------ */
|
/* ------------------------ */
|
||||||
/* CSS Styles for the Admin Menu only */
|
|
||||||
/* by Matthias Kretschmann | http://mkretschmann.com */
|
/* by Matthias Kretschmann | http://mkretschmann.com */
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
/* Badged */
|
/* Badged */
|
||||||
/* ------------------------ */
|
/* ------------------------ */
|
||||||
/* CSS Styles for the Admin Menu only */
|
|
||||||
/* by Matthias Kretschmann | http://mkretschmann.com */
|
/* by Matthias Kretschmann | http://mkretschmann.com */
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
|
|
||||||
|
|
|
@ -21,16 +21,16 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Plugin version, used for cache-busting of style and script file references.
|
* Plugin version, used for cache-busting of style and script file references.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
const VERSION = '2.0.0';
|
const VERSION = '1.0.0';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Unique identifier.
|
* Unique identifier.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $plugin_slug = 'badged';
|
protected $plugin_slug = 'badged';
|
||||||
|
@ -38,7 +38,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Instance of this class.
|
* Instance of this class.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @var object
|
* @var object
|
||||||
*/
|
*/
|
||||||
protected static $instance = null;
|
protected static $instance = null;
|
||||||
|
@ -46,7 +46,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Slug of the plugin screen.
|
* Slug of the plugin screen.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $plugin_screen_hook_suffix = null;
|
protected $plugin_screen_hook_suffix = null;
|
||||||
|
@ -55,7 +55,7 @@ class Badged {
|
||||||
* Initialize the plugin by loading scripts & styles and adding a
|
* Initialize the plugin by loading scripts & styles and adding a
|
||||||
* settings page and menu.
|
* settings page and menu.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private function __construct() {
|
private function __construct() {
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Return an instance of this class.
|
* Return an instance of this class.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @return object A single instance of this class.
|
* @return object A single instance of this class.
|
||||||
*/
|
*/
|
||||||
public static function get_instance() {
|
public static function get_instance() {
|
||||||
|
@ -106,7 +106,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Fired when the plugin is activated.
|
* Fired when the plugin is activated.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @param boolean $network_wide True if WPMU superadmin uses
|
* @param boolean $network_wide True if WPMU superadmin uses
|
||||||
* "Network Activate" action, false if
|
* "Network Activate" action, false if
|
||||||
* WPMU is disabled or plugin is
|
* WPMU is disabled or plugin is
|
||||||
|
@ -142,7 +142,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Fired when the plugin is deactivated.
|
* Fired when the plugin is deactivated.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @param boolean $network_wide True if WPMU superadmin uses
|
* @param boolean $network_wide True if WPMU superadmin uses
|
||||||
* "Network Deactivate" action, false if
|
* "Network Deactivate" action, false if
|
||||||
* WPMU is disabled or plugin is
|
* WPMU is disabled or plugin is
|
||||||
|
@ -179,7 +179,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Fired when a new site is activated with a WPMU environment.
|
* Fired when a new site is activated with a WPMU environment.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @param int $blog_id ID of the new blog.
|
* @param int $blog_id ID of the new blog.
|
||||||
*/
|
*/
|
||||||
public function activate_new_site( $blog_id ) {
|
public function activate_new_site( $blog_id ) {
|
||||||
|
@ -200,7 +200,7 @@ class Badged {
|
||||||
* - not spam
|
* - not spam
|
||||||
* - not deleted
|
* - not deleted
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @return array|false The blog ids, false if no matches.
|
* @return array|false The blog ids, false if no matches.
|
||||||
*/
|
*/
|
||||||
private static function get_blog_ids() {
|
private static function get_blog_ids() {
|
||||||
|
@ -219,7 +219,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Fired for each blog when the plugin is activated.
|
* Fired for each blog when the plugin is activated.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static function single_activate() {
|
private static function single_activate() {
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Fired for each blog when the plugin is deactivated.
|
* Fired for each blog when the plugin is deactivated.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private static function single_deactivate() {
|
private static function single_deactivate() {
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Load the plugin text domain for translation.
|
* Load the plugin text domain for translation.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function load_plugin_textdomain() {
|
public function load_plugin_textdomain() {
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Register and enqueue admin-specific style sheet.
|
* Register and enqueue admin-specific style sheet.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
* @return null Return early if no settings page is registered.
|
* @return null Return early if no settings page is registered.
|
||||||
*/
|
*/
|
||||||
public function enqueue_admin_styles() {
|
public function enqueue_admin_styles() {
|
||||||
|
@ -300,7 +300,7 @@ class Badged {
|
||||||
/**
|
/**
|
||||||
* Register and enqueue admin bar specific style sheet.
|
* Register and enqueue admin bar specific style sheet.
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function enqueue_adminbar_styles() {
|
public function enqueue_adminbar_styles() {
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ class Badged {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function add_plugin_admin_menu() {
|
public function add_plugin_admin_menu() {
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ class Badged {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render the settings page for this plugin.
|
* Render the settings page for this plugin.
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function display_plugin_admin_page() {
|
public function display_plugin_admin_page() {
|
||||||
include_once( 'views/admin.php' );
|
include_once( 'views/admin.php' );
|
||||||
|
@ -346,7 +346,7 @@ class Badged {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set default options
|
* Set default options
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function badged_default_settings() {
|
public function badged_default_settings() {
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ class Badged {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register settings
|
* Register settings
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function initialize_badged_settings() {
|
public function initialize_badged_settings() {
|
||||||
|
|
||||||
|
@ -418,30 +418,4 @@ class Badged {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add settings action link to the plugins page.
|
|
||||||
*
|
|
||||||
* @since 2.0.0
|
|
||||||
*/
|
|
||||||
public function add_action_links( $links ) {
|
|
||||||
|
|
||||||
return array_merge(
|
|
||||||
array(
|
|
||||||
'settings' => '<a href="' . admin_url( 'options-general.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>'
|
|
||||||
),
|
|
||||||
$links
|
|
||||||
);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* WordPress Actions: http://codex.wordpress.org/Plugin_API#Actions
|
|
||||||
* Action Reference: http://codex.wordpress.org/Plugin_API/Action_Reference
|
|
||||||
*
|
|
||||||
* @since 2.0.0
|
|
||||||
*/
|
|
||||||
public function action_method_name() {
|
|
||||||
// TODO: Define your action hook callback here
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,9 +2,6 @@
|
||||||
/**
|
/**
|
||||||
* Represents the view for the administration dashboard.
|
* Represents the view for the administration dashboard.
|
||||||
*
|
*
|
||||||
* This includes the header, options, and other information that should provide
|
|
||||||
* The User Interface to the end user.
|
|
||||||
*
|
|
||||||
* @package Badged
|
* @package Badged
|
||||||
* @author Matthias Kretschmann <m@kretschmann.io>
|
* @author Matthias Kretschmann <m@kretschmann.io>
|
||||||
* @license GPL-2.0+
|
* @license GPL-2.0+
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Description: Transforms the standard WordPress update & comment notification badges into iOS-styled ones. Just activate and enjoy the red badges.
|
* Description: Transforms the standard WordPress update & comment notification badges into iOS-styled ones. Just activate and enjoy the red badges.
|
||||||
* Author: Matthias Kretschmann
|
* Author: Matthias Kretschmann
|
||||||
* Author URI: http://matthiaskretschmann.com
|
* Author URI: http://matthiaskretschmann.com
|
||||||
* Version: 2.0.0
|
* Version: 1.0.0
|
||||||
* License: GPL-2.0+
|
* License: GPL-2.0+
|
||||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||||
* Domain Path: /languages
|
* Domain Path: /languages
|
||||||
|
@ -68,16 +68,12 @@ if ( ! defined( 'BADGED_BASENAME' ) ){
|
||||||
/**
|
/**
|
||||||
* Let's roll
|
* Let's roll
|
||||||
*
|
*
|
||||||
* @since 2.0.0
|
* @since 1.0.0
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
|
|
||||||
|
|
||||||
require_once( BADGED_PATH . '/admin/class-badged-admin.php' );
|
require_once( BADGED_PATH . '/admin/class-badged-admin.php' );
|
||||||
add_action( 'plugins_loaded', array( 'Badged', 'get_instance' ) );
|
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' ) );
|
|
||||||
|
|
||||||
//}
|
register_activation_hook( $badged_plugin_file, array( 'Badged', 'activate' ) );
|
||||||
|
register_deactivation_hook( $badged_plugin_file, array( 'Badged', 'deactivate' ) );
|
||||||
|
|
|
@ -3,8 +3,8 @@ Contributors: kremalicious
|
||||||
Donate link: http://krlc.us/givecoffee
|
Donate link: http://krlc.us/givecoffee
|
||||||
Tags: notification, adminmenu, toolbar, ios, badge
|
Tags: notification, adminmenu, toolbar, ios, badge
|
||||||
Requires at least: 2.7
|
Requires at least: 2.7
|
||||||
Tested up to: 3.4
|
Tested up to: 3.8
|
||||||
Stable tag: 0.3.6
|
Stable tag: 1.0.0
|
||||||
|
|
||||||
iOS Style Notification Badges for WordPress
|
iOS Style Notification Badges for WordPress
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue