beginning plugin d
TRANSCRIPT
![Page 1: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/1.jpg)
Getting Started withWordPress Development
by John Hawkins
@VegasGeekJohnHawkinsUnrated.com
Friday, August 27, 2010
![Page 2: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/2.jpg)
$about[‘presentation’]
• Tools
• Hooks
• Code
• Resources
Friday, August 27, 2010
![Page 3: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/3.jpg)
Tools
Friday, August 27, 2010
![Page 4: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/4.jpg)
Develop Locally
• Windows: XAMPPhttp://h.awkins.com/xampp
• Mac: MAMPhttp://h.awkins.com/mamp
Friday, August 27, 2010
![Page 5: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/6.jpg)
Hooks
Friday, August 27, 2010
![Page 7: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/7.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/8.jpg)
Action Hooks
• Tell WordPress to perform a function at a specific point
Friday, August 27, 2010
![Page 9: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/9.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/10.jpg)
Code
Friday, August 27, 2010
![Page 11: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/11.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/12.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/13.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/14.jpg)
Plugin Header
Friday, August 27, 2010
![Page 15: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/15.jpg)
Plugin Header
Friday, August 27, 2010
![Page 16: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/16.jpg)
The Function
Friday, August 27, 2010
![Page 17: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/17.jpg)
Friday, August 27, 2010
![Page 18: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/18.jpg)
Friday, August 27, 2010
![Page 19: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/19.jpg)
Add a Settings Page
Friday, August 27, 2010
![Page 20: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/20.jpg)
The Settings Form
Friday, August 27, 2010
![Page 21: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/21.jpg)
Options Page
Friday, August 27, 2010
![Page 22: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/22.jpg)
Use the Option Values
Friday, August 27, 2010
![Page 23: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/23.jpg)
Resources
Friday, August 27, 2010
![Page 24: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/24.jpg)
Resources
• http://codex.wordpress.org
• http://h.awkins.com/wc-utah
Friday, August 27, 2010
![Page 25: Beginning Plugin d](https://reader035.vdocuments.mx/reader035/viewer/2022062513/5555f9e1d8b42ad3548b53b2/html5/thumbnails/25.jpg)
Thank You!I am: John Hawkins
I email: [email protected] tweet: @VegasGeekI blog: JohnHawkinsUnrated.comI work: 9seeds.com
Friday, August 27, 2010