Free Sample
+ Collection

WordPress Plugin Development: Beginner's Guide

Beginner's Guide
Vladimir Prelovac

Build powerful, interactive plug-ins for your blog and to share online
RRP $23.99
RRP $39.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847193599
Paperback296 pages

About This Book

  • Everything you need to create and distribute your own plug-ins following WordPress coding standards
  • Walk through the development of six complete, feature-rich, real-world plug-ins that are being used by thousands of WP users
  • Written by Vladimir Prelovac, WordPress expert and developer of WordPress plug-ins such as Smart YouTube and Plugin Central
  • Part of Packt's Beginners Guide series: expect step-by-step instructions with an emphasis on experimentation and tweaking code

Who This Book Is For

This book is for programmers working with WordPress, who want to develop custom plug-ins and to hack the code base. You need to be familiar with the basics of WordPress and PHP programming and believe that code is poetry; this book will handle the rest.

Table of Contents

Chapter 1: Preparing for WordPress Development
How will you benefit?
Challenges involved
Plugins developed in this book
Tools for the job
Final notes
Chapter 2: Social Bookmarking
Plugging in your first plugin
Displaying a Digg button
WordPress plugin hooks
Adding a Digg button using JavaScript code
Styling the output
Chapter 3: Live Blogroll
Starting up with the blogroll
jQuery JavaScript library
JavaScript and WordPress
Creating the pop-up with CSS
Demystifying Ajax
Chapter 4: The Wall
The main concepts behind the Wall plugin
Creating a widget
Widget controls
Create a WordPress page from the code
Handling user input
Managing Ajax comment submit
Dynamically load comments
Ajax security
Chapter 5: Snazzy Archives
Using a class for plugin
Showing template output with shortcodes
Prepare archives
Apply styling and jQuery to archives
Creating plugin options page
Use plugin options
Caching the plugin output
Chapter 6: Insights for WordPress
Creating custom panels in the editor screen
Searching the posts
Interacting with tinyMCE
Using Flickr API
Creating a tinyMCE plugin
Chapter 7: Post Types
Handling localization
Adding a post template
Handling file and image uploads
Using custom fields
Quick post a link
Tinkering with WordPress backend menus
Programming the Manage panel
Handling error messages
User roles and capabilities
Chapter 8: Development Goodies
Creating Localization files
Documentation and support
Code management and plugin repository
General plugin development guidelines
WordPress MU development
WordPress and GPL
Online resources

What You Will Learn

  • Get to know the WordPress code base, WordPress's plug-in architecture, and the plug-in application programming interface (API) and learn how to hack it
  • Master the WordPress database and the API – access and manipulate data, handle user roles and permissions, posts, and so on
  • Hook into the rest of WordPress using actions and filters
  • Change the way your WordPress backend looks by customizing menus, submenus, and the plug-in admin panel
  • Integrate AJAX and jQuery into your plug-ins to dynamically generate content
  • Hook directly to WordPress edit pages and use AJAX to generate fast searches
  • Integrate your plug-in with WordPress panels and the tinyMCE editor
  • Access and work with third-party APIs like Flickr
  • Implement localization support for users of other languages
  • Maintain and manage your plug-in using SVN and publish it to the WordPress Plugin Repository
  • Handle security issues and make your plug-ins safer to use

We cover the development of six plug-ins from start to finish:

  • Digg-this: Adds a Digg This button to each post.
  • Live Blogroll: Adds a recent posts popup for each blog in your blogroll.
  • The Wall widget: Displays comments on the sidebar without reloading the page.
  • Snazzy Archives: Presents your site archives in a unique visual way.
  • Insights: Access your articles and Flickr images from within the WordPress edit page.
  • Post Types: Provides pre-defined post templates to quickly add a photo or a link to your blog.

In Detail

If you can write WordPress plug-ins, you can make WordPress do just about anything. From making the site easier to administer, to adding the odd tweak or new feature, to completely changing the way your blog works, plug-ins are the method WordPress offers to customize and extend its functionality. This book will show you how to build all sorts of WordPress plug-ins: admin plug-ins, Widgets, plug-ins that alter your post output, present custom "views" of your blog, and more.

WordPress Plug-in Development (Beginner’s Guide) focuses on teaching you all aspects of modern WordPress development. The book uses real and published WordPress plug-ins and follows their creation from the idea to the finishing touches, in a series of carefully picked, easy-to-follow tutorials. You will discover how to use the WordPress API in all typical situations, from displaying output on the site in the beginning to turning WordPress into a CMS in the last chapter. In Chapters 2 to 7 you will develop six concrete plug-ins and conquer all aspects of WordPress development.

Each new chapter and each new plug-in introduces different features of WordPress and how to put them to good use, allowing you to gradually advance your knowledge. This book is written as a guide to take your WordPress skills from the very beginning to the level where you are able to completely understand how WordPress works and how you can use it to your advantage.


Read More