From 0eeb46407db654d5a27bf3873aa03f04efa8f1dc Mon Sep 17 00:00:00 2001 From: 2ndkauboy Date: Tue, 28 Jun 2016 23:42:12 +0200 Subject: [PATCH] some minor code improvements and removing the readme.txt file which is no longer needed for the w.org plugin repo --- README.md | 46 +++++++++++++++++++++++++++++++++++++++++++-- apermo-adminbar.php | 40 +++++++++++++++++++++------------------ index.php | 5 +---- readme.txt | 44 ------------------------------------------- 4 files changed, 67 insertions(+), 68 deletions(-) delete mode 100644 readme.txt diff --git a/README.md b/README.md index 8e921ad..f089491 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ -# apermo-adminbar -This is a WordPress plugin, that adds links between your different development versions of your website. +# Apermo AdminBar # +* Contributors: apermo +* Tags: admin bar, admin, development, staging +* Requires at least: 4.0 +* Tested up to: 4.5.3 +* Stable tag: 0.9.0 +* License: GNU General Public License v2 or later +* License URI: http://www.gnu.org/licenses/gpl-2.0.html + +This plugin lets allows you to add links between a development, staging and live version of your website, and adds them to the AdminBar + +## Description ## + +This plugin alters the AdminBar and adds links to development, staging and live version of your website, furthermore it allows you to choose a color scheme of your AdminBar for all users on a website, including the frontend + +If you want to participate in the development [head over to GitHub](https://github.com/apermo/apermo-adminbar)! + +## Installation ## + +1. Upload the plugin files to the `/wp-content/plugins/apermo-adminbar` directory, or install the plugin through the WordPress plugins screen directly. +2. Activate the 'Apermo AdminBar' plugin through the 'Plugins' menu in WordPress +3. Open Settings -> Apermo AdminBar to set up the links and colors (currently you have to repeat this on all sites) + +## Frequently Asked Questions ## + +### How can I help with the development of this plugin? ### +Head over to the [GitHub Repository](https://github.com/apermo/apermo-adminbar) and start reading. Every bit of help is highly appreciated! + +### I have more than 3 sites, can I add more? ### +You can do so with `add_filter( 'ap-ab-type', 'your_filter' );` + +### I want more color schemes! ### +Feel free to add more, there are other plugins that do so. Or have a look at [wp_admin_css_color() in the WordPress Codex](https://codex.wordpress.org/Function_Reference/wp_admin_css_color) + +## Changelog ## + +### 0.9.2 ### +* Some minor code improvements + +### 0.9.1 ### +* Bug fixes and optimizations - Thanks to @kau-boy for the help + +### 0.9.0 ### +* Initial Release \ No newline at end of file diff --git a/apermo-adminbar.php b/apermo-adminbar.php index a4baa44..f37edf2 100644 --- a/apermo-adminbar.php +++ b/apermo-adminbar.php @@ -3,9 +3,8 @@ * Apermo Adminbar * * @package apermo-adminbar - */ - -/** + * + * @wordpress-plugin * Plugin Name: Apermo Admin Bar * Version: 0.9.1 * Description: A simple plugin that allows you to add custom links to the admin bar, navigation between your live and dev systems @@ -13,7 +12,8 @@ * Author URI: http://apermo.de/ * Text Domain: apermo-adminbar * Domain Path: /languages/ - * License: GPL v3 + * License: GPL-2.0+ + * License URI: http://www.gnu.org/licenses/gpl-2.0.html */ /** @@ -74,7 +74,7 @@ class ApermoAdminBar { */ public function __construct() { $this->sites = get_option( 'apermo_adminbar_sites', array() ); - add_action( 'plugins_loaded', array( $this, 'load_plugin_textdomain' ) ); + $this->load_translation(); add_action( 'admin_menu', array( $this, 'add_admin_menu' ) ); add_action( 'admin_init', array( $this, 'settings_init' ) ); @@ -91,9 +91,8 @@ public function __construct() { * * Thanks to @kau-boy */ - public function load_plugin_textdomain() { - $domain = 'apermo-adminbar'; - load_plugin_textdomain( $domain, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); + public function load_translation() { + load_plugin_textdomain( 'apermo-adminbar', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); } /** @@ -254,14 +253,16 @@ public function admin_bar_filter( $wp_admin_bar ) { */ public function options_page() { ?> -
-

- -
+
+
+

+ +
+
- + admin_colors as $color => $color_info ) : @@ -431,4 +432,7 @@ public function sanitize( $input ) { } // Run boy, run! -new ApermoAdminBar(); +add_action( 'plugins_loaded', function () { + new ApermoAdminBar(); +} ); + diff --git a/index.php b/index.php index 4a55c4c..6220032 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,2 @@ Apermo AdminBar to set up the links and colors (currently you have to repeat this on all sites) - -== Frequently Asked Questions == - -###How can I help with the development of this plugin? -Head over to the [GitHub Repository](https://github.com/apermo/apermo-adminbar) and start reading. Every bit of help is highly appreciated! - -###I have more than 3 sites, can I add more? -You can do so with add_filter( 'ap-ab-type', 'your_filter' ); - -###I want more colorschemes! -Feel free to add more, there are other plugins that do so. Or have a look at [wp_admin_css_color() in the WordPress Codex](https://codex.wordpress.org/Function_Reference/wp_admin_css_color) - -== Screenshots == - - -== Changelog == - -= 0.9.1 = -- Bug fixes and optimizations - Thanks to @kau-boy for the help - -= 0.9.0 = -- Initial Release \ No newline at end of file