beginning plugin d

25
Getting Started with WordPress Development by John Hawkins @VegasGeek JohnHawkinsUnrated.com Friday, August 27, 2010

Upload: vegasgeek

Post on 15-May-2015

1.006 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Beginning Plugin d

Getting Started withWordPress Development

by John Hawkins

@VegasGeekJohnHawkinsUnrated.com

Friday, August 27, 2010

Page 2: Beginning Plugin d

$about[‘presentation’]

• Tools

• Hooks

• Code

• Resources

Friday, August 27, 2010

Page 3: Beginning Plugin d

Tools

Friday, August 27, 2010

Page 4: Beginning Plugin d

Develop Locally

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

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

Friday, August 27, 2010

Page 5: Beginning Plugin d

Use an IDE• Syntax highlighting

• Error checking

• Auto-completefunctions

• Try NetBeans

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

Friday, August 27, 2010

Page 6: Beginning Plugin d

Hooks

Friday, August 27, 2010

Page 7: Beginning Plugin d

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

Page 8: Beginning Plugin d

Action Hooks

• Tell WordPress to perform a function at a specific point

Friday, August 27, 2010

Page 9: Beginning Plugin d

Filter Hooks

• Passes data to your function

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

Friday, August 27, 2010

Page 10: Beginning Plugin d

Code

Friday, August 27, 2010

Page 11: Beginning Plugin d

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

Page 12: Beginning Plugin d

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

Page 13: Beginning Plugin d

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

Page 14: Beginning Plugin d

Plugin Header

Friday, August 27, 2010

Page 15: Beginning Plugin d

Plugin Header

Friday, August 27, 2010

Page 16: Beginning Plugin d

The Function

Friday, August 27, 2010

Page 17: Beginning Plugin d

Friday, August 27, 2010

Page 18: Beginning Plugin d

Friday, August 27, 2010

Page 19: Beginning Plugin d

Add a Settings Page

Friday, August 27, 2010

Page 20: Beginning Plugin d

The Settings Form

Friday, August 27, 2010

Page 21: Beginning Plugin d

Options Page

Friday, August 27, 2010

Page 22: Beginning Plugin d

Use the Option Values

Friday, August 27, 2010

Page 23: Beginning Plugin d

Resources

Friday, August 27, 2010

Page 24: Beginning Plugin d

Resources

• http://codex.wordpress.org

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

Friday, August 27, 2010

Page 25: Beginning Plugin d

Thank You!I am: John Hawkins

I email: [email protected] tweet: @VegasGeekI blog: JohnHawkinsUnrated.comI work: 9seeds.com

Friday, August 27, 2010