WordPress Plugin Development Cookbook
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
Book Details
Language : EnglishPaperback : 318 pages [ 235mm x 191mm ]
Release Date : July 2012
ISBN : 1849517681
ISBN 13 : 9781849517683
Author(s) : Yannick Lefebvre
Topics and Technologies : All Books, Cookbooks, Content Management (CMS), Open Source, WordPress
Table of Contents
PrefaceChapter 1: Preparing a Local Development Environment
Chapter 2: Plugin Framework Basics
Chapter 3: User Settings and Administration Pages
Chapter 4: The Power of Custom Post Types
Chapter 5: Customizing Post and Page Editors
Chapter 6: Accepting User Content Submissions
Chapter 7: Creating Custom MySQL Database Tables
Chapter 8: Leveraging JavaScript, jQuery, and AJAX Scripts
Chapter 9: Adding New Widgets to the WordPress Library
Chapter 10: Enabling Plugin Internationalization
Chapter 11: Distributing Your Plugin on wordpress.org
Index
- Chapter 1: Preparing a Local Development Environment
- Introduction
- Installing a web server on your computer
- Downloading and configuring a local WordPress installation
- Creating a local Subversion repository
- Importing initial files to a local Subversion repository
- Checking out files from a Subversion repository
- Committing changes to a Subversion repository
- Reverting uncommitted file changes
- Viewing file history and reverting content changes to older revisions
- Installing a dedicated code/text editor
- Installing and configuring the NetBeans Integrated Development Environment
- Interacting with a Subversion repository from the NetBeans interface
- Managing a MySQL database server from the NetBeans interface
- Chapter 2: Plugin Framework Basics
- Introduction
- Creating a plugin file and header
- Adding output content to page headers using plugin actions
- Using WordPress path utility functions to load external files and images
- Modifying the page title using plugin filters
- Adding text after each item's content using plugin filters
- Inserting link statistics tracking code in page body using plugin filters
- Troubleshooting coding errors and printing variable content
- Creating a new simple shortcode
- Creating a new shortcode with parameters
- Creating a new enclosing shortcode
- Loading a stylesheet to format plugin output
- Writing plugins using object-oriented PHP
- Chapter 3: User Settings and Administration Pages
- Introduction
- Creating default user settings on plugin initialization
- Storing user settings using arrays
- Removing plugin data on deletion
- Creating an administration page menu item in the Settings menu
- Creating a multi-level administration menu
- Hiding items which users should not access from the default menu
- Rendering the admin page contents using HTML
- Processing and storing plugin configuration data
- Displaying a confirmation message when options are saved
- Adding custom help pages
- Rendering the admin page contents using the Settings API
- Accessing user settings from action and filter hooks
- Formatting admin pages using meta boxes
- Splitting admin code from the main plugin file to optimize site performance
- Storing stylesheet data in user settings
- Managing multiple sets of user settings from a single admin page
- Chapter 4: The Power of Custom Post Types
- Introduction
- Creating a custom post type
- Adding a new section to the custom post type editor
- Displaying single custom post type items using custom templates
- Creating an archive page for custom post types
- Displaying custom post type data in shortcodes
- Adding custom categories for custom post types
- Hiding the category editor from the custom post type editor
- Displaying additional columns in the custom post list page
- Adding filters for custom categories to the custom post list page
- Updating page title to include custom post data using plugin filters
- Chapter 5: Customizing Post and Page Editors
- Introduction
- Adding extra fields to the post editor using custom meta boxes
- Displaying custom post data in theme templates
- Hiding the Custom Field section in the post editor
- Extending the post editor to allow users to upload files directly
- Chapter 6: Accepting User Content Submissions
- Introduction
- Creating a client-side content submission form
- Saving user-submitted content in custom post types
- Sending e-mail notifications upon new submissions
- Implementing a captcha on user forms
- Chapter 7: Creating Custom MySQL Database Tables
- Introduction
- Creating new database tables
- Deleting custom tables on plugin removal
- Updating custom table structure on plugin upgrade
- Displaying custom table data in an admin page
- Inserting and updating records in custom tables
- Deleting records from custom tables
- Displaying custom database table data in shortcodes
- Implementing a search function to retrieve custom table data
- Importing data from a user file into custom tables
- Chapter 8: Leveraging JavaScript, jQuery, and AJAX Scripts
- Introduction
- Safely loading jQuery onto WordPress web pages
- Displaying a pop-up dialog using the built-in ThickBox plugin
- Controlling pop-up dialog display using shortcodes
- Displaying a calendar day selector using the Datepicker plugin
- Adding tooltips to admin page form fields using the TipTip plugin
- Using AJAX to dynamically update partial page contents
- Chapter 9: Adding New Widgets to the WordPress Library
- Introduction
- Creating a new widget in WordPress
- Displaying configuration options
- Validating configuration options
- Implementing the widget display function
- Adding a custom dashboard widget
- Chapter 10: Enabling Plugin Internationalization
- Introduction
- Changing the WordPress language configuration
- Adapting default user settings for translation
- Making admin page code ready for translation
- Modifying shortcode output for translation
- Translating text strings using Poedit
- Loading a language file in the plugin initialization
- Chapter 11: Distributing Your Plugin on wordpress.org
- Introduction
- Creating a readme file for your plugin
- Applying for your plugin to be hosted on wordpress.org
- Uploading your plugin using Subversion
- Providing a plugin banner image
Yannick Lefebvre
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 3 submitted: last submission 17 May 2013Errata type:Technical editor | page number:105
The 4th paragraph that begins with "When the configuration page is visited,
the top-level form is created using regular HTML code, setting the action to
admin_post.php ...
Here, "admin_post.php" should be "options.php"
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

