Book Image

WordPress Plugin Development: Beginner's Guide

Book Image

WordPress Plugin Development: Beginner's Guide

Overview of this book

If you can write WordPress plug-ins, you can make WordPress do just about anything. From making the site easier to administer, to adding the odd tweak or new feature, to completely changing the way your blog works, plug-ins are the method WordPress offers to customize and extend its functionality. This book will show you how to build all sorts of WordPress plug-ins: admin plug-ins, Widgets, plug-ins that alter your post output, present custom "views" of your blog, and more. WordPress Plug-in Development (Beginner's Guide) focuses on teaching you all aspects of modern WordPress development. The book uses real and published WordPress plug-ins and follows their creation from the idea to the finishing touches, in a series of carefully picked, easy-to-follow tutorials. You will discover how to use the WordPress API in all typical situations, from displaying output on the site in the beginning to turning WordPress into a CMS in the last chapter. In Chapters 2 to 7 you will develop six concrete plug-ins and conquer all aspects of WordPress development. Each new chapter and each new plug-in introduces different features of WordPress and how to put them to good use, allowing you to gradually advance your knowledge. This book is written as a guide to take your WordPress skills from the very beginning to the level where you are able to completely understand how WordPress works and how you can use it to your advantage.
Table of Contents (14 chapters)
WordPress Plugin Development
Credits
About the Author
About the Reviewer
Preface
Index

Challenges involved


Developing WordPress plugins is not always an easy job. It brings a number of challenges that you will need to overcome.

Development

WordPress uses PHP and provides an API with its own functions. The API has grown over time, and now covers all possible methods of communication between WordPress and the plugin.

This book will cover all the aspects of the API with practical examples, and the development of six concrete plugins (chapters 2-7). Through step-by-step guides to creating these plugins, you will discover how to use API in typical situations, from displaying output on the site in the beginning, to turning WordPress into a CMS at the end.

Each new chapter and each new plugin will introduce different features of WordPress, and how to put them to good use, thereby allowing you to gradually advance your knowledge.

Security

As much as WordPress team takes care of the WordPress core, you need to take care of security in your plugins. Always remember that your plugin is given the ultimate authority on the user's site. This is a great feature that allowed WordPress to become popular; but with that it also carries a great deal of responsibility.

This book will show the methods and functions best suited to the given situations, and underline the security implications. There are not too many issues to worry about, so make sure you remember the implications and best practices and apply them to your plugins.

Work after development

Once the development work is done and the plugin is finished, a lot of authors face the question: What now? If you plan to release the plugin to the public, there are a few extra steps you need to take care of.

This book will give you practical tips in this area—refer to Chapter 8.

It will cover the process that takes you from the end of the development phase to the first users coming back to you with feedback and questions. I have learned much from my own plugin development experience, and I will also be referencing some of the resources available online .

Localization

At the moment, WordPress is translated into more than 50 languages worldwide. The number of users using WordPress in their native language is growing each day, and they usually prefer using plugins that support their own language.

Localization in WordPress is easy, and the best thing is that you will not have to do any translation. There will always be users interested in translating your plugin to their own language and sending you the file back. This is the way it works, and it is mutually beneficial.

Documentation

Writing documentation is often boring work but I will show you templates which will help you to do it more efficiently and also point out the benefits of writing good documentation.

I will also cover the necessary steps to manage your plugin using SVN (Subversion), and submit it to the WordPress Plugin Repository—the central repository of all WordPress plugins which currently hosts thousands of plugins and has served millions of downloads.

Support

Good documentation goes a long way when it comes to support.

You can expect hundreds of user questions pouring in after you release a plugin. So, making sure that you have a well written documentation will save you a lot of time in answering those questions.

I will also give some practical tips on how to organize your plugin page.

Promotion

Writing a good plugin that nobody knows about is a fruitless effort.

I will give you tips on how to promote your plugin once it is published. If you have created a really useful plugin, you can expect a snowball effect when users start to write about it on their blogs and tell their friends about it.