<?php

function printme_add_link( $content )
{
    global $printme_options;
    return $content;
}

function printme( )
{
    if ( isset( $_GET['print'] ) && $_GET['print'] == 1 )
    {
        include( plugin_dir_path( __FILE__ )."print.php" );
        exit( );
    }
}

if ( ( !isset( $_GET['print'] ) || !$_GET['print'] == 1 ) && !isset( $printme_options['auto'] ) )
{
    add_filter( "the_content", "printme_add_link" );
}
add_action( "template_redirect", "printme", 5 );
?>
