[wp-hackers] Simple plugin help
Toivo Lainevool
tlainevool at xmlpatterns.com
Sat Aug 21 09:52:50 UTC 2004
I'm new to both PHP and WordPress, so please take it easy on me if this
is a stupid mistake.
I'm trying to develop a plugin, but I am having problems getting even a
simple one to work. Here is my plugin test code:
<?php
/*
Plugin Name: Test
*/
function test_it($text) {
return preg_replace("/aaaa/", "a", $text);
}
add_filter('the_content', 'test_it');
?>
When I run it with an 'aaaa' string in my index.php file, nothing
happens. I know the plugin is being called, because if I put a syntax
error into it, an error appears on the page. I know plugins are working
on my site because the Hello Dolly plugin works.
Any ideas what I'm doing wrong?
Thanks.
--
Toivo Lainevool
http://0blog.com
More information about the hackers
mailing list