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 :)

261 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Won a competition
  • Has been part of the Envato Community for over 5 years
+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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by