You are here

function microdata_update_vocabulary_schema in Microdata 7

Retrieves schema data from an external source.

Parameters

string $import_url: The URL to retrieve data from.

array $options: An array of request options. @see drupal_http_request

Return value

Unserialized schema data on success or NULL otherwise.

2 calls to microdata_update_vocabulary_schema()
microdata_get_vocabularies in ./microdata.pages.inc
Helper function.
microdata_vocabulary_settings_refresh_vocabulary_cache in ./microdata.admin.inc
Submit callback; Caches microdata vocabularies.

File

./microdata.admin.inc, line 97
Microdata administration and module settings UI.

Code

function microdata_update_vocabulary_schema($import_url, array $options = array()) {
  $request = drupal_http_request($import_url, $options);
  if ($request->code == 200 && !empty($request->data)) {
    return $request->data;
  }
  return NULL;
}