Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 9 Years, 11 Months, 3 Weeks ago When does the $plugins->run_hooks fire it's instance?
#2
Solved: 9 Years, 11 Months, 3 Weeks ago
The the code reaches a run_hook function, the plugin class then cycles through all functions listed as related to that hook (those from all plugins that call add_hook for that hook name).

It is up to the developer to determine if the requested function works for guests or not. A hook can only be run when the code reaches that line. If the user is not logged in and the code is stopped before run_hook is reached, then the hook will never be run.

Why would you want to run an external file? Create a plugin file that uses

$plugins->add_hook('admin_users_users_edit', 'your_function_name_here'); and create a function of the same name and then modify the user content there.
Lost interest, sold my sites, will browse here once in a while. It's been fun.


Messages In This Thread
RE: When does the $plugins->run_hooks fire it's instance? - by pavemen - 2012-07-07, 03:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)