C H A P T E R  9

Image

Creating Plugins

While theme functions are quite powerful, they aren't very portable. If you ever wanted to switch themes, you would have to copy all your essential functions from one theme to another. There's another option: many of the theme functions you've seen throughout this book could become plugins. Plugins offer much better control over functions, since you can activate and deactivate them as needed. The plugin manager also provides some safeguards, since plugins containing errors will fail to activate, whereas errors in a theme functions file will affect your site immediately. You can do any number of things with plugins: ...

Get Beginning WordPress 3 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.