The Book Recap: Professional WordPress Plugin Development
This book will teach you everything you need to know about developing WordPress plugins. It will walk you through the initial steps of setting up your first plugin to advanced topics never before covered in detail.
Chapter 1: An Introduction to Plugins
What is a Plugin?
This chapter covers about the basic of plugins. Explain the list of main WordPress APIs and How plugins interact with WordPress. This chapter gives introduction of WordPress APIs and their function:
- Dashboard Widgets
When Are Plugins Loaded?
There’s a informative diagram of the order of standard loading process when loading a page in WordPress. From wp-config to page content.
This chapter also covers about when to add functionality in theme vs plugin, the advantage to using plugins, how to install plugins, managing, editing, type of plugins, and testing plugin functionality.
Chapter 2: Plugin Foundation
this chapter is about how to create a plugin. Folder structure, license, plugin path, activation/deactivation function, create default options on plugin activation, the difference of plugin deactivation and plugin uninstall, and the most important, Coding Standard and Best Practice. Explain in detail about how to document your code and a nice list of Plugin Development Checklist.
Chapter 3: Hooks
Hooks are the backbone of WordPress. This chapter is all about hooks:
- Action hook
- Filter hook
- Create custom hook with example
- How to find hook
Chapter 4: Integrating in WordPress
How to add menu, and sub-menu for your plugin admin page, creating widgets and dashboard widgets with options, create meta boxes, and designing and styling your plugin.
Chapter 5: Internationalization
Chapter 6: Plugin Security
This chapter is about how to secure your plugin from abuse, for example: Cross site scripting, (XSS), Cross Site Request Forgery (CSRF), SQL Injection, Privilege Escalation, Vulnerabilities, Holes, etc. This chapter explain how to correctly use User Permissions, Nonces, Data Validation and Sanitization, and how to Format SQL Statements.
Chapter 7: Plugin Settings
- Using a WordPress database to save and get data
- Leveraging the API functions to write compact and future proof
- Saving global options, or per user options
- Saving special option types: expiring options
- Creating Custom database table, when and how to do it.
Chapter 8: Users
- Working with users and user functions
- Adding, updating, and retrieving user data
- Developing for roles and capabilities
- Limiting access with user permission
- Customizing user roles
Chapter 9: HTTP API
- Learning what an HTTP request is
- Performing HTTP request with WordPress
- Plugging your blog with third-party APIs
- Reading server responses in various formats
- Creating your own remote API
Chapter 10: The Shortcode API
- Creating custom shortcode
- Register complex and parameterized shortcodes
- mastering advanced shortcode tips
- Connecting your site with Google Maps
Chapter 11: Extending Posts: Metadata, Custom Post Types, and Taxonomies
This chapter is all about post, the content of your blog/website. And the possibilities of WordPress as CMS.
- Understanding JQuery and Ajax
- Adding script only when needed
- Making interactive interfaces with Ajax in WordPress
- Implementing security checks in your Ajax request
- Complete example: Instant “Read More” Links
Chapter 13: Cron
- Understanding cron
- Managing schedule and single events
- Unscheduling cron events
- Viewing all schedule cron jobs
- Creating custom intervals in cron
- Creating practical use examples
Chapter 14: The Rewrite API
- Understanding the concept of URL rewriting
- Creating Rewrite rules in plugins
- Making a complete, new permalink structure
- Integrating a non-WordPress page with the same URL layout
- Generating a custom feed
Chapter 15: Multisite
- Using Multisite versus standard WordPress
- Understanding Multisite terminology
- Exploring common Multisite functions
- Switching between sites in a network
- Managing how to aggregate content across sites
- Working with network and site options
- Understanding users and site roles
- Determining database schema differences
- Installing and configuring Multisite
Chapter 16: Debugging and Optimizing
- Keeping updated with WordPress
- Debugging your plugins
- Logging debug errors
- Caching data for optimal speed