beginning plugin d

Post on 15-May-2015

1.006 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Getting Started withWordPress Development

by John Hawkins

@VegasGeekJohnHawkinsUnrated.com

Friday, August 27, 2010

$about[‘presentation’]

• Tools

• Hooks

• Code

• Resources

Friday, August 27, 2010

Tools

Friday, August 27, 2010

Develop Locally

• Windows: XAMPPhttp://h.awkins.com/xampp

• Mac: MAMPhttp://h.awkins.com/mamp

Friday, August 27, 2010

Use an IDE• Syntax highlighting

• Error checking

• Auto-completefunctions

• Try NetBeans

h.awkins.com/wiki-ideh.awkins.com/netbeans-config

Friday, August 27, 2010

Hooks

Friday, August 27, 2010

What’s a Hook?

• Specific points in the WordPress code used to interact with WordPress

• Two types of hooks; Actions and Filters

• 1300+ hooks in WordPress 3.0

List of hooks: http://h.awins.com/wp-hooks

Friday, August 27, 2010

Action Hooks

• Tell WordPress to perform a function at a specific point

Friday, August 27, 2010

Filter Hooks

• Passes data to your function

• Your function can modify the data and send it back to WordPress

Friday, August 27, 2010

Code

Friday, August 27, 2010

What will it do?

• Create a shortcode

• Display info for an upcoming event in a page or post

• Create an admin panel to update event info

Friday, August 27, 2010

The Plugins Folder

• Single files go directly in the plugin folder

• Multiple files go in their own folder

• WordPress only looks one folder deep

Friday, August 27, 2010

The Plugins Folder

• Single files go directly in the plugin folder

• Multiple files go in their own folder

• WordPress only looks one folder deep

Friday, August 27, 2010

Plugin Header

Friday, August 27, 2010

Plugin Header

Friday, August 27, 2010

The Function

Friday, August 27, 2010

Friday, August 27, 2010

Friday, August 27, 2010

Add a Settings Page

Friday, August 27, 2010

The Settings Form

Friday, August 27, 2010

Options Page

Friday, August 27, 2010

Use the Option Values

Friday, August 27, 2010

Resources

Friday, August 27, 2010

Resources

• http://codex.wordpress.org

• http://h.awkins.com/wc-utah

Friday, August 27, 2010

Thank You!I am: John Hawkins

I email: john@vegasgeek.comI tweet: @VegasGeekI blog: JohnHawkinsUnrated.comI work: 9seeds.com

Friday, August 27, 2010

top related