SlideShare a Scribd company logo
1 of 12
Building your first
           WordPress plugin
●
    Justin Foell
●
    Developer at 9seeds
●
    justin@9seeds.com
●
    @justinfoell
I found some sweet code,
           where does it go?
●
    Let's look at an example: admin bar
●
    Pitfalls of adding it to functions.php
When should code go in a
       theme's functions.php?
●
    One question:
    Would you still want the feature if the
    theme was changed?
●
    If YES, put it in a plugin
●   If NO, you can put it in functions.php, but
    consider renaming the theme or creating a
    child theme to avoid upgrade issues
Holy crap! Plugins sound hard!
●
    Writing a Plugin Documentation
●
    Let's start with the bare minimum
●
    Who knows how to type?
●
    You can build a plugin!
myplugin.php
<?php
/*
Plugin Name: My Plugin
*/
Going beyond WordPress basics
●
    I can't upload a certain file type
●
    There's a fix for that: upload types
Plugins can be as big or small as
            you want
●
    If you have a feature that you might want to
    turn on/off independently of others:
    Put it in it's own plugin
    Example: Disable upgrade notice
Getting Advanced: shortcode
●
    “Snippets” are a gateway into WordPress
    customization
●
    Advanced example:
    PayPal donation shortcode
Other Examples
●
    Shortcodes in widgets
    I'm not sure why the “Text” widget doesn't
    do this already – how to fix
●
    Audience Examples?
Be careful out there!
●
    But don't be afraid to experiment
●
    Create another WordPress instance to test
●
    I havent (yet) seen a “malicious”
    WordPress code snippet
●
    Some examples may be out of date, overly
    complex, or blatantly wrong
Knowing your limits
●
    Copying & Pasting will probably only get
    you so far
●
    If an example is very long, there's a chance
    it might already be a plugin – look there in
    stead
●
    Consult you friendly local developer – a
    local WordPress meetup (and/or mailing
    list) is probably your best bet
Thank You!
●
    Justin Foell - Developer
●
    9seeds.com – professional WordPress
    development
●
    justin@9seeds.com
●
    Code examples: bit.ly/jf-wclv2012
●
    Slides: bit.ly/jf-wclv2012-slides

More Related Content

What's hot

Develop, Debug, Learn? - Dotjs2019
Develop, Debug, Learn? - Dotjs2019Develop, Debug, Learn? - Dotjs2019
Develop, Debug, Learn? - Dotjs2019Christian Heilmann
 
Web designp pt
Web designp ptWeb designp pt
Web designp ptBizzyb09
 
Starting off in PhotoShiop and how it fits into the web design process
Starting off in PhotoShiop and how it fits into the web design processStarting off in PhotoShiop and how it fits into the web design process
Starting off in PhotoShiop and how it fits into the web design processJohn Macpherson
 
Getting Started with Browser Based Testing
Getting Started with Browser Based TestingGetting Started with Browser Based Testing
Getting Started with Browser Based TestingRex Lorenzo
 
Zero cost serverless Real time web app
Zero cost serverless Real time web appZero cost serverless Real time web app
Zero cost serverless Real time web appBarcamp Saigon
 
Beg, Borrow or Steal: The Art of Flashing Without Flashing
Beg, Borrow or Steal: The Art of Flashing Without FlashingBeg, Borrow or Steal: The Art of Flashing Without Flashing
Beg, Borrow or Steal: The Art of Flashing Without Flashingspjwebster
 
Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Bronson Quick
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109Thinkful
 
Static site best practices
Static site best practicesStatic site best practices
Static site best practicesAllanki Srinivas
 
WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)alexkingorg
 
WordPress translation & Localisation : Avoid common mistakes by Makarand Mane
WordPress translation & Localisation : Avoid common mistakes by Makarand ManeWordPress translation & Localisation : Avoid common mistakes by Makarand Mane
WordPress translation & Localisation : Avoid common mistakes by Makarand ManeMakarand Mane
 
Create a newsletter in less than 17 minutes without writing a single word
Create a newsletter in less than 17 minutes without writing a single wordCreate a newsletter in less than 17 minutes without writing a single word
Create a newsletter in less than 17 minutes without writing a single wordNik Cree
 
Architecture @ Appknox
Architecture @ AppknoxArchitecture @ Appknox
Architecture @ AppknoxDhilipsiva DS
 
Question 6
Question 6Question 6
Question 6guidzzz
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168Thinkful
 

What's hot (20)

Develop, Debug, Learn? - Dotjs2019
Develop, Debug, Learn? - Dotjs2019Develop, Debug, Learn? - Dotjs2019
Develop, Debug, Learn? - Dotjs2019
 
Web designp pt
Web designp ptWeb designp pt
Web designp pt
 
Starting off in PhotoShiop and how it fits into the web design process
Starting off in PhotoShiop and how it fits into the web design processStarting off in PhotoShiop and how it fits into the web design process
Starting off in PhotoShiop and how it fits into the web design process
 
Getting Started with Browser Based Testing
Getting Started with Browser Based TestingGetting Started with Browser Based Testing
Getting Started with Browser Based Testing
 
Zero cost serverless Real time web app
Zero cost serverless Real time web appZero cost serverless Real time web app
Zero cost serverless Real time web app
 
Beg, Borrow or Steal: The Art of Flashing Without Flashing
Beg, Borrow or Steal: The Art of Flashing Without FlashingBeg, Borrow or Steal: The Art of Flashing Without Flashing
Beg, Borrow or Steal: The Art of Flashing Without Flashing
 
Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!Debugging WordPress Core and Plugins!
Debugging WordPress Core and Plugins!
 
Baawjsajq109
Baawjsajq109Baawjsajq109
Baawjsajq109
 
Static site best practices
Static site best practicesStatic site best practices
Static site best practices
 
Question 6
Question 6Question 6
Question 6
 
WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)
 
WordPress translation & Localisation : Avoid common mistakes by Makarand Mane
WordPress translation & Localisation : Avoid common mistakes by Makarand ManeWordPress translation & Localisation : Avoid common mistakes by Makarand Mane
WordPress translation & Localisation : Avoid common mistakes by Makarand Mane
 
Create a newsletter in less than 17 minutes without writing a single word
Create a newsletter in less than 17 minutes without writing a single wordCreate a newsletter in less than 17 minutes without writing a single word
Create a newsletter in less than 17 minutes without writing a single word
 
Why do you say BDD if it is Cucumber?
Why do you say BDD if it is Cucumber?Why do you say BDD if it is Cucumber?
Why do you say BDD if it is Cucumber?
 
Wordpress hacks
Wordpress hacksWordpress hacks
Wordpress hacks
 
Tf byows
Tf byowsTf byows
Tf byows
 
Architecture @ Appknox
Architecture @ AppknoxArchitecture @ Appknox
Architecture @ Appknox
 
The road to php 7.1
The road to php 7.1The road to php 7.1
The road to php 7.1
 
Question 6
Question 6Question 6
Question 6
 
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-13-66-123-168
 

Viewers also liked

Pimp your Gmail to get more done
Pimp your Gmail to get more donePimp your Gmail to get more done
Pimp your Gmail to get more doneJustin Foell
 
Module 8 Interaction
Module 8 InteractionModule 8 Interaction
Module 8 Interactionschernick
 
Module 7 Preparation
Module 7 PreparationModule 7 Preparation
Module 7 Preparationschernick
 
Module 8 Preparation
Module 8 PreparationModule 8 Preparation
Module 8 Preparationschernick
 
Module 6 Interaction
Module 6 InteractionModule 6 Interaction
Module 6 Interactionschernick
 
Module 7 Interaction
Module 7 InteractionModule 7 Interaction
Module 7 Interactionschernick
 
AJAX the WordPress way
AJAX the WordPress wayAJAX the WordPress way
AJAX the WordPress wayJustin Foell
 
Naica crystalcavemexico
Naica crystalcavemexicoNaica crystalcavemexico
Naica crystalcavemexicograndkidzrock
 
เล่มจริง
เล่มจริงเล่มจริง
เล่มจริงKrukook Sut
 
Where do I go from here?
Where do I go from here?Where do I go from here?
Where do I go from here?Justin Foell
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Justin Foell
 
Customizing the WP Admin for fun and profit
Customizing the WP Admin for fun and profitCustomizing the WP Admin for fun and profit
Customizing the WP Admin for fun and profitJustin Foell
 
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمينعرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمينMOKBAL
 
Minimum Viable Product
Minimum Viable ProductMinimum Viable Product
Minimum Viable ProductJustin Foell
 
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمينعرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمينMOKBAL
 
27 simple sentences
27 simple sentences27 simple sentences
27 simple sentencesvaibhav1996
 

Viewers also liked (19)

Pimp your Gmail to get more done
Pimp your Gmail to get more donePimp your Gmail to get more done
Pimp your Gmail to get more done
 
Module 8 Interaction
Module 8 InteractionModule 8 Interaction
Module 8 Interaction
 
Module 7 Preparation
Module 7 PreparationModule 7 Preparation
Module 7 Preparation
 
Module 8 Preparation
Module 8 PreparationModule 8 Preparation
Module 8 Preparation
 
Biofuels
BiofuelsBiofuels
Biofuels
 
Module 6 Interaction
Module 6 InteractionModule 6 Interaction
Module 6 Interaction
 
Module 7 Interaction
Module 7 InteractionModule 7 Interaction
Module 7 Interaction
 
AJAX the WordPress way
AJAX the WordPress wayAJAX the WordPress way
AJAX the WordPress way
 
Naica crystalcavemexico
Naica crystalcavemexicoNaica crystalcavemexico
Naica crystalcavemexico
 
เล่มจริง
เล่มจริงเล่มจริง
เล่มจริง
 
Where do I go from here?
Where do I go from here?Where do I go from here?
Where do I go from here?
 
Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)Nginx [engine x] and you (and WordPress)
Nginx [engine x] and you (and WordPress)
 
S peters final_dse
S peters final_dseS peters final_dse
S peters final_dse
 
New york city
New york cityNew york city
New york city
 
Customizing the WP Admin for fun and profit
Customizing the WP Admin for fun and profitCustomizing the WP Admin for fun and profit
Customizing the WP Admin for fun and profit
 
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمينعرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
 
Minimum Viable Product
Minimum Viable ProductMinimum Viable Product
Minimum Viable Product
 
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمينعرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
عرض بور بوينت عن اخلاقيات استخدام الانترنت وحماية المستخدمين
 
27 simple sentences
27 simple sentences27 simple sentences
27 simple sentences
 

Similar to Building your first WordPress plugin

WordPress 101 Sunday Session
WordPress 101 Sunday SessionWordPress 101 Sunday Session
WordPress 101 Sunday Sessionpamselle
 
Plugin Development for Beginners v.2019
Plugin Development for Beginners v.2019Plugin Development for Beginners v.2019
Plugin Development for Beginners v.2019Joe Cartonia
 
Getting big without getting fat, in perl
Getting big without getting fat, in perlGetting big without getting fat, in perl
Getting big without getting fat, in perlDean Hamstead
 
Plugin Development for Beginners
Plugin Development for BeginnersPlugin Development for Beginners
Plugin Development for BeginnersJoe Cartonia
 
WordPress 101 Saturday Session
WordPress 101 Saturday SessionWordPress 101 Saturday Session
WordPress 101 Saturday Sessionpamselle
 
How to create a WordPress not understanding WordPress, so more on the headles...
How to create a WordPress not understanding WordPress, so more on the headles...How to create a WordPress not understanding WordPress, so more on the headles...
How to create a WordPress not understanding WordPress, so more on the headles...Krzysztof (Chris) Ozog
 
WPSessions Composer for WordPress Plugin Development
WPSessions Composer for WordPress Plugin DevelopmentWPSessions Composer for WordPress Plugin Development
WPSessions Composer for WordPress Plugin DevelopmentCaldera Labs
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsSteven Slack
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopBrendan Sera-Shriar
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for BeginnersSean Prunka
 
How to develope plugin in wordpress: 6 simple steps.
How to develope plugin in wordpress: 6 simple steps.How to develope plugin in wordpress: 6 simple steps.
How to develope plugin in wordpress: 6 simple steps.Jay Bharat
 
Writing Your First Plugin
Writing Your First PluginWriting Your First Plugin
Writing Your First PluginGeorge Ornbo
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme DevelopmentJosh Williams
 
Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)Valentin Despa
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Brendan Sera-Shriar
 

Similar to Building your first WordPress plugin (20)

WordPress 101 Sunday Session
WordPress 101 Sunday SessionWordPress 101 Sunday Session
WordPress 101 Sunday Session
 
WordPress Commercial Plugins
WordPress Commercial PluginsWordPress Commercial Plugins
WordPress Commercial Plugins
 
Test ss 2
Test ss 2Test ss 2
Test ss 2
 
Plugin Development for Beginners v.2019
Plugin Development for Beginners v.2019Plugin Development for Beginners v.2019
Plugin Development for Beginners v.2019
 
Getting big without getting fat, in perl
Getting big without getting fat, in perlGetting big without getting fat, in perl
Getting big without getting fat, in perl
 
Plugin Development for Beginners
Plugin Development for BeginnersPlugin Development for Beginners
Plugin Development for Beginners
 
WordPress 101 Saturday Session
WordPress 101 Saturday SessionWordPress 101 Saturday Session
WordPress 101 Saturday Session
 
How to create a WordPress not understanding WordPress, so more on the headles...
How to create a WordPress not understanding WordPress, so more on the headles...How to create a WordPress not understanding WordPress, so more on the headles...
How to create a WordPress not understanding WordPress, so more on the headles...
 
WPSessions Composer for WordPress Plugin Development
WPSessions Composer for WordPress Plugin DevelopmentWPSessions Composer for WordPress Plugin Development
WPSessions Composer for WordPress Plugin Development
 
Developing Custom WordPress Themes for Clients
Developing Custom WordPress Themes for ClientsDeveloping Custom WordPress Themes for Clients
Developing Custom WordPress Themes for Clients
 
WordPress plugins
WordPress pluginsWordPress plugins
WordPress plugins
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for Beginners
 
How to develope plugin in wordpress: 6 simple steps.
How to develope plugin in wordpress: 6 simple steps.How to develope plugin in wordpress: 6 simple steps.
How to develope plugin in wordpress: 6 simple steps.
 
Writing Your First Plugin
Writing Your First PluginWriting Your First Plugin
Writing Your First Plugin
 
Rapid WordPress Theme Development
Rapid WordPress Theme DevelopmentRapid WordPress Theme Development
Rapid WordPress Theme Development
 
Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)Learning Joomla! in a weekend (for developers)
Learning Joomla! in a weekend (for developers)
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
 
It4k12 wordpress
It4k12 wordpressIt4k12 wordpress
It4k12 wordpress
 
Modular plugins
Modular pluginsModular plugins
Modular plugins
 

Recently uploaded

4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 

Recently uploaded (20)

4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 

Building your first WordPress plugin

  • 1. Building your first WordPress plugin ● Justin Foell ● Developer at 9seeds ● justin@9seeds.com ● @justinfoell
  • 2. I found some sweet code, where does it go? ● Let's look at an example: admin bar ● Pitfalls of adding it to functions.php
  • 3. When should code go in a theme's functions.php? ● One question: Would you still want the feature if the theme was changed? ● If YES, put it in a plugin ● If NO, you can put it in functions.php, but consider renaming the theme or creating a child theme to avoid upgrade issues
  • 4. Holy crap! Plugins sound hard! ● Writing a Plugin Documentation ● Let's start with the bare minimum ● Who knows how to type? ● You can build a plugin!
  • 6. Going beyond WordPress basics ● I can't upload a certain file type ● There's a fix for that: upload types
  • 7. Plugins can be as big or small as you want ● If you have a feature that you might want to turn on/off independently of others: Put it in it's own plugin Example: Disable upgrade notice
  • 8. Getting Advanced: shortcode ● “Snippets” are a gateway into WordPress customization ● Advanced example: PayPal donation shortcode
  • 9. Other Examples ● Shortcodes in widgets I'm not sure why the “Text” widget doesn't do this already – how to fix ● Audience Examples?
  • 10. Be careful out there! ● But don't be afraid to experiment ● Create another WordPress instance to test ● I havent (yet) seen a “malicious” WordPress code snippet ● Some examples may be out of date, overly complex, or blatantly wrong
  • 11. Knowing your limits ● Copying & Pasting will probably only get you so far ● If an example is very long, there's a chance it might already be a plugin – look there in stead ● Consult you friendly local developer – a local WordPress meetup (and/or mailing list) is probably your best bet
  • 12. Thank You! ● Justin Foell - Developer ● 9seeds.com – professional WordPress development ● justin@9seeds.com ● Code examples: bit.ly/jf-wclv2012 ● Slides: bit.ly/jf-wclv2012-slides