Is it possible to pass object's function (for example a static one) to a hook (action/filter doesn't matter) as a parameter? I'm guessing it's very easy but i spent some time trying to do that and ... can't figured out.
Thank you in advanced.
Is it possible to pass object's function (for example a static one) to a hook (action/filter doesn't matter) as a parameter? I'm guessing it's very easy but i spent some time trying to do that and ... can't figured out.
Thank you in advanced.
Not sure what you want. Can you give more detail and an example?
Well ... i spent more time on it and got the result.
$obj = new MyObjInstance();
add_action('admin_init', array($obj, 'registerScripts'));
That's what i needed. Anyway, 10x for the interest :)
Please mark thread as resolved so that
- others with similar problem can see it as resolved and will read this thread for help if they have similar problem
- people providing help see it as resolved and will not waste time reading this post.
This topic has been closed to new replies.