1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-12-22 11:53:53 +02:00

Merge pull request #339 from Shelob9/loader-docs-338

Add corrected inline docs in the loader class
This commit is contained in:
Devin 2015-10-21 08:36:14 -04:00
commit 4e84183fd4

View file

@ -60,8 +60,8 @@ class Plugin_Name_Loader {
* @param string $hook The name of the WordPress action that is being registered. * @param string $hook The name of the WordPress action that is being registered.
* @param object $component A reference to the instance of the object on which the action is defined. * @param object $component A reference to the instance of the object on which the action is defined.
* @param string $callback The name of the function definition on the $component. * @param string $callback The name of the function definition on the $component.
* @param int Optional $priority The priority at which the function should be fired. * @param int $priority Optional. he priority at which the function should be fired. Default is 10.
* @param int Optional $accepted_args The number of arguments that should be passed to the $callback. * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
*/ */
public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args ); $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
@ -74,8 +74,8 @@ class Plugin_Name_Loader {
* @param string $hook The name of the WordPress filter that is being registered. * @param string $hook The name of the WordPress filter that is being registered.
* @param object $component A reference to the instance of the object on which the filter is defined. * @param object $component A reference to the instance of the object on which the filter is defined.
* @param string $callback The name of the function definition on the $component. * @param string $callback The name of the function definition on the $component.
* @param int Optional $priority The priority at which the function should be fired. * @param int $priority Optional. he priority at which the function should be fired. Default is 10.
* @param int Optional $accepted_args The number of arguments that should be passed to the $callback. * @param int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
*/ */
public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) { public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args ); $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
@ -91,9 +91,9 @@ class Plugin_Name_Loader {
* @param string $hook The name of the WordPress filter that is being registered. * @param string $hook The name of the WordPress filter that is being registered.
* @param object $component A reference to the instance of the object on which the filter is defined. * @param object $component A reference to the instance of the object on which the filter is defined.
* @param string $callback The name of the function definition on the $component. * @param string $callback The name of the function definition on the $component.
* @param int Optional $priority The priority at which the function should be fired. * @param int $priority The priority at which the function should be fired.
* @param int Optional $accepted_args The number of arguments that should be passed to the $callback. * @param int $accepted_args The number of arguments that should be passed to the $callback.
* @return type The collection of actions and filters registered with WordPress. * @return array The collection of actions and filters registered with WordPress.
*/ */
private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) { private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {