new syntax plugin: get error
-
in my plugin i have a filter that points to this function and it works, but i get an error in the function:
Fatal error: Call to undefined function: setrenderer() in /home/INCLUDEPATH/public_html/wp-content/plugins/syntax_hilighte_pear.php on line 37
ini_set ('include_path', '/home/INCLUDEPATH/pear/:'.ini_get('include_path'));
include_once ('Text/Highlighter.php');
include_once ('Text/Highlighter/Renderer/Html.php');
function highlite($code, $lang) {
$options = array(
'numbers' => HL_NUMBERS_LI,
'tabsize' => 8,
);
$renderer =& new Text_Highlighter_Renderer_HTML($options);
$hl =& Text_Highlighter::factory($lang, $options);
$hl->setRenderer($renderer);
$code = $hl->highlight($code);
return $code;
};
this works as plugin for a cms very well, but it won’t in wp and i have no idea why…
please help
The topic ‘new syntax plugin: get error’ is closed to new replies.