Abstract
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: modify or replace existing functions (filters), add your functions in predetermined locations (actions), create new template tags and shortcodes, and more.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Stephanie Leary
About this chapter
Cite this chapter
(2010). Creating Plugins. In: Beginning WordPress 3. Apress. https://doi.org/10.1007/978-1-4302-2896-7_9
Download citation
DOI: https://doi.org/10.1007/978-1-4302-2896-7_9
Publisher Name: Apress
Print ISBN: 978-1-4302-2895-0
Online ISBN: 978-1-4302-2896-7
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books