<?php
/**
 * @package hello world
 * @author Frank B&uuml;ltge
 * @version 0.1
 */
 
/*
    Plugin Name: hello world
    Plugin URI: http://www.wordpressbuch.de/
    Description: hello world - wir schreiben ein einfaches WP-Plugin.
    Author: Frank B&uuml;ltge
    Version: 0.1
    License: GPL
    Author URI: http://bueltge.de/
    Last change: 15.04.2009 11:42:28
*/

if ( !function_exists('add_action') ) {
    
header('Status: 403 Forbidden');
    
header('HTTP/1.1 403 Forbidden');
    exit();
}

if ( !
class_exists'HelloWorld' ) ) {
    class 
HelloWorld {

        
// constructor
        
function HelloWorld() {
            
            
add_action'wp_head', array(&$this'AddScript') );
            
add_filter'the_content', array(&$this'FilterContent') );
            
add_filter'the_title', array(&$this'FilterContent'), 11 );
            
add_filter'the_title', array(&$this'FilterSpace'), 10 );
        }
        
        function 
FilterContent($content) {
            
$content strtolower($content);
            return 
$content;
        }
        
        function 
FilterSpace($content) {
            
$content str_replace' ''Unser erstes Plugin'$content);
            return 
$content;
        }
        
        function 
AddScript() {
            
$string '<script type="text/javascript" >alert("hello world");</script>' "\n";
            echo 
$string;
        }
        
    }
    
    
$HelloWorld = new HelloWorld();
}
?>