O'Reilly logo

WordPress® All-in-One For Dummies® by Michael Torbert, Andrea Rennick, Kevin Palmer, Cory Miller, Lisa Sabin-Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required