wordpress plugin

Easy Tips on How to Write a WordPress Plug-In

WordPress Plug-ins makes it easier to personalize, modify, and enhance the look of a WordPress blog. The Plug-in allows you to improve the functionality of the blog rather than changing the original programming of WordPress. Here is what you need to know about WordPress Plug-ins.

A WordPress Plug-in is a set of one or more functions or a program written in PHP scripting language. This adds specific features to WordPress weblog which can be integrated to the web blog using methods and access points provided by the WordPress Plug-in application program interface.

If you are looking to improve the functionality of WordPress, you should search for various WordPress Plug-in sources and repositories to see if someone has created Plug-ins that meet your needs. If you can’t find the sources, this article will guide you through the process of creating your own WordPress Plug-in.

Creating a WordPress Plug-In

Here, you will find detailed information on how you can create a good and well structured WordPress Plug-in.

Naming the plug-in

Think about what you want the Plug-in to do and come up with a unique name. To ensure that the name is original, check out Plug-in repositories and do a Google search on the proposed name. In many cases, people choose names that relate to what the Plug-in does. For example, marketing Plug-in would have the word marketing in its name. The name can also be made of different words.

Creating Plug-in files

Use the chosen Plug-in name to create a PHP file. For example, if your Plug-in is called excellent functionality, you can call your PHP file “excellent-functionality.php”. It is also important that you use a unique name because no two PHP files containing the same name can be used. Splitting your Plug-in into different files is another option.

The WordPress Plug-in must have more than one PHP file and it could also contain CSS files, language files, JavaScript, Image files etc. If you have created many files, pick two unique names- a directory name and a name of your choice, for example, excellent functionality and excellent functionality.php.

After putting all the plugins into the directory, ask your users to install the entire directory under wp-content/plugins/.

 

Creating a Readme file for your Plug-in

You will be required to use a Readme file if you want to host your new Plug-in on http://wordpress.org/extend/plugins/. The file must be in a standard format and you must use it with the Plugin. Use the automatic generator plugin ‘readme.txt’ generator or find a description on how to write the format here http://wordpress.org/extend/plugins/about/readme.txt.

Creating your Plugin’s home page

Your WordPress Plugin should have a web page that will act like its home page. This page will provide your users with useful information like what the Plug-in does, how to install the Plug-in versions of WordPress that are compatible with it, how to use it, and what your new version offers.

Licensing your Plug-in

The standard header will provide you with the information you need about licensing your Plug-in. Most WordPress Plug-ins use the GPL2 license or any license that is compatible with GPL2.