| @@ -12,17 +12,44 @@ | ||
| 12 | 12 | $this->actions = array(); |
| 13 | 13 | $this->filters = array(); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | + /** | |
| 17 | + * @param string $hook | |
| 18 | + * @param $component | |
| 19 | + * @param string $callback | |
| 20 | + * @param int $priority | |
| 21 | + * @param int $accepted_args | |
| 22 | + * | |
| 23 | + * @return void | |
| 24 | + */ | |
| 16 | 25 | public function add_action( string $hook, $component, string $callback, int $priority = 10, int $accepted_args = 1 ) { |
| 17 | 26 | $this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args ); |
| 18 | 27 | } |
| 19 | 28 | |
| 29 | + /** | |
| 30 | + * @param string $hook | |
| 31 | + * @param $component | |
| 32 | + * @param string $callback | |
| 33 | + * @param int $priority | |
| 34 | + * @param int $accepted_args | |
| 35 | + * | |
| 36 | + * @return void | |
| 37 | + */ | |
| 20 | 38 | public function add_filter( string $hook, $component, string $callback, int $priority = 10, int $accepted_args = 1 ) { |
| 21 | 39 | $this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args ); |
| 22 | 40 | } |
| 23 | 41 | |
| 24 | - | |
| 42 | + /** | |
| 43 | + * @param array $hooks | |
| 44 | + * @param string $hook | |
| 45 | + * @param $component | |
| 46 | + * @param string $callback | |
| 47 | + * @param int $priority | |
| 48 | + * @param int $accepted_args | |
| 49 | + * | |
| 50 | + * @return array | |
| 51 | + */ | |
| 25 | 52 | private function add( |
| 26 | 53 | array $hooks, |
| 27 | 54 | string $hook, |
| 28 | 55 | $component, |