mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
Removing a lot of whitespace, updating function comments, and comment blocks within a function, and making sure no comments exceed 80 characters
This commit is contained in:
parent
57115a8cf4
commit
ad459856c5
1 changed files with 38 additions and 25 deletions
|
@ -2,8 +2,8 @@
|
||||||
/**
|
/**
|
||||||
* The WordPress Plugin Boilerplate.
|
* The WordPress Plugin Boilerplate.
|
||||||
*
|
*
|
||||||
* A foundation off of which to build well-documented WordPress plugins that also follow
|
* A foundation off of which to build well-documented WordPress plugins that
|
||||||
* WordPress coding standards and PHP best practices.
|
* also follow WordPress Coding Standards and PHP best practices.
|
||||||
*
|
*
|
||||||
* @package Plugin_Name
|
* @package Plugin_Name
|
||||||
* @author Your Name <email@example.com>
|
* @author Your Name <email@example.com>
|
||||||
|
@ -12,16 +12,16 @@
|
||||||
* @copyright 2013 Your Name or Company Name
|
* @copyright 2013 Your Name or Company Name
|
||||||
*
|
*
|
||||||
* @wordpress-plugin
|
* @wordpress-plugin
|
||||||
* Plugin Name: TODO
|
* Plugin Name: TODO
|
||||||
* Plugin URI: TODO
|
* Plugin URI: TODO
|
||||||
* Description: TODO
|
* Description: TODO
|
||||||
* Version: 1.0.0
|
* Version: 1.0.0
|
||||||
* Author: TODO
|
* Author: TODO
|
||||||
* Author URI: TODO
|
* Author URI: TODO
|
||||||
* Text Domain: plugin-name-locale
|
* Text Domain: plugin-name-locale
|
||||||
* 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
|
||||||
* GitHub Plugin URI: https://github.com/<owner>/<repo>
|
* GitHub Plugin URI: https://github.com/<owner>/<repo>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -30,22 +30,35 @@ if ( ! defined( 'WPINC' ) ) {
|
||||||
die;
|
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' );
|
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
|
require_once( plugin_dir_path( __FILE__ ) . 'class-plugin-name-admin.php' );
|
||||||
if( is_admin() ) {
|
|
||||||
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.
|
* Register hooks that are fired when the plugin is activated or deactivated.
|
||||||
// TODO: replace Plugin_Name with the name of the class defined in `class-plugin-name.php`
|
* 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_activation_hook( __FILE__, array( 'Plugin_Name', 'activate' ) );
|
||||||
register_deactivation_hook( __FILE__, array( 'Plugin_Name', 'deactivate' ) );
|
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' ) );
|
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`
|
add_action( 'plugins_loaded', array( 'Plugin_Name_Admin', 'get_instance' ) );
|
||||||
if( is_admin() ) {
|
|
||||||
//add_action( 'plugins_loaded', array( 'Plugin_Name_Admin', 'get_instance' ) );
|
|
||||||
}
|
|
Loading…
Reference in a new issue