MyLiveSignature at the bottom of every post Version: 0.1 Author: miCRoSCoPiC^eaRthLinG Author URI: http://chaos-laboratory.com License: GPL Last modified: 2008-05-17 02:30am */ // Admin Panel function livesig_add_pages() { add_options_page( 'LiveSig Options', 'LiveSig', 8, __FILE__, 'livesig_options_page' ); } // livesig_add_pages // Options Page function livesig_options_page() { // If form was submitted if( isset( $_POST['livesig_update'] ) ) { // LiveSig Code if( empty( $_POST['livesig_code'] ) ) { // Delete the option from the DB if it's empty delete_option( 'livesig_code' ); $msg_status = "LiveSig Code deleted from the WordPress database."; } else { $livesig_code = $_POST['livesig_code']; update_option( 'livesig_code', $livesig_code ); $msg_status = "MyLiveSignature Code saved."; } // Show message _e( '

' . $msg_status . '

' ); } else { // Fetch code from DB $livesig_code = get_option( 'livesig_code' ); } // Configuration Page _e( '

LiveSig Options

Usage: Paste the signature code snippet provided by MyLiveSignature in the space below and hit Update Signature. If you don\'t have your Live Signature yet, please head over to the MyLiveSignature site and get yourself one for free.

Disabling: If you wish to stop displaying your Signature, simply delete the code here and Update. Alternatively, disabling this plug-in should also do the trick.

MyLiveSignature Code

Paste the MyLiveSignature code here exactly as provided to you without any alteration, unless you\'re an an advanced user and know what you are doing.

Note: The Signature will be automatically inserted after each of your WordPress posts.

' ); } // livesig_options_page // Signature Hook: The function that adds the signature after each post function signature_hook( $content = '' ) { // Get Signature $signature = get_option( 'livesig_code' ); // If code is present add signature if( !empty ( $signature ) ) { // Add signature to content $content_with_signature = $content . "\n" . stripslashes( $signature ); // Print out the modified content echo $content_with_signature; } else echo $content; } // Add Options Page add_action( 'admin_menu', 'livesig_add_pages' ); // Add content hook add_filter( 'the_content', 'signature_hook' ); ?>