You are here

function _customfilter_globals in Custom filter 7

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

Return an object that contains the global variables used during the execution of a rule.

2 calls to _customfilter_globals()
_customfilter_filter_process in ./customfilter.module
Process the text, apply the filters
_customfilter_process in ./customfilter.module
@todo Document this function

File

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

Code

function &_customfilter_globals($op = '') {
  static $globals = array(), $index = 0;
  if ($op == 'push') {
    $globals[++$index] = new stdClass();
  }
  elseif ($op == 'pop' && $index) {
    unset($globals[$index--]);
  }
  return $globals[$index];
}