Creating a wordpress plugin can make your blogging experience a lot more interesting and fun. WordPress plugins allow you to modify , customize and bring new features to the WordPress platform . Plugins are grafted to the blog, it is not necessary and it is not recommended to modify the files within WordPress.

Before you start developing a plugin you must first have a good knowledge of PHP programming, be familiar with how wordpress functions , know about tags, hooks.

Plugin Creation Tips

Check the WordPress plugins directory to confirm that someone has not already had the same idea of a plugin that you want to create. Verify that no other plugin has the same name as yours.

Add your plugin to the plugin directory. This way it will be much easier for users to find, and upgrade it from within their admin area and also to access its documentation.

Choose a unique name for your plugin files. If a user installs it directly into / wp-content/plugins without creating a sub – directory, your files could overwrite files that have the same name.

If you add your plugin to the official directory, you must create a readme.txt file which will contain different information about the version of the plugin and it’s compatibility with the versions of wordpress, its description, installation and support.

Think of internationalizing your plugin. Everyone does not speak English and some users may wish to translate it without having to modify the source files . You should begin creating the plugin with the phrase.php file the content of which is displayed in the “extensions” in the wordpress blog.The next step is to write the plugin. Here you have to use a hook which will allow to hang the php function and the rest will depend on what plugin you want to create.

Here’s an example of the phrase.php and code of a simple plugin that ads an extra line before the beginning of each section and page:

< php
/*
Plugin Name: Add a line of text
Plugin URI : http://mon-blog.fr/plugins/
Description: This plugin will display a line of text at the beginning of each section.
Version: 0.1
Author: First Name
Author URI: http://mon-blog.fr/
License: My license GPL2
*/
?>

Code

function hello_world ($ content ) {
if ( is_single ( ) ) {
$ Text = ” Hello Word <p> </ p > “;
return $ text. $ content ;
}
else {
return $ content ;
}
}
add_action (‘ the_content ‘, ‘ hello_world ‘ );

A plugin could be as simple as a search engine query plugin or as complex as a Sitemap generator plugin. Whatever plugin you create, the purpose should be to make your work much easier and faster.