3256 posts
  • Affiliate Level 4
  • Author Level 9
  • Collector Level 2
  • Top Monthly Author
+11 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
  • Weekly Top Seller
  • Author Level 6
  • 5 Years of Membership
  • Exclusive Author
+1 more
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 :)

263 posts
  • Weekly Top Seller
  • Elite Author
  • Author Level 8
  • Winner
+6 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