1 <?php
2
3 4 5 6 7 8
9
10 namespace nk2580\wordsmith\Actions;
11
12 class Action {
13
14 protected $hook;
15 protected $callback;
16 protected $priority = 10;
17 protected $accepted_args = 1;
18
19 public function __construct() {
20 $this->callAction( $this->hook, $this->callback, $this->priority, $this->accepted_args );
21 }
22
23 private function callAction( $hook, $callback, $priority = null, $args = null ) {
24 add_action( $hook, array( $this, $callback ), $priority, $args );
25 }
26
27 }
28