function rich_snippet_normalize_schema in Rich Snippets 7
Normalizes the schema to a value suitable for use in function names.
Converts all characters to lowercase, replaces spaces with underscores. For example, "Health and medical types" -> "health_and_medical_types".
Note that strtolower() is used in favor of drupal_strtolower() since none of the schemata have UTF-8 specific characters.
Parameters
string $schema: The raw schema, usually one listed at http://schema.org/docs/schemas.html.
Return value
string The normalized schema.
1 call to rich_snippet_normalize_schema()
- rich_snippets_invoke_preprocess_hooks in ./
rich_snippets.module - Invoke the schema specific preprocess hooks.
File
- ./
rich_snippets.module, line 402 - Overrides the standard search results templates and CSS to display results similar to major search engines.
Code
function rich_snippet_normalize_schema($schema) {
return str_replace(' ', '_', strtolower($schema));
}