You are here

function _htmlpurifier_config_load in HTML Purifier 6.2

Same name and namespace in other branches
  1. 6 htmlpurifier.module \_htmlpurifier_config_load()
  2. 7 htmlpurifier.module \_htmlpurifier_config_load()

Returns the name of the configuration function for $format, or FALSE if none exists. Function name will be htmlpurifier_config_N.

Parameters

int $format: Integer format to check function for.

Return value

String function name for format, or FALSE if none.

2 calls to _htmlpurifier_config_load()
_htmlpurifier_get_config in ./htmlpurifier.module
Returns the HTMLPurifier_Config object corresponding to an input format.
_htmlpurifier_settings in ./htmlpurifier.module
Generates a settings form for configuring HTML Purifier.

File

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

Code

function _htmlpurifier_config_load($format) {
  $config_file = drupal_get_path('module', 'htmlpurifier') . "/config/{$format}.php";
  $config_function = "htmlpurifier_config_{$format}";
  if (!function_exists($config_function) && file_exists($config_file)) {
    include_once $config_file;
  }
  return function_exists($config_function) ? $config_function : FALSE;
}