Your SlideShare is downloading. ×
0
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Creating Your First WordPress Plugin
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Creating Your First WordPress Plugin

2,667

Published on

Reno-Tahoe WordCamp 2009 - I went over the basics of plugin development. The example code and other files are available at www.colinloretz.com

Reno-Tahoe WordCamp 2009 - I went over the basics of plugin development. The example code and other files are available at www.colinloretz.com

Published in: Technology, Business
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,667
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
76
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

















  • Transcript

    • 1. Creating Your First WordPress Plugin Colin Loretz
    • 2. Why?
    • 3. codex.wordpress.org Know it Breathe it Live it
    • 4. Anatomy of a Plugin Plugin Folder Name • main php file • js folder • css folder • php folder
    • 5. Anatomy of a Plugin reno-wordcamp • reno-wordcamp.php • js • css • php
    • 6. Main PHP File <?php /* Plugin Name: Your Plugin Name Here Plugin URI: Your Plugin URI Version: Current Plugin Version Author: You Description: What does this do? */
    • 7. reno-wordcamp.php <?php /* Plugin Name: Reno WordCamp Plugin URI: http://renotahoewordcamp.com Version: v1.0 Author: <a href = “http://colinloretz.com”>Colin Loretz</a> Description: A plugin for Reno WordCamp */
    • 8. Adding an Action function addHeaderCode() { echo ʻHello from the clouds!ʼ; }
    • 9. Actions & Filters //Actions add_action(ʻwp_headʼ, ʻaddHeaderCodeʼ, 1); ?>
    • 10. Adding a Filter function addContent($content=ʼʼ) { $content .= ʻ<p>Colin is at WordCamp.</p>ʼ; return $content; }
    • 11. Actions & Filters //Actions add_action(ʻwp_headʼ, ʻaddHeaderCodeʼ, 1); //Filters add_filter(ʻthe_contentʼ, ʻaddContentʼ); ?>
    • 12. Adding a Shortcode [renowordcamp]
    • 13. Adding a Shortcode function renoShortcode($att) { extract(shortcode_atts(array( 'foo' => 'no foo', 'bar' => 'default bar', ), $atts)); return quot;foo = {$foo}quot;; }
    • 14. Add the Shortcode //Actions add_action(ʻwp_headʼ, ʻaddHeaderCodeʼ, 1); //Filters add_filter(ʻthe_contentʼ, ʻaddContentʼ); //Shortcodes add_shortcode('renowordcamp', 'renoShortcode');
    • 15. Going Further Saving & Storing Explore Plugins Learn from others Options Post Metadata Database
    • 16. Want More? • Wordpress.org (and codex) • WP-Hacker email list (google it) • WordPress Planet
    • 17. Find Me @colinloretz www.colinloretz.com

    ×