1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2025-04-19 05:35:36 +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,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 );
}