What went wrong? my plugin
-
<?php /* Plugin Name:My Plugin */ function my_function($text){ if(isset($_POST["name"])) { $name = $_POST['name']; } else { echo " <form method='post' action='options.php'> name : <inputtype='text' name='name'> <input type='submit' value='submit'> </form> "; } $text = str_replace('foo',$name,$text); //replace $name -> foo return $text; } add_filter('the_content','my_function'); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘What went wrong? my plugin’ is closed to new replies.