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

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using 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