Chapter 5: Creating Simple WordPress Plugins from Scratch

In This Chapter

  • Creating a valid plugin
  • Filtering content
  • Adding shortcodes and widgets
  • Creating a plugin settings page

WordPress plugins are one of the greatest parts of WordPress. As open source software, a developer can extend WordPress functionality through plugins and themes, and WordPress provides a great API (Application Program Interface) to do so. Using WordPress's built-in action hooks and filter hooks, you can create just about any functionality you can imagine. In this chapter on creating simple plugins, we assume that you have basic PHP knowledge.

image This All-in-One doesn't turn you into a PHP programmer or MySQL database administrator; Book II, Chapter 3 gives you a glimpse of how PHP and MySQL work together to help WordPress build your Web site. If you're interested in finding out how to program PHP or become a MySQL database administrator, check out PHP and MySQL For Dummies by Janet Valade (Wiley).

image Often, WordPress users are tempted to edit the core code of WordPress rather than write a plugin to achieve the desired functionality. This isn't recommended because it makes upgrading difficult and can cause various problems, including serious security issues.

When writing a plugin, you can develop it by using ...

Get WordPress® All-in-One For Dummies® 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.