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

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Recently uploaded (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View 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