Codex

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

User:DavePar/Plugin API/the content

Description

Used to change the appearance of the content of a post when the_content() or the_content_rss() is called from a theme. This filter is also applied to the content of a post when an excerpt or trackback is created from the content.

Prototype

 the_content($content) 

Examples

Will boldface the word "blog" wherever it appears in the post content without changing the content in the database:

add_filter('the_content', array('foo_bar', 'the_content_filter'));

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

Parameters

content
The post content text.

Related

See the_content(), the_content_rss().