1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2025-04-19 05:35:36 +03:00

completing the initial round of PHP documentation as per the WPCS

http://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/#1-functions-and-class-methods
This commit is contained in:
Tom McFarlin 2014-06-26 16:19:57 -04:00
parent 9f5ffbf597
commit 23235f94d7
6 changed files with 152 additions and 22 deletions

View file

@ -24,17 +24,28 @@
class Plugin_Name_Loader {
/**
* TODO
* Short description. (use period)
*
* @since 1.0.0
* @access private
* @var type $var Description.
*/
protected $actions;
/**
* TODO
* Short description. (use period)
*
* @since 1.0.0
* @access private
* @var type $var Description.
*/
protected $filters;
/**
* TODO
* Short description. (use period)
*
* @since 1.0.0
* @access private
*/
public function __construct() {
@ -44,21 +55,43 @@ class Plugin_Name_Loader {
}
/**
* TODO
* Short description. (use period)
*
* @since 1.0.0
* @access private
* @var type $var Description.
* @var type $var Description.
* @var type $var Description.
* @var type Optional $var Description.
*/
public function add_action( $hook, $component, $callback, $priority = 10 ) {
$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority );
}
/**
* TODO
* Short description. (use period)
*
* @since 1.0.0
* @access private
* @var type $var Description.
* @var type $var Description.
* @var type $var Description.
* @var type Optional $var Description.
*/
public function add_filter( $hook, $component, $callback, $priority = 10 ) {
$this->filters = $this->add( $this->filters, $hook, $component, $callback $priority );
}
/**
* TODO
* Short description. (use period)
*
* @since 1.0.0
* @access private
* @var type $var Description.
* @var type $var Description.
* @var type $var Description.
* @var type $var Description.
* @var type Optional $var Description.
*/
private function add( $hooks, $hook, $component, $callback, $priority ) {
@ -83,12 +116,11 @@ class Plugin_Name_Loader {
public function run() {
/**
* TODO:
* This function is used to define the various hooks that are shared in the
* both the dashboard and the public-facing areas of the plugin. This is
* achieved via dependency injection by passing an instance of Plugin_Name
* into this class.
*
* TODO
*/
foreach ( $this->filters as $hook ) {