WordPress Plugin Development Cookbook: Explore the complete set of tools to craft powerful plugins that extend the world’s most popular CMS
✍ Scribed by Y. Lefebvre
- Year
- 2022
- Tongue
- English
- Leaves
- 420
- Edition
- 3
- Category
- Library
No coin nor oath required. For personal study only.
✦ Table of Contents
Cover
Title Page
Copyright and Credits
Dedication
Contributors
Table of Contents
Preface
Chapter 1: Preparing a Local Development Environment
Technical requirements
Installing a local web server on your computer
How to do it…
How it works…
There's more…
Creating a local version control repository
How to do it…
How it works…
There's more…
Installing a dedicated code editor/text editor
Getting ready
How to do it…
How it works…
There's more…
Chapter 2: Plugin Framework Basics
Technical requirements
Creating a plugin file and header
Getting ready
How to do it...
How it works...
See also
Adding output content to page headers using plugin actions
How to do it...
How it works...
There's more...
See also
Using WordPress path utility functions to load external files and images
How to do it...
How it works...
There's more...
See also
Modifying the site generator meta tag using plugin filters
How to do it...
How it works...
There's more...
See also
Adding text after each item's content using plugin filters
How to do it...
How it works...
There's more...
See also
Inserting link tracking code in the page body using plugin filters
Getting ready
How to do it...
How it works...
See also
Troubleshooting coding errors and printing variable content
How to do it...
How it works...
There's more...
See also
Creating a new simple shortcode
How to do it...
How it works...
See also
Creating a new shortcode with parameters
How to do it...
How it works...
See also
Creating a new enclosing shortcode
How to do it...
How it works...
See also
Loading a style sheet to format plugin output
Getting ready
How to do it...
How it works...
See also
Writing plugins using object-oriented PHP
Getting ready
How to do it...
How it works...
There's more…
See also
Chapter 3: User Settings and Administration Pages
Technical requirements
Creating default user settings on plugin initialization
How to do it...
How it works...
There's more...
See also
Storing user settings using arrays
Getting ready
How to do it...
How it works...
See also
Removing plugin data on deletion
Getting ready
How to do it...
How it works...
See also
Creating an administration page menu item in the settings menu
Getting ready
How to do it...
How it works...
There's more...
See also
Creating a multi-level administration menu
How to do it...
How it works...
There's more…
See also
Rendering the admin page contents using HTML
Getting ready
How to do it...
How it works...
There's more...
See also
Processing and storing plugin configuration data
Getting ready
How to do it...
How it works...
See also
Displaying a confirmation message when options are saved
Getting ready
How to do it...
How it works...
See also
Adding custom help pages
Getting ready
How to do it...
How it works...
See also
Rendering the admin page contents using the Settings API
How to do it...
How it works...
There's more...
See also
Accessing user settings from action and filter hooks
Getting ready
How to do it...
How it works...
See also
Formatting admin pages using meta boxes
Getting ready
How to do it...
How it works...
See also
Splitting admin code from the main plugin file to optimize site performance
Getting ready
How to do it...
How it works...
See also
Storing style sheet data in user settings
Getting ready
How to do it...
How it works...
See also
Managing multiple sets of user settings from a single admin page
Getting ready
How to do it...
How it works...
See also
Creating a network-level plugin with admin pages
Getting ready
How to do it...
How it works...
See also
Chapter 4: The Power of Custom Post Types
Technical requirements
Creating a custom post type
Getting ready
How to do it...
How it works...
There's more...
See also
Adding a new section to the custom post type editor
Getting ready
How to do it...
How it works...
See also
Displaying single custom post type items using a custom layout
Getting ready
How to do it...
How it works...
See also
Tailoring search output for custom post type items
Getting ready
How to do it…
How it works…
See also
Displaying custom post type data in shortcodes
Getting ready
How to do it...
How it works...
See also
Adding custom categories for custom post types
Getting ready
How to do it...
How it works...
See also
Adding custom fields to categories
Getting ready
How to do it...
How it works...
See also
Hiding the category editor from the custom post type editor
Getting ready
How to do it...
How it works...
See also
Displaying additional columns in the custom post list page
Getting ready
How to do it...
How it works...
See also
Adding filters for custom categories to the custom post list page
Getting ready
How to do it...
How it works...
See also
Adding Quick Edit fields for custom categories
Getting ready
How to do it...
How it works...
Updating the page title to include custom post data using plugin filters
Getting ready
How to do it...
How it works...
Chapter 5: Customizing Post and Page Editors
Technical requirements
Capturing and displaying information using custom meta boxes
Getting ready
How to do it...
How it works...
There's more...
Displaying custom post data using filter functions
Getting ready
How to do it...
How it works...
See also
Hiding the Custom Fields section in the post editor
Getting ready
How to do it...
How it works...
Extending the post editor to attach custom files with the media uploader
Getting ready
How to do it...
How it works...
See also
Chapter 6: Extending the Block Editor
Technical requirements
Setting up a block development environment and creating a simple block
Getting ready
How to do it...
How it works...
There's more...
See also
Creating an editable blockquote block
Getting ready
How to do it...
How it works...
See also
Creating a new WordPress REST endpoint
Getting ready
How to do it...
How it works...
See also
Creating a server-side rendering block that leverages an existing shortcode
Getting ready
How to do it...
How it works...
See also
Chapter 7: Accepting User Content Submissions
Technical requirements
Creating a client-side content submission form
Getting ready
How to do it...
How it works...
See also
Saving user-submitted content in custom post types
Getting ready
How to do it...
How it works...
There's more...
See also
Sending email notifications upon new submissions
Getting ready
How to do it...
How it works...
See also
Implementing a CAPTCHA on user forms using an online service
Getting ready
How to do it...
How it works...
See also
Using a local library to implement a CAPTCHA on user forms
Getting ready
How to do it...
How it works...
See also
Chapter 8: Customizing User Data
Technical requirements
Adding custom fields to the user editor
Getting ready
How to do it...
How it works...
See also
Processing and storing custom user data
Getting ready
How to do it...
How it works...
See also
Displaying new user data on the user list page
Getting ready
How to do it...
How it works...
See also
Using custom user data in an enclosing shortcode
Getting ready
How to do it...
How it works...
See also
Chapter 9: Leveraging JavaScript, jQuery, and AJAX Scripts
Technical requirements
Safely loading jQuery onto WordPress web pages
Getting ready
How to do it...
How it works...
There's more...
Displaying a pop-up dialog using the built-in ThickBox plugin
Getting ready
How to do it...
How it works...
There's more...
Controlling pop-up dialog display using shortcodes
Getting ready
How to do it...
How it works...
See also
Displaying a calendar day selector using the Datepicker plugin
Getting ready
How to do it...
How it works...
Adding tooltips to admin page form fields using the TipTip plugin
Getting ready
How to do it...
How it works...
See also
Using AJAX to dynamically update partial page contents
Getting ready
How to do it...
How it works...
See also
Chapter 10: Adding New Widgets to the WordPress Library
Technical requirements
Creating a new widget in WordPress
Getting ready
How to do it...
How it works...
See also
Displaying widget configuration options
Getting ready
How to do it...
How it works...
See also
Validating widget configuration options
Getting ready
How to do it...
How it works...
See also
Adding a custom dashboard widget
Getting ready
How to do it...
How it works...
See also
Adding a custom widget to the network dashboard
Getting ready
How to do it...
How it works...
See also
Chapter 11: Fetching, Caching, and Regularly Updating External Site Data
Technical requirements
Displaying RSS items from an external feed
Getting ready
How to do it…
How it works...
There's more…
See also
Optimizing plugin performance by storing external data using transients
Getting ready
How to do it...
How it works...
See also
Scheduling plugin data updates using WP-Cron
Getting ready
How to do it...
There's more…
See also
Chapter 12: Enabling Plugin Internationalization
Technical requirements
Changing the WordPress site language configuration
Getting ready
How to do it...
How it works...
Adapting default user settings for translation
Getting ready
How to do it...
How it works...
See also
Making admin page code ready for translation
Getting ready
How to do it...
How it works...
See also
Modifying shortcode output for translation
Getting ready
How to do it...
How it works...
See also
Translating text strings using Poedit
Getting ready
How to do it...
How it works...
There's more...
See also
Loading a language file in the plugin initialization
Getting ready
How to do it...
How it works...
There's more...
See also
Chapter 13: Distributing Your Plugin on WordPress.org
Technical requirements
Creating a README file for your plugin
Getting ready
How to do it...
How it works...
There's more...
Applying for your plugin to be hosted on WordPress.org
How to do it...
How it works...
See also
Uploading your plugin using Subversion
Getting ready
How to do it...
How it works...
There's more...
See also
Providing plugin banner and thumbnail images
Getting ready
How to do it...
How it works...
See also
Index
About Packt
Other Books You May Enjoy
📜 SIMILAR VOLUMES
“WordPress Plugin Development Cookbook” is the perfect companion for plugin developers, offering easy-to-follow instructions to accomplish tasks that range from basic plugin creation and configuration to advanced customization techniques. Each topic is illustrated through realistic examples showing
“WordPress Plugin Development Cookbook” is the perfect companion for plugin developers, offering easy-to-follow instructions to accomplish tasks that range from basic plugin creation and configuration to advanced customization techniques. Each topic is illustrated through realistic examples showing
Over 80 step-by-step recipes to extend the most popular CMS and share your creations with its community Overview Learn to create plugins and configuration panels in order to bring new capabilities to WordPress Tailor WordPress to your needs with new content types, custom widgets, and fancy jQuery e
Learn to create plugins for WordPress 4.x to deliver custom projects or share with the community through detailed step-by-step recipes and code examples About This Book Learn how to change and extend WordPress to perform virtually any task Explore the plugin API through approachable examples and det