You are here

function rich_snippets_preprocessor_load in Rich Snippets 7

Loads the preprocessor for a given module.

Parameters

string $module: The module that the preprocessor is getting loaded for.

array &$variables: An array of template variables.

Return value

Drupal_RichSnippets_SchemaPreprocessorAbstract|FALSE The preprocessor object, FALSE if the module does not have a preprocessor.

1 call to rich_snippets_preprocessor_load()
rich_snippets_preprocess_search_result in ./rich_snippets.module
Implements hook_preprocess_HOOK() for theme_search_result().

File

./rich_snippets.module, line 151
Overrides the standard search results templates and CSS to display results similar to major search engines.

Code

function rich_snippets_preprocessor_load($module, array &$variables) {
  $preprocessors = rich_snippets_get_preprocessors();
  if (isset($preprocessors[$module])) {
    return new $preprocessors[$module]['class']($variables);
  }
  return FALSE;
}