Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

User:DavePar/Plugin API/comment text

Description

Used to change the appearance of the comment text when comment_text() is called from a theme.

Prototype

 comment_text_filter($content) 

Examples

Will boldface the word "blog" wherever it appears in the comment text without changing the comment in the database:

add_filter('comment_text', array('foo_bar', 'comment_text_filter'));

class foo_bar {
    function comment_text_filter($content) {
        return str_replace('blog', '<strong>blog</strong>', $content);
    }
}

Parameters

content
The comment text.

Related

See comment_text().