function modules_implement_hook

6.x modules_implement_hook($hook = "example_hook_here")
7.x modules_implement_hook($hook = "example_hook_here")
4.x modules_implement_hook($hook = "example_hook_here")
5.x modules_implement_hook($hook = "example_hook_here")

Return an array of enabled modules which implement the provided hook. Do not include the preceeding "_" on the hook name!

13 calls to modules_implement_hook()
content_get_types in modules/content/content.module
Return an array with all the possible content types known to FlightPath
content_load in modules/content/content.module
Load the content from the database and return an array, by calling hook_content_load.
content_save in modules/content/content.module
Save the content to the database.
fp_clear_cache in includes/
Call all modules which implement hook_clear_cache
fp_get_form in includes/
This function gets the form array, where the callback is the same as form_id. It will also look for modules which may want to alter the form, using hook_form_alter, and go ahead and apply that.

... See full list


includes/, line 2373
This file contains misc functions for FlightPath


function modules_implement_hook($hook = "example_hook_here") {

  // Going to use a global array to keep track of what hooks exist.  
  if (!isset($GLOBALS ['hook_cache'])) {
    $GLOBALS ['hook_cache'] = array();

  // Have we already cached this list previously?
  if (isset($GLOBALS ['hook_cache'][$hook])) {
    return $GLOBALS ['hook_cache'][$hook];

  // We have not already cached this, so let's look for it fresh...  

  $rtn = array();

  // If we are in the install script, the GLOBALS array won't be set up, since there is no
  // settings file yet.  If that's the case, create a blank array so we don't have an issue.
  if (!isset($GLOBALS ['fp_system_settings'])) {
    $GLOBALS ['fp_system_settings'] = array();
  if (!isset($GLOBALS ['fp_system_settings']['modules'])) {
    $GLOBALS ['fp_system_settings']['modules'] = array();

  foreach ($GLOBALS ["fp_system_settings"]["modules"] as $module => $value) {
    if (isset($value ["enabled"]) && $value ["enabled"] != "1") {
      // Module is not enabled.  Skip it.
    if (function_exists($module . '_' . $hook)) {
      $rtn [] = $module;

  $GLOBALS ['hook_cache'][$hook] = $rtn;

  return $rtn;