Abstract
While theme functions are quite powerful, they aren’t very portable. If you ever want to switch themes, you’ll 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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Stephanie Leary
About this chapter
Cite this chapter
Leary, S. (2013). Creating Plugins. In: WordPress for Web Developers. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-5867-4_13
Download citation
DOI: https://doi.org/10.1007/978-1-4302-5867-4_13
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-5866-7
Online ISBN: 978-1-4302-5867-4
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books