You are here

function site_verify_get_engines in Site verification 7

Same name and namespace in other branches
  1. 6 site_verify.module \site_verify_get_engines()
  2. 7.2 site_verify.module \site_verify_get_engines()

Fetch an array of supported search engines.

3 calls to site_verify_get_engines()
site_verify_edit_form in ./site_verify.admin.inc
Form to add/edit a verification record.
site_verify_engine_load in ./site_verify.module
Menu load callback; loads engine details.
site_verify_list in ./site_verify.admin.inc

File

./site_verify.module, line 177
Site Verify provides a tool for verification codes (meta tags or custom pages) to be added to the site, for verification with external search engines.

Code

function site_verify_get_engines() {
  static $engines;
  if (!isset($engines)) {

    // Fetch the list of engines and allow other modules to alter it.
    $engines = module_invoke_all('site_verify_engine_info');
    drupal_alter('site_verify_engine', $engines);

    // Merge the default values for each engine entry.
    foreach ($engines as $key => $engine) {
      $engines[$key] += array(
        'key' => $key,
        //'name' => drupal_ucfirst($engine),
        'file' => FALSE,
        'file_example' => FALSE,
        'file_validate' => array(),
        'file_contents' => FALSE,
        'file_contents_example' => FALSE,
        'file_contents_validate' => array(),
        'meta' => FALSE,
        'meta_example' => FALSE,
        'meta_validate' => array(),
      );
    }
  }
  return $engines;
}