@@ 79-90 (lines=12) @@ | ||
76 | * |
|
77 | * @param HasActions $service |
|
78 | */ |
|
79 | public function register_actions( HasActions $service ) { |
|
80 | foreach ( $service->action_hooks() as $action ) { |
|
81 | $this->actions = $this->add( |
|
82 | $this->actions, |
|
83 | $action['hook'], |
|
84 | $service, |
|
85 | $action['method'], |
|
86 | isset( $action['priority'] ) ? $action['priority'] : 10, |
|
87 | isset( $action['args'] ) ? $action['args'] : 1 |
|
88 | ); |
|
89 | } |
|
90 | } |
|
91 | ||
92 | /** |
|
93 | * {@inheritDoc} |
|
@@ 97-108 (lines=12) @@ | ||
94 | * |
|
95 | * @param HasFilters $service |
|
96 | */ |
|
97 | public function register_filters( HasFilters $service ) { |
|
98 | foreach ( $service->filter_hooks() as $filter ) { |
|
99 | $this->filters = $this->add( |
|
100 | $this->filters, |
|
101 | $filter['hook'], |
|
102 | $service, |
|
103 | $filter['method'], |
|
104 | isset( $filter['priority'] ) ? $filter['priority'] : 10, |
|
105 | isset( $filter['args'] ) ? $filter['args'] : 1 |
|
106 | ); |
|
107 | } |
|
108 | } |
|
109 | ||
110 | /** |
|
111 | * {@inheritDoc} |