You are here

function Smarty::register_prefilter in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/smarty/Smarty.class.php \Smarty::register_prefilter()

Registers a prefilter function to apply to a template before compiling

Parameters

string $function name of PHP function to register:

File

includes/moodle/lib/smarty/Smarty.class.php, line 842

Class

Smarty
@package Smarty

Code

function register_prefilter($function) {
  $_name = is_array($function) ? $function[1] : $function;
  $this->_plugins['prefilter'][$_name] = array(
    $function,
    null,
    null,
    false,
  );
}