3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi guys,

what it the utility of using add_action with a custom tag to call a custom function?

For example:

add_action(‘my_custom_tag’, ‘my_custom_function’);

Thanks,

Parker

19 posts
  • Has sold $40,000+ on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Sells items exclusively on Envato Market
  • Has collected 1+ items on Envato Market
eazyee says

You can start to have some features easy to add in place creating some kind of framework, this way the code is reusable..

For example our Admin has a toolbar and if we include a new php in functions.php we’re adding more features in the toolbar without modifying in the original admin html :)

256 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Won a competition
+5 more
der says

I use do_action() on the framework, and add_action() on the (framework’s) modules/extensions. This way you have a modular framework, easily extendible.

by
by
by
by
by
by