prepare_posts_frontend

Extends or modifies data of posts displayed in frontend.

Blog

Input (passed by reference)

$params array Post list data array.
… your plugin code …

Output

Blog

Plugin code example

PHP

public function preparePostsFrontend(&$params)
{
    waLog::log(print_r($params, true), 'blog/myplugin/prepare-posts-frontend.log');
    //adding comment count to post titles
    foreach ($params as &$post) {
        $post['title'] .= ' ('.$post['comment_count'].')';
    }
}