You are here

function _customfilter_replace_callback in Custom filter 7.2

Same name and namespace in other branches
  1. 6.2 customfilter.module \_customfilter_replace_callback()
  2. 6 customfilter.module \_customfilter_replace_callback()
  3. 7 customfilter.module \_customfilter_replace_callback()

Helper function for preg_replace_callback().

1 call to _customfilter_replace_callback()
_customfilter_process in ./customfilter.module
@todo Document this function
1 string reference to '_customfilter_replace_callback'
_customfilter_process in ./customfilter.module
@todo Document this function

File

./customfilter.module, line 576
Allows the users with the right permission to define custom filters.

Code

function _customfilter_replace_callback($matches, $init = FALSE) {
  static $code;
  if ($init) {
    $code = $matches;
    return;
  }
  $vars =& _customfilter_code_vars();
  @eval($code);
  return isset($result) ? $result : '';
}