
I will be talking at WordCamp Malaysia 2010 on the topic of “Beginning WordPress Plugin Development”. The agenda has been updated to reflect my timing at 3:45pm to 4:45pm.
Beginning WordPress Plugin Development
I will be talking for an hour on the topic of “Beginning WordPress Plugin Development.”
If you are attending my talk, and you want to follow along, please:
- download a copy of the latest version of WordPress 3.0, yes we are going to use the beta.
- get WordPress 3.0 running on your computer. This includes Apache, PHP and MySQL.
- make WordPress 3.0 works
I expect you to have a bit of a programming background because the talk will be a bit technical. As this is an introductory course, only the basics of programming are expected.
We will run through:
- Resources
- What is a hook
- WordPress is the base
- Plugins are the blocks
- Hooks are the pegs
- http://codex.wordpress.org/Plugin_API
- 2 kinds of hooks
- Actions
- Filters
- Actions = “Do Something”
-
Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API.
-
- Filters = Transform
-
Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.
- http://codex.wordpress.org/Plugin_API#Filters
- http://codex.wordpress.org/Plugin_API/Filter_Reference
-
- WordPress v2.9 has 1133 Hooks
- Problem: The right hook for the right job
- WordPress Codex
- WordPress Plugin Directory
- Action and Filter Reference
- Writing your first WordPress plugin
- WordPress Directory Structure
- Plugin Directory Structure
- readme.txt
- screenshot-1.png
- my-plugin.php
- 4 parts to a plugin
- Plugin Header
- Hooks
- PHP Code
- Template Code
- Examine “the_content” filter
- Plugin Headers
- Always on top, no choice
- http://codex.wordpress.org/Writing_a_Plugin#Standard_Plugin_Information
- Hooks
- After plugin headers (my preference). Makes it easier to find
- Hook Name
- Hook Callbacks
- http://codex.wordpress.org/Plugin_API#Hook_to_WordPress
- Hook Callbacks
- String
- Arrays (my preference)
- Makes it easier to modularize code, and prevent name collisions
- Filters are Transformations
- A filters return value is the result of the transformation
- Examine “the_content” filter with priority
- Hook Priority
- Default priority of 10
- Examine “body_class” filter
- accepted_args
- Number of arguments for the filter
- Examine “init” action
This document is expected to change, so please continually come back here.
Any feedback would be appreciated.
About WordCamp Malaysia 2010
WordCamp Malaysia 2010 will be held on Saturday 22nd May 2010. It represents the first every WordCamp to be held in Malaysia.


Pingback: Lebih 150 Orang Berdaftar Ke WordCamp Esok | aMaNz
woaa. will it include the development of dedicated page on the admin panel also?
Pingback: Tweets that mention Speaking At WordCamp Malaysia 2010 « Strange Symphonies -- Topsy.com