Creating our plugin
Now that we have a working mockup, we can finally create our plugin. As before, we will start with a simple outline and then flesh it out. This time, however, we're going to introduce a new structure for our plugin and its related files, including several directories and PHP classes. Learning good organization and some object-oriented structures is an important step in your education as a developer.
We are choosing the name "Live Search" for our plugin, so our first step is to create a directory named live-search
inside the wp-content/plugins/
directory.
Inside that directory, we recommend the following items:
- An
index.php
file which houses the Information Header for the plugin - A directory for style sheets, named
css
- A directory ...
Get WordPress 3 Plugin Development Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.