<?php fof_add_item_widget('fof_wordpress'); fof_add_pref('WordPress URL', 'plugin_wordpressurl'); function fof_wordpress($item) { $prefs = fof_prefs(); $wordpress = $prefs['plugin_wordpressurl']; if (!$wordpress) { return false; } $url = urlencode(html_entity_decode($item['item_link'])); $title = urlencode($item['item_title']); $text = urlencode('<blockquote>' . $item['item_content'] . '</blockquote>'); $link = "{$wordpress}/wp-admin/post-new.php?text={$text}&popupurl={$url}&popuptitle={$title}"; return "<a href='{$link}'><img src='plugins/wordpress.png' height=12 width=12 border=0 /></a> <a href='{$link}'>blog it</a>"; }
<?php fof_add_tag_prefilter('fof_autotag', 'fof_autotag'); fof_add_pref('Automatically tag these keywords', 'plugin_autotag_tags'); function fof_autotag($link, $title, $content) { $tags = array(); $prefs = fof_prefs(); $autotag = $prefs['plugin_autotag_tags']; if ($autotag) { $shebang = strip_tags($title . " " . $content); foreach (explode(" ", $autotag) as $tag) { if (preg_match("/\\b" . preg_quote($tag) . "\\b/i", $shebang)) { $tags[] = $tag; } } } return $tags; }
<?php fof_add_item_filter('fof_plain'); fof_add_pref('Strip (most) markup from items', 'plugin_plain_enable', 'boolean'); function fof_plain($text) { $prefs = fof_prefs(); $enable = $prefs['plugin_plain_enable']; if (!$enable) { return $text; } return strip_tags($text, "<a><b><i><blockquote>"); }