views:

23

answers:

2

I was wondering how extensive your knowledge of php should be to write a decent wordpress plugin? Can you create a wordpress plugin with just basic knowledge and little experience with the language?

thanks.

+1  A: 

If you can write a script that does something you can write a wordpress plugin.

Examine existing WP plugins to get the structure right and some inspiration. I started just by recreating existing ones from scratch to get a feel for it.

<?php
/*
Plugin Name: My Plugin
Plugin URI: http://foobar.co.uk/
Description: A brief description of the Plugin.
Version: The Plugin's Version Number, e.g.: 1.0
Author: Foo
Author URI: http://URI_Of_The_Plugin_Author
License: A "Slug" license name e.g. GPL2
*/


function my_function($text)
{
    return str_replace('Foo', 'Bar', $text);
}

add_filter('the_content', 'my_function');
?>

plugin that replaces any post containing the word "Foo" with the word "Bar".

a terrible example, but its far from unachievable.

the WP docs are great as well - http://codex.wordpress.org/Writing_a_Plugin

Ross
A: 

There are some great tutorials online to help any level of experience:

http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/

Phill Pafford