<?php/*Sample FlatPress plugin coded by i_pk_pjers_i*Date: May 20, 2008*Reason: Plugins4noobs*Installation: Save this file as plugin.badwords.php, make a folder called badwords in fp-plugins, *and copy the file over to it, go into AdminCP, plugins, and enable the plugin.*FlatPress Plugins are simply functions, and using add_filter to call them, then enabling them in AdminCP*/function badwords($str) { $str = str_replace('fuck', 'bad word detected', $str);$str = str_replace('shit', 'bad word detected', $str);$str = str_replace('bitch', 'bad word detected', $str);$str = str_replace('cock', 'bad word detected', $str);//Return is required so the function doesn't mess up FlatPressreturn $str;}/**Here add_filter is using the_content(a new blog post) and comment_text(a new blog comment) to call the badwords function,*And the badwords function responds by doing its "function", which is replacing badwords with "bad word detected".*/add_filter('the_content', 'badwords');add_filter('comment_text', 'badwords');/*To code your own plugin for FlatPress this is what the code would be:<?phpfunction yourpluginname($str) {//php code goes herereturn $str;}add_filter('whatwillcallitgoeshere', 'yourpluginname');?>*After adding that code in, (and adding php code, and filling in the "stuff" with actual values(ex: badwords as the function name), *you go into AdminCP, plugins, and enable the plugin you have created*/?>