<?php

/*
Plugin Name: BlueLight
Plugin URI: http://lloc.de/das-wordpress-plugin-bluelight.html
Description: What's that? It's blue light. What does it do? It turns blue.
Version: 0.1
Author: Dennis Ploetner
Author URI: http://lloc.de/
*/

/*
absoluteRSS Robert Accettura http://robert.accettura.com/projects/absoluterss/
*/
function absoluteRSS ($content){
    global 
$doing_rss;
    if (
is_feed() || $doing_rss) {
        
$home parse_url (get_settings("home"));
        
$home $home['scheme'] . "://" $home["host"];
        return 
preg_replace (
            
"/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is",
            
"<\\1\\2\\3=\"".$home."/\\5\"",
            
$content
        
);
    }
    return 
$content;
}
add_filter ("the_content""absoluteRSS");

function 
strip_local_url ($str) {
    
$str trim ($str);
    return 
preg_replace ("/http:\/\/" $_SERVER["SERVER_NAME"] . "/"""$str);
}
add_filter ("the_permalink""strip_local_url");

remove_action ("wp_head""rsd_link");
remove_action ("wp_head""feed_links_extra"3);
remove_action ("wp_head""feed_links"2);
remove_action ("wp_head""wlwmanifest_link");
remove_action ("wp_head""wp_generator");
remove_action ("wp_head""index_rel_link");
remove_action ("wp_head""parent_post_rel_link"100);
remove_action ("wp_head""start_post_rel_link"100);
remove_action ("wp_head""adjacent_posts_rel_link"10); 

?>