static function ContentFilter($content) { global $id, $wpfb_fb, $post; if (!WPFB_Core::$settings->parse_tags_rss && is_feed()) { return $content; } if (is_object($post) && !post_password_required()) { // TODO: file resulst are generated twice, 2nd time in the_excerpt filter (SearchExcerptFilter) // some themes do not use excerpts in search resulsts!! // replace file browser post content with search results if (WPFB_Core::$file_browser_search && $id == WPFB_Core::$settings->file_browser_post_id) { wpfb_loadclass('Search', 'File', 'Category'); $content = ''; WPFB_Search::FileSearchContent($content); } else { // do not hanlde attachments when searching $single = is_single() || is_page(); if ($single && $post->ID == WPFB_Core::$settings->file_browser_post_id) { $wpfb_fb = true; wpfb_loadclass('Output', 'File', 'Category'); WPFB_Output::FileBrowser($content, 0, empty($_GET['wpfb_cat']) ? 0 : intval($_GET['wpfb_cat'])); } if (self::GetOpt('auto_attach_files') && ($single || self::GetOpt('attach_loop'))) { wpfb_loadclass('Output'); if (WPFB_Core::$settings->attach_pos == 0) { $content = WPFB_Output::PostAttachments(true) . $content; } else { $content .= WPFB_Output::PostAttachments(true); } } } } return $content; }