function _customfilter_globals in Custom filter 6
Same name and namespace in other branches
- 6.2 customfilter.module \_customfilter_globals()
- 7.2 customfilter.module \_customfilter_globals()
- 7 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 in ./
customfilter.module - Implements hook_filter().
- _customfilter_process in ./
customfilter.module
File
- ./
customfilter.module, line 379 - 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];
}