function simplemeta_meta_load in Simple Meta 7
Same name and namespace in other branches
- 6.2 simplemeta.module \simplemeta_meta_load()
Load meta data.
Parameters
int $sid : SimpleMeta data id
Return value
object|FALSE object representing metadata or FALSE on failure
2 calls to simplemeta_meta_load()
- simplemeta_meta_delete in ./
simplemeta.module - Delete meta data.
- simplemeta_meta_form_validate_save in ./
simplemeta.module - SimpleMeta form validation callback on save.
File
- ./
simplemeta.module, line 282 - SimpleMeta module.
Code
function simplemeta_meta_load($sid) {
$result = db_select('simplemeta', 's')
->fields('s')
->condition('s.sid', $sid, '=')
->execute();
if ($meta = $result
->fetchObject()) {
$meta->data = unserialize($meta->data);
return $meta;
}
return FALSE;
}