WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Give object's function for filter param?

[Resolved] Give object's function for filter param?

  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Give object's function for filter param?’ is closed to new replies.
Skip to toolbar