Thord Daniel Hedengren - Smashing WordPress_ Beyond the Blog-Wiley (2014)

(avery) #1

CHAPTER 7 • Making the Most of WordPress Plugins 211


When your plugin is approved, you’ll get access to the subversion directory, to which you submit
the plugin, along with a valid readme file. A readme validator (http://wordpress.org/
plugins/about/validator) makes sure that all the data needed for the WordPress.org
directory to list the plugin information is there.


You should read the Plugin Directory’s Developer FAQ before submitting a plugin to make sure
that you have the most up-to-date information on the matter. This will almost certainly speed
up the approval process. You can find the FAQ at http://wordpress.org/plugins/
about/faq.


The benefits of being hosted in the WordPress.org repository are not only the automatic
update functionality from within the actual users’ admin interfaces, but also the statistics it
adds. You’ll see how many people have downloaded the plugin, get ratings, and be able to get
comments on it. In addition to that, WordPress.org is also the central point for WordPress, so
chances are good that people will find your plugin, compared to just hosting it on your own
site and hoping people come across it. Add the plugin search interface within the WordPress
admin interface, and your plugin can be found from within any up-to-date WordPress system
out there and installed with just a few clicks.


That is, if you’re in the WordPress.org repository. So get in there!


Looking for an alternative to WordPress.org for your plugin hosting needs? Check out
GitHub (http://github.com) and Bitbucket (http://bitbucket.com),
which are free for open source software and pretty sweet to work with, especially if
you know Git. If not, then there is always software that will help you out.

A FINAL WORD OF WARNING AND


ENCOURAGEMENT


Developing WordPress plugins differs quite a lot from creating WordPress themes. Sure, there
are a lot of similarities, but in the end, what you’re really doing is writing PHP scripts that tap
into the WordPress functionality. This means that whereas just about anyone with a little
scripting knowledge can bend WordPress themes to his or her will, the same just doesn’t apply
when it comes to plugins. You need a working knowledge of PHP, and you need to be wary
because you can cause a lot of damage, especially if you’re tinkering with the database.


With that caveat noted, if you know a little PHP, developing plugins can be the solution to
building the site you want, so knock yourself out. And if you don’t feel that you have the
know-how, look for plugins within the WordPress ecosystem. Alter the plugins, make them
better, and tweak them to fit your needs — and you’ll learn about how they work in the process.


The next chapter discusses when to use a plugin and when to just rely on your theme’s
functions.php file.

Free download pdf