Tweak to anonymous function as a callback check
-
I had to make a small change to your line 129. The syntax was not working in some of our older sites and we wanted to send class methods as callbacks. This is a fix working for us, in case anyone else needs.
$anon_fns = array(); foreach( $this->actions[$action] as $el) { if ( is_callable( $el ) ) { $anon_fns[] = $el; } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Tweak to anonymous function as a callback check’ is closed to new replies.