From ad459856c57b0465e162d0013aac840a806c95c7 Mon Sep 17 00:00:00 2001 From: Tom McFarlin Date: Thu, 17 Oct 2013 16:22:14 -0400 Subject: [PATCH] Removing a lot of whitespace, updating function comments, and comment blocks within a function, and making sure no comments exceed 80 characters --- plugin-name/plugin-name.php | 63 ++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/plugin-name/plugin-name.php b/plugin-name/plugin-name.php index 45cc9e2..567c48c 100644 --- a/plugin-name/plugin-name.php +++ b/plugin-name/plugin-name.php @@ -2,8 +2,8 @@ /** * The WordPress Plugin Boilerplate. * - * A foundation off of which to build well-documented WordPress plugins that also follow - * WordPress coding standards and PHP best practices. + * A foundation off of which to build well-documented WordPress plugins that + * also follow WordPress Coding Standards and PHP best practices. * * @package Plugin_Name * @author Your Name @@ -12,16 +12,16 @@ * @copyright 2013 Your Name or Company Name * * @wordpress-plugin - * Plugin Name: TODO - * Plugin URI: TODO - * Description: TODO - * Version: 1.0.0 - * Author: TODO - * Author URI: TODO - * Text Domain: plugin-name-locale - * License: GPL-2.0+ - * License URI: http://www.gnu.org/licenses/gpl-2.0.txt - * Domain Path: /languages + * Plugin Name: TODO + * Plugin URI: TODO + * Description: TODO + * Version: 1.0.0 + * Author: TODO + * Author URI: TODO + * Text Domain: plugin-name-locale + * License: GPL-2.0+ + * License URI: http://www.gnu.org/licenses/gpl-2.0.txt + * Domain Path: /languages * GitHub Plugin URI: https://github.com// */ @@ -30,22 +30,35 @@ if ( ! defined( 'WPINC' ) ) { die; } -// TODO: replace `class-plugin-name.php` with the name of the actual plugin's class file +/* + * TODO: + * + * - replace `class-plugin-name.php` with the name of the plugin's class file + * - replace `class-plugin-admin.php` with the name of the plugin's admin file + * + */ require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-name.php' ); -// TODO: replace `class-plugin-admin.php` with the name of the actual plugin's admin class file -if( is_admin() ) { - require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-name-admin.php' ); -} +require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-name-admin.php' ); -// Register hooks that are fired when the plugin is activated or deactivated. -// When the plugin is deleted, the uninstall.php file is loaded. -// TODO: replace Plugin_Name with the name of the class defined in `class-plugin-name.php` +/* + * Register hooks that are fired when the plugin is activated or deactivated. + * When the plugin is deleted, the uninstall.php file is loaded. + * + * TODO: + * + * - replace Plugin_Name with the name of the class defined in + * `class-plugin-name.php` + */ register_activation_hook( __FILE__, array( 'Plugin_Name', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'Plugin_Name', 'deactivate' ) ); -// TODO: replace Plugin_Name with the name of the class defined in `class-plugin-name.php` +/* + * TODO: + * + * - replace Plugin_Name with the name of the class defined in + * `class-plugin-name.php` + * - replace Plugin_Name_Admin with the name of the class defined in + * `class-plugin-name-admin.php` + */ add_action( 'plugins_loaded', array( 'Plugin_Name', 'get_instance' ) ); -// TODO: replace Plugin_Name_Admin with the name of the class defined in `class-plugin-name-admin.php` -if( is_admin() ) { - //add_action( 'plugins_loaded', array( 'Plugin_Name_Admin', 'get_instance' ) ); -} \ No newline at end of file +add_action( 'plugins_loaded', array( 'Plugin_Name_Admin', 'get_instance' ) ); \ No newline at end of file