Creating your first plugin for WordPress can seem like a lot of work. If you start out right, it will be easy and soon you can be a pro plugin developer! In this tutorial we will be making a simple plugin based off of the Hello Dolly plugin for WordPress, that displays animal names. This isn't per se something you would do, but the code is simple.
Name your plugin. Search Google and the WordPress Plugin Repository before choosing the name. If you make a plugin that emails a contact list, use 'email' in the title. We will call it
First, open a text editor. Notepad will work. Insert this text into the document:
<?php
/*
Plugin Name: My Plugin
Plugin URI: http://pluginsite.com/
Description: Short description.
Version: 1.0
Author:
Author URI: http://mysite.com/
License: GPL2
?>
Then this text:
<?php
/* Copyright 2011 Your Name (email : somebody@example.com)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
?>
This is the header and the license. The header is used to identify your plugin when someone downloads it.
myfavposts.php.