LightPressPlugin($frontend, $args, $dummy_run); } function run($hook, &$post) { if (!$this->active || !is_array($post)) return; if (($hook == 'get_posts') && isset($post['f'])) { // modify query to include formatted data $post['f'] .= ', p.post_content_filtered '; } elseif (($hook == 'get_posts_loop') && isset($post['post_content_filtered']) && !empty($post['post_content_filtered'])) { // replace content with preformatted version $content = explode('', stripslashes($post['post_content_filtered']), 2); $post['post_content'] = $content[0]; $post['post_more'] = (count($content) > 1) ? '' . $content[1] : ''; } elseif (($hook == 'parse_comments') && isset($post['comment_content_filtered']) && !empty($post['comment_content_filtered'])) { // replace comment with preformatted version $post['comment_content'] = $post['comment_content_filtered']; } } function hide() { // do nothing } } ?>