Skip to main content

Creating Plugins

  • Chapter
  • 1536 Accesses

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics