PluginProbe
Hostinger Tools / 3.0.0
Hostinger Tools v3.0.0
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
← All changes | includes/Loader.php +28 -1 2.2.43.0.0 View file →
@@ -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,