You are here

function page_title_get_module_apis in Page Title 7.2

Same name and namespace in other branches
  1. 8.2 page_title.module \page_title_get_module_apis()
  2. 6.2 page_title.module \page_title_get_module_apis()

Get a list of modules that support the current Page Title API.

1 call to page_title_get_module_apis()
page_title_include_api_files in ./page_title.module
Function to ensure API files are included. We use a static variable so we can use include, which is faster than include_one

File

./page_title.module, line 879
Enhanced control over the page title (in the head tag).

Code

function page_title_get_module_apis() {

  // For efficiency, cache the hook implementations and settings
  $cache =& drupal_static(__FUNCTION__);
  if (!isset($cache)) {
    $cache = array();
    foreach (module_implements('page_title_api') as $module) {
      $function = $module . '_page_title_api';
      $info = $function();
      if (isset($info['api']) && $info['api'] == 1.0) {
        if (!isset($info['path'])) {
          $info['path'] = drupal_get_path('module', $module);
        }
        $cache[$module] = $info;
      }
    }
  }
  return $cache;
}