File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
- ## 1.0.3 - 2017-05-19
3
+ ## 1.0.2 - 2017-05-19
4
4
* Added option to remove custom function to hook.
5
5
6
- * Added ` Josantonius\Hook\Hook::removeHook () ` method.
6
+ * Added ` Josantonius\Hook\Hook::resetHook () ` method.
7
7
8
8
## 1.0.1 - 2017-03-18
9
9
* Some files were excluded from download and comments and readme files were updated.
Original file line number Diff line number Diff line change @@ -150,19 +150,19 @@ public static function addHook($where, $function = '') {
150
150
}
151
151
152
152
/**
153
- * Remove custom function to hook.
153
+ * Reset custom function to hook.
154
154
*
155
- * @since 1.0.0
155
+ * @since 1.0.2
156
156
*
157
- * @param array|string $where → hook to remove
157
+ * @param array|string $where → hook to remove
158
158
*
159
159
* @return boolean
160
160
*/
161
- public static function removeHook ($ where ) {
161
+ public static function resetHook ($ where ) {
162
162
163
163
if (isset (self ::$ _hooks [$ where ])) {
164
164
165
- unset( self ::$ _hooks [$ where ]) ;
165
+ self ::$ _hooks [$ where ] = '' ;
166
166
167
167
return true ;
168
168
}
@@ -198,8 +198,6 @@ public static function run($where, $args='') {
198
198
199
199
$ theseHooks = explode ('| ' , self ::$ _hooks [$ where ]);
200
200
201
- unset(self ::$ _hooks [$ where ]);
202
-
203
201
foreach ($ theseHooks as $ hook ) {
204
202
205
203
if (preg_match ("/@/i " , $ hook )) {
You can’t perform that action at this time.
0 commit comments