Forums

Proper way to do_action inside of shortcode code (2 posts)

  1. jacobdubail
    Member
    Posted 8 months ago #

    Hey ya'll,

    Trying to figure out the best way to add an action hook to my plugin.

    Currently, my shortcode function does it's thing and then returns the output.

    I want to add an action hook at the very end before the output is returned so users can add some custom features/functions that wouldn't be possible via shortcode attributes.

    Because the output is being returned, I can echo the do_action call. So, what is the best way to provide this hook and have the output of the hook be returned with the shortcode output?

    Many thanks!
    -Jacob

  2. Tosh
    Member
    Posted 7 months ago #

    I'm wondering the same thing myself.. let me know if you figure it out. I'll post back if I figure it as well.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.