You are here

function simplemeta_meta_load_by_path in Simple Meta 6.2

Same name and namespace in other branches
  1. 8.2 simplemeta.module \simplemeta_meta_load_by_path()
  2. 8 simplemeta.module \simplemeta_meta_load_by_path()
  3. 7.2 simplemeta.module \simplemeta_meta_load_by_path()
  4. 7 simplemeta.module \simplemeta_meta_load_by_path()

Load meta data

Parameters

string $path :

string $language:

Return value

mixed object representing metadata or FALSE on failure

3 calls to simplemeta_meta_load_by_path()
simplemeta_footer in ./simplemeta.module
Implements hook_footer()
simplemeta_meta_form_validate_save in ./simplemeta.module
simplemeta_meta_save in ./simplemeta.module
Save meta data

File

./simplemeta.module, line 235

Code

function simplemeta_meta_load_by_path($path, $language = '') {
  $query = "SELECT * FROM {simplemeta} WHERE path = '%s' AND language = '%s'";
  if ($meta = db_fetch_object(db_query($query, $path, $language))) {
    $meta->data = unserialize($meta->data);
    return $meta;
  }
  return FALSE;
}