Attending to the Basics
In this chapter, you discover how to use a plugin template to deal with some of the programming you will use repeatedly as a plugin developer. You must also include some basic information within your plugin so that the users of your plugin identify the plugin easily. Standard practices also exist for the elements that should be included in your plugin if you intend to submit it to the official WordPress Plugin Directory at http://wordpress.org/extend/plugins. Plugins submitted to the directory are reviewed and vetted by WordPress developers to make sure that your plugin has all the necessary elements, is formatted correctly, and meets the standards of practice for all plugins.
Among these necessary elements — the basics — is a short snippet of code at the top of your plugin file that identifies seven important identifying characteristics of your plugin:
- Plugin Name: The identifying name of your plugin. Obviously, giving your plugin a unique and appropriate name is a good start so that it's easily identifiable in the WordPress Plugin Directory and the list of plugins available on a user's Dashboard. Because people who use WordPress will most likely install several plugins in their installation of WordPress, you want to make sure that your plugin has a unique name, and preferably a name that describes, in just a few words, what your plugin is.
For example, say you're writing a plugin that allows people to connect their blog to the Twitter service. Would naming ...
Get WordPress® All-in-One For Dummies® 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.