• 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • What plugin ?
    From where ?

    Thread Starter zeekjt

    (@zeekjt)

    i have written it and it uses the pear package Text_Highlighter. so it is no plugin that actually exists but is in developement.
    the function i have written works in a plugin for a cms without any error, so i thought it must have something to do with wp
    i used the plugin Syntax Highlighting plugin as collecting main and used its filter for my plugin
    so the function highlite call must work, but the setrenderer() not
    system: linux
    server api: apache 2.0.52
    php 4.3.9
    wordpress 1.2.1

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘new syntax plugin: get error’ is closed to new replies.