You are here

function site_verify_import_xmlsitemap in Site verification 7

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

Import data from XML sitemap engines.

2 calls to site_verify_import_xmlsitemap()
site_verify_install in ./site_verify.install
Implements hook_install().
site_verify_update_3 in ./site_verify.install
Run imports from other contrib modules.

File

./site_verify.install, line 94
Install, update and uninstall functions for the site_verify module.

Code

function site_verify_import_xmlsitemap() {
  $engines = array(
    'google',
    'bing',
    'yahoo',
  );
  foreach ($engines as $engine) {
    if ($file = variable_get('xmlsitemap_engines_' . $engine . '_verify', '')) {
      db_merge('site_verify')
        ->key(array(
        'engine' => $engine,
        'file' => $file,
        'file_contents' => variable_get('xmlsitemap_engines_' . $engine . '_verify_string', ''),
        'meta' => '',
      ))
        ->execute();
    }
    variable_del('xmlsitemap_engines_' . $engine . '_verify');
    variable_del('xmlsitemap_engines_' . $engine . '_verify_string');
  }
}