Problem understanding hooks
-
Hello,
There is something I don’t understand about hooks. I would be glad if you help.
As you know, an action can be defined with do_action. Then it is interfered with with add_action. However, there is a situation like this:A do_action definition is made in a plugin I use. However, no action/definition is made with add_action anywhere (in the file etc.). However, if I delete this hook, some things are also deleted. For example, a form. However, there is no form definition anywhere with add_action.
HOW is this possible?
I hope it is understood.2-) The hook with the same name was used in more than one different file?
For example,in plugins/pluginX/edit.php
<?php do_action( 'edit_after_display' ); ?>
or
in plugins/pluginX/auction.php
<?php do_action( 'edit_after_display' , $post_id); ?>
Is this a correct use ? What could be the desired goal?
- The topic ‘Problem understanding hooks’ is closed to new replies.