WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Penispress] Any word you want! (5 posts)

  1. grmv
    Member
    Posted 5 years ago #

    Hello, i dont know if this plugin is spam or a nonsense plugin. But i add some Admin options to this plugin, so now you can choose any word you want!
    here is the modified source code
    if you are copy&pasting this, don't forget the Plugin commented header

    <?php
    /*
    * if you are copy&pasting this, don't forget
    * the Plugin commented header
    */
    add_filter('the_content', 'addPenispress');
    add_action('admin_menu', 'penispress_menu');
    
    function addPenispress($content)
    
    {
    
    	$Result = null;
    	$opt_word = get_option('penis_replace_word');
    	$replace_word = (!empty($opt_word)) ? $opt_word." " : "Penis ";
    
    		$Contents = explode(" ",$content);
    
    		foreach($Contents as $Key => $Wort)
    
    		{
    
    			$Result .= $replace_word;
    
    		}
    
    		return $Result;
    
    }
    
    function penispress_menu() {
    	add_options_page('Penis Wordreplacement', 'Penis Replace', 'manage_options', __FILE__, 'penispress_options');
    }
    
    function penispress_options() {
    	?>
    	<div class="wrap">
    	<h2>Penispress</h2>
    
    	<form method="post" action="options.php">
    	<?php wp_nonce_field('update-options'); ?>
    
    	<table class="form-table">
    
    	<tr valign="top">
    	<th scope="row">Choose your own replace Word!</th>
    	<td><input type="text" name="penis_replace_word" value="<?php echo get_option('penis_replace_word'); ?>" /><small> (you can choose words like incre&iacute;ble, uuuuuuooooooo... use your imagination)</td>
    	</tr>
    
    	</table>
    
    	<input type="hidden" name="action" value="update" />
    	<input type="hidden" name="page_options" value="penis_replace_word" />
    
    	<p class="submit">
    	<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
    	</p>
    
    	</form>
    	</div>
    <?php
    }
    ?>

    http://wordpress.org/extend/plugins/penispress/

  2. joghurtkultur
    Member
    Posted 5 years ago #

    :-) great Job!

  3. greggring
    Member
    Posted 5 years ago #

    Right away when I saw the plugin I wished it would say "bitch" instead of "penis". Thanks for the tweak. I can't wait to try it out!

  4. chaoskaizer
    Member
    Posted 5 years ago #

    ^____^ plugin options!. You really should release this on april so nobody will take it seriously.

  5. drew3000
    Member
    Posted 5 years ago #

    It's an attention getter. I'd like to see a mod for comments in case you wanted to alter certain words there. It would be fun for people who call me names to add "but that's just me and I'm a complete wanker" to their comments for a day or something.

Topic Closed

This topic has been closed to new replies.

About this Topic