/* Plugin Name: Twitter Tools is... Plugin URI: http://www.linickx.com/archives/1566/twitter-tools-is-for-twitter-tools Description: This is a small wordpress filter that makes meaningful posts out of status updates that start with is Version: 0.1 Author: Nick [LINICKX] Bettison Author URI: http://www.linickx.com */ // 1st up, we're dependant ok AK so lets make sure our users know this! function lnx_tti_warning() { if ( !function_exists( 'aktt_install' ) ) { echo "
".__('Twitter Tools is having an Error.')." ".sprintf(__('You must have Alex Kings Twitters Tools Plugin activated for twitters-tools-is to work.'), "http://wordpress.org/extend/plugins/twitter-tools/")."
$bodge = substr($content,0,3); if ( $bodge == "
") { $bodgeon = true; $content = strip_tags($content); } // what are the First Two Characters ? $FirstTwoChar = substr($content,0,2); // Are they is? if ( $FirstTwoChar == "is" ) { // Cool, get tweeter name... $lnx_tti_author = get_option(aktt_blog_post_author); $author_info = get_userdata($lnx_tti_author); $author = $author_info->display_name; // now change the content $content = preg_replace("/^is/","$author is ","$content"); } if ($bodgeon) { $content = "
$content
"; } } return $content; } // Admin Warning add_action('admin_notices', 'lnx_tti_warning'); // Insert filter(s) if twitter-tools is installed.... if (is_file(trailingslashit(ABSPATH.PLUGINDIR).'twitter-tools/twitter-tools.php')) { add_filter('the_content','lnx_tti'); add_filter('the_title','lnx_tti'); } // END! ?>