You are here

function _customfilter_code_vars in Custom filter 7

Same name and namespace in other branches
  1. 6 customfilter.module \_customfilter_code_vars()
  2. 7.2 customfilter.module \_customfilter_code_vars()

Return the global object containing the global properties used in the replacement PHP code.

Parameters

$reset: Boolean value set to TRUE when the global object must be reset.

2 calls to _customfilter_code_vars()
_customfilter_filter_process in ./customfilter.module
Process the text, apply the filters
_customfilter_replace_callback in ./customfilter.module
Helper function for preg_replace_callback().

File

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

Code

function &_customfilter_code_vars($reset = FALSE) {
  static $vars;
  if (!isset($vars) || $reset) {
    $vars = new stdClass();
  }
  return $vars;
}