You are here

function htmlpurifier_libraries_postload_callback in HTML Purifier 7.2

Registers the Drupal specific cache definition for HTML Purifier

Parameters

$library: An array of library information, which may be version- or variant-specific. Passed by reference.

$version: The version the library information passed in $library belongs to, or NULL if the passed library information is not version-specific.

$variant: The variant the library information passed in $library belongs to, or NULL if the passed library information is not variant-specific.

1 string reference to 'htmlpurifier_libraries_postload_callback'
htmlpurifier_libraries_info in ./htmlpurifier.module
Implements hook_libraries_info().

File

./htmlpurifier.module, line 169
Implements HTML Purifier as a Drupal filter.

Code

function htmlpurifier_libraries_postload_callback(&$library, $version, $variant) {
  $module_path = drupal_get_path('module', 'htmlpurifier');
  require_once "{$module_path}/HTMLPurifier_DefinitionCache_Drupal.php";
  $factory = HTMLPurifier_DefinitionCacheFactory::instance();
  $factory
    ->register('Drupal', 'HTMLPurifier_DefinitionCache_Drupal');
}