Creating a Plugin of Your Very

Plug-ins can get pretty complicated, requiring knowledge of PHP that goes beyond the scope of this book. But if you want to create your own plug-ins, you should be aware of a formatting issue: If you want your custom plug-in's name, version number, and description to show up in the Plugin Management panel, you need to include some important header information in a PHP comment (PHP comments start with /* and end with */).

Here is an example plug-in that does nothing other than show up correctly in the Plugin Management panel:

Plugin Name: My totally awesome plug-in Plugin URI: Description: This plug-in is only for demonstration purposes related to the blog <a href="http://www.wordpressforall. com/">WordPress For All</a>. Author: Scott McNulty Author URI: Version: 1.0 */

Plug-ins are written in PHP, which means you have to open the <php> tag first to let the server know how to handle this file. The rest of the code provides WordPress information to display in the Plugin Management panel. Here's a breakdown of the elements of this code:

• Plugin Name. This variable sets the display name of the plug-in— in this case, My totally awesome plug-in. That name will be displayed in the name column of each plug-in table.


Was this article helpful?

0 0

Post a comment