function patterns_db_get_id_from_name in Patterns 7
Same name and namespace in other branches
- 7.2 includes/db.inc \patterns_db_get_id_from_name()
Looks up a numerical id into the database for a valid patterns name. Returns false, if no valid pattern name was found.
Parameters
mixed $name the name of the pattern to look up:
File
- includes/
db.inc, line 410 - Retrieve, save, and remove patterns from the database.
Code
function patterns_db_get_id_from_name($name) {
if (empty($name)) {
return FALSE;
}
$p = patterns_get_pattern($name);
if ($p) {
$p = $p['id'];
}
return $p;
}