1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-04-28 01:13:15 +03:00

Making the file headers more conssitent

Improving the documentation for each file, as well.

Fix #193
This commit is contained in:
Tom McFarlin 2014-07-30 15:16:32 -04:00
parent 43ee54a0ee
commit 57205587af
5 changed files with 59 additions and 55 deletions

View file

@ -1,21 +1,20 @@
<?php
/**
* Define a short description for what this class does (no period)
* The dashboard-specific functionality of the plugin.
*
* @link http://example.com
* @since 1.0.0
*
* @package Plugin_Name
* @subpackage Plugin_Name/admin
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
* @since 1.0.0
* @subpackage Plugin_Name/includes
*/
/**
* Define a short description for what this class does.
* The dashboard-specific functionality of the plugin.
*
* Define a longer description for the purpose of this class.
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the dashboard-specific stylesheet and JavaScript.
*
* @package Plugin_Name
* @subpackage Plugin_Name/admin
@ -28,9 +27,9 @@ class Plugin_Name_Admin {
*
* @since 1.0.0
* @access private
* @var string $slug The ID of this plugin.
* @var string $name The ID of this plugin.
*/
private $slug;
private $name;
/**
* The version of this plugin.
@ -45,11 +44,12 @@ class Plugin_Name_Admin {
* Initialize the class and set its properties.
*
* @since 1.0.0
* @var string $name The name of this plugin.
* @var string $version The version of this plugin.
*/
public function __construct( $slug, $version ) {
public function __construct( $name, $version ) {
$this->slug = $slug;
$this->name = $name;
$this->version = $version;
}
@ -73,7 +73,7 @@ class Plugin_Name_Admin {
* class.
*/
wp_enqueue_style( $this->slug, plugin_dir_url( __FILE__ ) . 'css/plugin-name-admin.css', array(), $this->version, 'all' );
wp_enqueue_style( $this->name, plugin_dir_url( __FILE__ ) . 'css/plugin-name-admin.css', array(), $this->version, 'all' );
}
@ -96,7 +96,7 @@ class Plugin_Name_Admin {
* class.
*/
wp_enqueue_script( $this->slug, plugin_dir_url( __FILE__ ) . 'js/plugin-name-admin.js', array( 'jquery' ), $this->version, FALSE );
wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . 'js/plugin-name-admin.js', array( 'jquery' ), $this->version, FALSE );
}

View file

@ -1,21 +1,19 @@
<?php
/**
* Define a short description for what this file does (no period)
* Provide a dashboard view for the plugin
*
* @link http://example.com
* @since 1.0.0
*
* @package Plugin_Name
* @subpackage Plugin_Name/admin/partials
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
* @since 1.0.0
*/
/**
* Define a short description for what this file does.
* Provide a dashboard view for the plugin.
*
* Define a longer description for the purpose of this file.
* This file is used to markup the public-facing aspects of the plugin.
*
* @package Plugin_Name
* @subpackage Plugin_Name/admin/partials
@ -23,4 +21,4 @@
*/
?>
<!-- This file is used to markup the dashboard-specific aspects of the plugin. -->
<!-- This file should primarily consist of HTML with a little bit of PHP. -->

View file

@ -1,15 +1,24 @@
<?php
/**
* Register all actions and filters
* Register all actions and filters for the plugin
*
* @link http://example.com
* @since 1.0.0
*
* @package Plugin_Name
* @subpackage Plugin_Name/includes
*/
/**
* Register all actions and filters for the plugin.
*
* Maintains them in a list as defined in the core plugin file and then
* registers them with WordPress when the plugin begins execution.
*
* @package Plugin_Name
* @subpackage Plugin_Name/includes
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
* @since 1.0.0
*/
/**

View file

@ -1,24 +1,23 @@
<?php
/**
* Define a short description for what this class does (no period)
* The public-facing functionality of the plugin.
*
* @link http://example.com
* @since 1.0.0
*
* @package Plugin_Name
* @subpackage Plugin_Name/public
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
* @since 1.0.0
* @subpackage Plugin_Name/includes
*/
/**
* Define a short description for what this class does.
* The public-facing functionality of the plugin.
*
* Define a longer description for the purpose of this class.
* Defines the plugin name, version, and two examples hooks for how to
* enqueue the dashboard-specific stylesheet and JavaScript.
*
* @package Plugin_Name
* @subpackage Plugin_Name/public
* @subpackage Plugin_Name/admin
* @author Your Name <email@example.com>
*/
class Plugin_Name_Public {
@ -28,9 +27,9 @@ class Plugin_Name_Public {
*
* @since 1.0.0
* @access private
* @var string $slug The ID of this plugin.
* @var string $name The ID of this plugin.
*/
private $slug;
private $name;
/**
* The version of this plugin.
@ -45,12 +44,12 @@ class Plugin_Name_Public {
* Initialize the class and set its properties.
*
* @since 1.0.0
* @access public
* @var string $name The name of the plugin.
* @var string $version The version of this plugin.
*/
public function __construct( $slug, $version ) {
public function __construct( $name, $version ) {
$this->slug = $slug;
$this->name = $slug;
$this->version = $version;
}
@ -74,7 +73,7 @@ class Plugin_Name_Public {
* class.
*/
wp_enqueue_style( $this->slug, plugin_dir_url( __FILE__ ) . 'css/plugin-name-public.css', array(), $this->version, 'all' );
wp_enqueue_style( $this->name, plugin_dir_url( __FILE__ ) . 'css/plugin-name-public.css', array(), $this->version, 'all' );
}
@ -97,7 +96,7 @@ class Plugin_Name_Public {
* class.
*/
wp_enqueue_script( $this->slug, plugin_dir_url( __FILE__ ) . 'js/plugin-name-public.js', array( 'jquery' ), $this->version, FALSE );
wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . 'js/plugin-name-public.js', array( 'jquery' ), $this->version, FALSE );
}

View file

@ -1,21 +1,19 @@
<?php
/**
* Define a short description for what this file does (no period)
* Provide a public-facing view for the plugin
*
* @link http://example.com
* @since 1.0.0
*
* @package Plugin_Name
* @subpackage Plugin_Name/public/partials
* @author Your Name <email@example.com>
* @license GPL-2.0+
* @link http://example.com
* @copyright 2014 Your Name or Company Name
* @since 1.0.0
*/
/**
* Define a short description for what this file does.
* Provide a public-facing view for the plugin.
*
* Define a longer description for the purpose of this file.
* This file is used to markup the public-facing aspects of the plugin.
*
* @package Plugin_Name
* @subpackage Plugin_Name/public/partials
@ -23,4 +21,4 @@
*/
?>
<!-- This file is used to markup the public-facing aspects of the plugin. -->
<!-- This file should primarily consist of HTML with a little bit of PHP. -->