SlideShare uma empresa Scribd logo
1 de 114
Intro to WordPress    Doug Stewart
                      Philly Tech Week 2012
            Plugins
Intro to WordPress Plugins
Philly Tech Week 2012
Philadelphia Inquirer Building
April 25th, 2012
Who am I?
Who am I?

• Doug Stewart
Who am I?

• Doug Stewart


• Philly WordPress Meetup co-organizer
Who am I?

• Doug Stewart


• Philly WordPress Meetup co-organizer


• Using WordPress since version 1.0 (February 2004 or so)
Who am I?

• Doug Stewart


• Philly WordPress Meetup co-organizer


• Using WordPress since version 1.0 (February 2004 or so)


• @zamoose on Twitter
Why are we here?
Why are we here?


•Plugins!
What’s a plugin?
What’s a plugin?

• The WordPress Codex* defines
  a plugin as:
 “[...]a program, or a set of one or more
 functions, written in the PHP scripting
 language, that adds a specific set of features
 or services to the WordPress weblog, which
 can be seamlessly integrated with the weblog
 using access points and methods provided
 by the WordPress Plugin Application Program
 Interface (API).”**
What’s a plugin?

• The WordPress Codex* defines
  a plugin as:
  “[...]a program, or a set of one or more
  functions, written in the PHP scripting
  language, that adds a specific set of features
  or services to the WordPress weblog, which
  can be seamlessly integrated with the weblog
  using access points and methods provided
  by the WordPress Plugin Application Program
  Interface (API).”**




* You do know what the Codex is, right?
** http://codex.wordpress.org/Writing_a_Plugin
WHAT?
A plugin...
A plugin...

• Is a piece of software
A plugin...

• Is a piece of software


• Is usually written in a mix of PHP and JavaScript
A plugin...

• Is a piece of software


• Is usually written in a mix of PHP and JavaScript


• Supplements or substantially alters the way WordPress functions
A plugin...

• Is a piece of software


• Is usually written in a mix of PHP and JavaScript


• Supplements or substantially alters the way WordPress functions


• Uses the WordPress Plugin API* to accomplish the above in a way that
  integrates with WordPress
A plugin...

• Is a piece of software


• Is usually written in a mix of PHP and JavaScript


• Supplements or substantially alters the way WordPress functions


• Uses the WordPress Plugin API* to accomplish the above in a way that
  integrates with WordPress




                      * http://codex.wordpress.org/Plugin_API
A few notable plugins
A few notable plugins

• Hello Dolly
A few notable plugins

• Hello Dolly


• Akismet
A few notable plugins

• Hello Dolly


• Akismet


• BuddyPress
A few notable plugins

• Hello Dolly


• Akismet


• BuddyPress


• WordPress SEO
A few notable plugins

• Hello Dolly


• Akismet


• BuddyPress


• WordPress SEO


• bbPress
Creating your own
Step 1: What do you want to do?
Step 1.1: Has anyone ELSE tried to do this?
Step 1.2: Has anyone else done this poorly?
http://wordpress.org/extend/plugins/
http://wordpress.org/extend/plugins/
http://wordpress.org/extend/plugins/
http://wordpress.org/extend/plugins/
At this point, this effect
will likely kick in.
At this point, this effect
will likely kick in.

• Fight the instinct to
  procrastinate.
At this point, this effect
will likely kick in.

• Fight the instinct to
  procrastinate.


• Plan.
At this point, this effect
will likely kick in.

• Fight the instinct to
  procrastinate.


• Plan.


• Wireframe.
At this point, this effect
will likely kick in.

• Fight the instinct to
  procrastinate.


• Plan.


• Wireframe.


• Pen and paper can help.
Step 2: Getting Started
Getting started
Getting started

• This sounds simple, but pick a name for your plugin
Getting started

• This sounds simple, but pick a name for your plugin


• Now pick a “slug” for your plugin
Getting started

• This sounds simple, but pick a name for your plugin


• Now pick a “slug” for your plugin


• Check your slug against existing plugins
Getting started

• This sounds simple, but pick a name for your plugin


• Now pick a “slug” for your plugin


• Check your slug against existing plugins


   • Slugs are universally used by WordPress to identify plugins
Getting started

• This sounds simple, but pick a name for your plugin


• Now pick a “slug” for your plugin


• Check your slug against existing plugins


   • Slugs are universally used by WordPress to identify plugins


   • If you somehow end up with a slug that matches another plugin’s,
     there will be trouble
Getting started

• This sounds simple, but pick a name for your plugin


• Now pick a “slug” for your plugin


• Check your slug against existing plugins


   • Slugs are universally used by WordPress to identify plugins


   • If you somehow end up with a slug that matches another plugin’s,
     there will be trouble


   • Easy solution: unique slug prefix
Getting started (cont.)




            Plugin Name: LB ColorBox

             Plugin Slug: lb-colorbox
Getting started (cont.)
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/


• Go to http://wordpress.org/extend/plugins/add/
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/


• Go to http://wordpress.org/extend/plugins/add/


• Log in with your WordPress.org account
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/


• Go to http://wordpress.org/extend/plugins/add/


• Log in with your WordPress.org account


• Register your new plugin
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/


• Go to http://wordpress.org/extend/plugins/add/


• Log in with your WordPress.org account


• Register your new plugin


   • Name and description are required
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/


• Go to http://wordpress.org/extend/plugins/add/


• Log in with your WordPress.org account


• Register your new plugin


   • Name and description are required


• Wait for The Powers That Be to approve your plugin submission
Getting started (cont.)

• Read about the plugin submission process at http://wordpress.org/extend/plugins/about/


• Go to http://wordpress.org/extend/plugins/add/


• Log in with your WordPress.org account


• Register your new plugin


   • Name and description are required


• Wait for The Powers That Be to approve your plugin submission


• While you wait...
Step 3: Set up your development environment
Set up your development environment
Set up your development environment

• You’ll need a development environment
Set up your development environment

• You’ll need a development environment


  • Local?
Set up your development environment

• You’ll need a development environment


  • Local?


  • Remote?
Set up your development environment

• You’ll need a development environment


  • Local?


  • Remote?


• Local development environment is preferable
Set up your development environment

• You’ll need a development environment


  • Local?


  • Remote?


• Local development environment is preferable


  • Disconnected development
Set up your development environment

• You’ll need a development environment


  • Local?


  • Remote?


• Local development environment is preferable


  • Disconnected development


  • No waiting for uploads
Set up your development environment

• You’ll need a development environment


  • Local?


  • Remote?


• Local development environment is preferable


  • Disconnected development


  • No waiting for uploads


  • Master of your own domain
Set up your development environment (cont.)
Set up your development environment (cont.)

• Windows
Set up your development environment (cont.)

• Windows


  • WAMP (http://www.wampserver.com/en/)
Set up your development environment (cont.)

• Windows


  • WAMP (http://www.wampserver.com/en/)


  • XAMPP (http://www.apachefriends.org/en/xampp-windows.html)
Set up your development environment (cont.)

• Windows


  • WAMP (http://www.wampserver.com/en/)


  • XAMPP (http://www.apachefriends.org/en/xampp-windows.html)


• OS X
Set up your development environment (cont.)

• Windows


  • WAMP (http://www.wampserver.com/en/)


  • XAMPP (http://www.apachefriends.org/en/xampp-windows.html)


• OS X


  • MAMP (http://www.mamp.info/en/index.html)
Set up your development environment (cont.)

• Windows


  • WAMP (http://www.wampserver.com/en/)


  • XAMPP (http://www.apachefriends.org/en/xampp-windows.html)


• OS X


  • MAMP (http://www.mamp.info/en/index.html)


  • XAMPP (http://www.apachefriends.org/en/xampp-macosx.html)
Set up your development environment (cont.)

• Windows


  • WAMP (http://www.wampserver.com/en/)


  • XAMPP (http://www.apachefriends.org/en/xampp-windows.html)


• OS X


  • MAMP (http://www.mamp.info/en/index.html)


  • XAMPP (http://www.apachefriends.org/en/xampp-macosx.html)


  • NMPP (http://getmnpp.org/)
Set up your development
environment (cont.)
Set up your development
environment (cont.)

• Install WordPress
Set up your development
environment (cont.)

• Install WordPress


• Create a new directory under
  [WordPress install directory]/
  wp-content/plugins
Set up your development
environment (cont.)

• Install WordPress


• Create a new directory under
  [WordPress install directory]/
  wp-content/plugins


   • Make sure it matches your
     slug!
Step 4: Skeleton
Skeleton
Skeleton

• Let’s put “pen” to “paper”
Skeleton

• Let’s put “pen” to “paper”


• A plugin must have at least the following two files:
Skeleton

• Let’s put “pen” to “paper”


• A plugin must have at least the following two files:


   • readme.txt
Skeleton

• Let’s put “pen” to “paper”


• A plugin must have at least the following two files:


   • readme.txt


   • [plugin-slug].php
Step 4.1: readme.txt
readme.txt
readme.txt

• Full example here: http://wordpress.org/extend/plugins/about/readme.txt
readme.txt

• Full example here: http://wordpress.org/extend/plugins/about/readme.txt


• The important bits are at the top
readme.txt

• Full example here: http://wordpress.org/extend/plugins/about/readme.txt


• The important bits are at the top


• Uses a modified Markdown syntax
readme.txt

• Full example here: http://wordpress.org/extend/plugins/about/readme.txt


• The important bits are at the top


• Uses a modified Markdown syntax


• Contains important information about your theme
readme.txt

• Full example here: http://wordpress.org/extend/plugins/about/readme.txt


• The important bits are at the top


• Uses a modified Markdown syntax


• Contains important information about your theme


• Explicitly controls how your plugin’s WordPress.org directory page looks
readme.txt (cont.)


                     This...


                      Text
readme.txt (cont.)


                     ...results in this
readme.txt (cont.)

• WordPress.org has a handy-dandy readme syntax checker:

 http://wordpress.org/extend/plugins/about/validator/


• Other information displayed


  • Installation instructions


  • FAQs


  • Screenshots


  • Changelog
Step 4.2: [plugin-slug].php
[plugin-slug].php

• Create wp-content/plugins/[plugin-slug]/[plugin-slug].php


• Add plugin header information so WordPress knows how to talk about your
  plugin


• Plugin header info defines how WordPress displays your plugin’s info in the
  Plugins administration screen
[plugin-slug].php (cont.)

                        This...
[plugin-slug].php


                    ...defines this
Step 5: Put some meat on those bones
Meat
Meat

• Let’s talk APIs
Meat

• Let’s talk APIs


   • WordPress core -- http://codex.wordpress.org/Function_Reference
Meat

• Let’s talk APIs


   • WordPress core -- http://codex.wordpress.org/Function_Reference


      • the_title(), get_posts(), add_meta_box(), etc.
Meat

• Let’s talk APIs


   • WordPress core -- http://codex.wordpress.org/Function_Reference


      • the_title(), get_posts(), add_meta_box(), etc.


   • Plugin API -- http://codex.wordpress.org/Plugin_API
Meat (cont.)

• Topics for advanced study


  • Settings API -- http://codex.wordpress.org/Settings_API


  • Options API -- http://codex.wordpress.org/Options_API


  • Transients API -- http://codex.wordpress.org/Transients_API


  • Widgets API -- http://codex.wordpress.org/Widgets_API
Meathooks

• From the Codex:
  “Hooks are provided by WordPress to allow your plugin to 'hook into' the rest
  of WordPress; that is, to call functions in your plugin at specific times, and
  thereby set your plugin in motion.”
Meathooks (cont.)
Meathooks (cont.)

• There are two kinds of hooks (again, from the Codex):
Meathooks (cont.)

• There are two kinds of hooks (again, from the Codex):


  • “Actions: Actions are the hooks that the WordPress core launches at
    specific points during execution, or when specific events occur. Your plugin
    can specify that one or more of its PHP functions are executed at these
    points, using the Action API.”
Meathooks (cont.)

• There are two kinds of hooks (again, from the Codex):


  • “Actions: Actions are the hooks that the WordPress core launches at
    specific points during execution, or when specific events occur. Your plugin
    can specify that one or more of its PHP functions are executed at these
    points, using the Action API.”


  • “Filters: Filters are the hooks that WordPress launches to modify text of
    various types before adding it to the database or sending it to the browser
    screen. Your plugin can specify that one or more of its PHP functions is
    executed to modify specific types of text at these times, using the Filter
    API.”
Demo Time!
Resources

• Codex, Codex, Codex
  http://codex.wordpress.org


• StackExchange
  http://wordpress.stackexchange.com


• WordPress.org forums
Useful kickstarts

• WordPress Plugin Kickstarter
  http://wordpress.org/extend/plugins/wordpress-plugin-kickstarter/


• WordPress Plugin Scaffold
  https://github.com/eteubert/WordPress-Plugin-Scaffold


• WordPress Plugin Boilerplate
  https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate


• WordPress Plugin Skeleton
  https://github.com/lpointet/WordPress-Plugin-Skeleton
Thanks for coming out!

Mais conteúdo relacionado

Mais procurados

Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)christopherfross
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012Joe Querin
 
WordCamp Seoul 2012
WordCamp Seoul 2012WordCamp Seoul 2012
WordCamp Seoul 2012Naoko Takano
 
Adding Content to your WordPress Website
Adding Content to your WordPress WebsiteAdding Content to your WordPress Website
Adding Content to your WordPress WebsiteRiceDesign
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise JoomlaTim Plummer
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPressEunus Hosen
 
Accessibility With WordPress: Accessing Higher Ground 2014
Accessibility With WordPress: Accessing Higher Ground 2014Accessibility With WordPress: Accessing Higher Ground 2014
Accessibility With WordPress: Accessing Higher Ground 2014Joseph Dolson
 
WordPress Essentials for Beginners - YES Montreal November 2015
WordPress Essentials for Beginners - YES Montreal November 2015WordPress Essentials for Beginners - YES Montreal November 2015
WordPress Essentials for Beginners - YES Montreal November 2015Kathryn Presner
 
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)David Wesst
 
The Basics of WordPress
The Basics of WordPressThe Basics of WordPress
The Basics of WordPressThom Allen
 
Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themesChris Olbekson
 
Learning by Doing: 10 Lessons in Pushing your WordPress Development Skills
Learning by Doing: 10 Lessons in Pushing your WordPress Development SkillsLearning by Doing: 10 Lessons in Pushing your WordPress Development Skills
Learning by Doing: 10 Lessons in Pushing your WordPress Development SkillsSarah Moyer
 
Wordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestWordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestEnayet Rajib
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPressCraig Bailey
 
Setting Up your WordPress Site like a Pro
Setting Up your WordPress Site like a ProSetting Up your WordPress Site like a Pro
Setting Up your WordPress Site like a ProNile Flores
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014Fikri Rasyid
 
What Is WordPress and Why Is Everyone Talking About It
What Is WordPress and Why Is Everyone Talking About ItWhat Is WordPress and Why Is Everyone Talking About It
What Is WordPress and Why Is Everyone Talking About ItBobWP.com
 
Introduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationIntroduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationeXo Platform
 

Mais procurados (20)

Word Press
Word PressWord Press
Word Press
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Theme development essentials columbus oh word camp 2012
Theme development essentials   columbus oh word camp 2012Theme development essentials   columbus oh word camp 2012
Theme development essentials columbus oh word camp 2012
 
WordCamp Seoul 2012
WordCamp Seoul 2012WordCamp Seoul 2012
WordCamp Seoul 2012
 
Adding Content to your WordPress Website
Adding Content to your WordPress WebsiteAdding Content to your WordPress Website
Adding Content to your WordPress Website
 
How to customise Joomla
How to customise JoomlaHow to customise Joomla
How to customise Joomla
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
Accessibility With WordPress: Accessing Higher Ground 2014
Accessibility With WordPress: Accessing Higher Ground 2014Accessibility With WordPress: Accessing Higher Ground 2014
Accessibility With WordPress: Accessing Higher Ground 2014
 
WordPress Essentials for Beginners - YES Montreal November 2015
WordPress Essentials for Beginners - YES Montreal November 2015WordPress Essentials for Beginners - YES Montreal November 2015
WordPress Essentials for Beginners - YES Montreal November 2015
 
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
5 Reasons Why Your Website Is[n’t] a Native App (PrDC 2015)
 
The Basics of WordPress
The Basics of WordPressThe Basics of WordPress
The Basics of WordPress
 
Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themes
 
WordPress plugins
WordPress pluginsWordPress plugins
WordPress plugins
 
Learning by Doing: 10 Lessons in Pushing your WordPress Development Skills
Learning by Doing: 10 Lessons in Pushing your WordPress Development SkillsLearning by Doing: 10 Lessons in Pushing your WordPress Development Skills
Learning by Doing: 10 Lessons in Pushing your WordPress Development Skills
 
Wordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestWordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for Themeforest
 
Introduction To WordPress
Introduction To WordPressIntroduction To WordPress
Introduction To WordPress
 
Setting Up your WordPress Site like a Pro
Setting Up your WordPress Site like a ProSetting Up your WordPress Site like a Pro
Setting Up your WordPress Site like a Pro
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014
 
What Is WordPress and Why Is Everyone Talking About It
What Is WordPress and Why Is Everyone Talking About ItWhat Is WordPress and Why Is Everyone Talking About It
What Is WordPress and Why Is Everyone Talking About It
 
Introduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design ApplicationIntroduce Bootstrap 3 to Develop Responsive Design Application
Introduce Bootstrap 3 to Develop Responsive Design Application
 

Destaque

WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)alexkingorg
 
WordPress Plugins For Website Development
WordPress Plugins For Website DevelopmentWordPress Plugins For Website Development
WordPress Plugins For Website DevelopmentPixelCrayons
 
WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Pluginsrandyhoyt
 
Intro to WordPress Plugins
Intro to WordPress PluginsIntro to WordPress Plugins
Intro to WordPress PluginsKristen Symonds
 
Creating and Maintaining WordPress Plugins
Creating and Maintaining WordPress PluginsCreating and Maintaining WordPress Plugins
Creating and Maintaining WordPress PluginsMark Jaquith
 
Coding, Scaling, and Deploys... Oh My!
Coding, Scaling, and Deploys... Oh My!Coding, Scaling, and Deploys... Oh My!
Coding, Scaling, and Deploys... Oh My!Mark Jaquith
 
Adding a Social 'Stache to WordPress: BuddyPress, bbPress and Beyond
Adding a Social 'Stache to WordPress: BuddyPress, bbPress and BeyondAdding a Social 'Stache to WordPress: BuddyPress, bbPress and Beyond
Adding a Social 'Stache to WordPress: BuddyPress, bbPress and Beyondzamoose
 

Destaque (7)

WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)
 
WordPress Plugins For Website Development
WordPress Plugins For Website DevelopmentWordPress Plugins For Website Development
WordPress Plugins For Website Development
 
WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Plugins
 
Intro to WordPress Plugins
Intro to WordPress PluginsIntro to WordPress Plugins
Intro to WordPress Plugins
 
Creating and Maintaining WordPress Plugins
Creating and Maintaining WordPress PluginsCreating and Maintaining WordPress Plugins
Creating and Maintaining WordPress Plugins
 
Coding, Scaling, and Deploys... Oh My!
Coding, Scaling, and Deploys... Oh My!Coding, Scaling, and Deploys... Oh My!
Coding, Scaling, and Deploys... Oh My!
 
Adding a Social 'Stache to WordPress: BuddyPress, bbPress and Beyond
Adding a Social 'Stache to WordPress: BuddyPress, bbPress and BeyondAdding a Social 'Stache to WordPress: BuddyPress, bbPress and Beyond
Adding a Social 'Stache to WordPress: BuddyPress, bbPress and Beyond
 

Semelhante a Intro to WordPress Plugins

Presentation wordpress.pptx
Presentation wordpress.pptxPresentation wordpress.pptx
Presentation wordpress.pptxNighatAmirKhan
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
ALL ABOUT WORDPRESS WEBSITE
ALL ABOUT WORDPRESS WEBSITE ALL ABOUT WORDPRESS WEBSITE
ALL ABOUT WORDPRESS WEBSITE mehwishazam8
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Protect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutSiteGround.com
 
There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)Grace Solivan
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016David Brattoli
 
Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016David Brattoli
 
Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016David Brattoli
 
WordPress Security and Best Practices
WordPress Security and Best PracticesWordPress Security and Best Practices
WordPress Security and Best PracticesRobert Vidal
 
Exploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install PluginsExploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install PluginsRich Plakas
 
Passionate About Plugins and Wild for Widgets
Passionate About Plugins and Wild for WidgetsPassionate About Plugins and Wild for Widgets
Passionate About Plugins and Wild for WidgetsKathryn Presner
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With LoveUp2 Technology
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and SecurityThink Media Inc.
 
15 Essential WordPress Plugins
15 Essential WordPress Plugins15 Essential WordPress Plugins
15 Essential WordPress PluginsMykl Roventine
 
Becoming A WordPress Beta Tester
Becoming A WordPress Beta TesterBecoming A WordPress Beta Tester
Becoming A WordPress Beta TesterKim Parsell
 

Semelhante a Intro to WordPress Plugins (20)

Presentation wordpress.pptx
Presentation wordpress.pptxPresentation wordpress.pptx
Presentation wordpress.pptx
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
ALL ABOUT WORDPRESS WEBSITE
ALL ABOUT WORDPRESS WEBSITE ALL ABOUT WORDPRESS WEBSITE
ALL ABOUT WORDPRESS WEBSITE
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Presentation wordpress.pptx
Presentation wordpress.pptxPresentation wordpress.pptx
Presentation wordpress.pptx
 
Protect Your WordPress From The Inside Out
Protect Your WordPress From The Inside OutProtect Your WordPress From The Inside Out
Protect Your WordPress From The Inside Out
 
There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)There's No Crying In Wordpress! (an intro to WP)
There's No Crying In Wordpress! (an intro to WP)
 
Presentation wordpress.pptx
Presentation wordpress.pptxPresentation wordpress.pptx
Presentation wordpress.pptx
 
Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016Varying wordpressdevelopmentenvironment wp-campus2016
Varying wordpressdevelopmentenvironment wp-campus2016
 
Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016Varying WordPress Development Environment WordCamp Columbus 2016
Varying WordPress Development Environment WordCamp Columbus 2016
 
Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016Varying WordPress Development Environment WordCamp Cincinnati 2016
Varying WordPress Development Environment WordCamp Cincinnati 2016
 
WordPress Security and Best Practices
WordPress Security and Best PracticesWordPress Security and Best Practices
WordPress Security and Best Practices
 
Exploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install PluginsExploring the WordPress Dashboard and How to Pick & Install Plugins
Exploring the WordPress Dashboard and How to Pick & Install Plugins
 
Passionate About Plugins and Wild for Widgets
Passionate About Plugins and Wild for WidgetsPassionate About Plugins and Wild for Widgets
Passionate About Plugins and Wild for Widgets
 
From WordPress With Love
From WordPress With LoveFrom WordPress With Love
From WordPress With Love
 
WordPress Plugins and Security
WordPress Plugins and SecurityWordPress Plugins and Security
WordPress Plugins and Security
 
15 Essential WordPress Plugins
15 Essential WordPress Plugins15 Essential WordPress Plugins
15 Essential WordPress Plugins
 
Development tools
Development toolsDevelopment tools
Development tools
 
CALM Wordpress 102
CALM Wordpress 102CALM Wordpress 102
CALM Wordpress 102
 
Becoming A WordPress Beta Tester
Becoming A WordPress Beta TesterBecoming A WordPress Beta Tester
Becoming A WordPress Beta Tester
 

Último

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Último (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

Intro to WordPress Plugins

  • 1. Intro to WordPress Doug Stewart Philly Tech Week 2012 Plugins
  • 2. Intro to WordPress Plugins Philly Tech Week 2012 Philadelphia Inquirer Building April 25th, 2012
  • 4. Who am I? • Doug Stewart
  • 5. Who am I? • Doug Stewart • Philly WordPress Meetup co-organizer
  • 6. Who am I? • Doug Stewart • Philly WordPress Meetup co-organizer • Using WordPress since version 1.0 (February 2004 or so)
  • 7. Who am I? • Doug Stewart • Philly WordPress Meetup co-organizer • Using WordPress since version 1.0 (February 2004 or so) • @zamoose on Twitter
  • 8. Why are we here?
  • 9. Why are we here? •Plugins!
  • 11. What’s a plugin? • The WordPress Codex* defines a plugin as: “[...]a program, or a set of one or more functions, written in the PHP scripting language, that adds a specific set of features or services to the WordPress weblog, which can be seamlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API).”**
  • 12. What’s a plugin? • The WordPress Codex* defines a plugin as: “[...]a program, or a set of one or more functions, written in the PHP scripting language, that adds a specific set of features or services to the WordPress weblog, which can be seamlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API).”** * You do know what the Codex is, right? ** http://codex.wordpress.org/Writing_a_Plugin
  • 13. WHAT?
  • 15. A plugin... • Is a piece of software
  • 16. A plugin... • Is a piece of software • Is usually written in a mix of PHP and JavaScript
  • 17. A plugin... • Is a piece of software • Is usually written in a mix of PHP and JavaScript • Supplements or substantially alters the way WordPress functions
  • 18. A plugin... • Is a piece of software • Is usually written in a mix of PHP and JavaScript • Supplements or substantially alters the way WordPress functions • Uses the WordPress Plugin API* to accomplish the above in a way that integrates with WordPress
  • 19. A plugin... • Is a piece of software • Is usually written in a mix of PHP and JavaScript • Supplements or substantially alters the way WordPress functions • Uses the WordPress Plugin API* to accomplish the above in a way that integrates with WordPress * http://codex.wordpress.org/Plugin_API
  • 20. A few notable plugins
  • 21. A few notable plugins • Hello Dolly
  • 22. A few notable plugins • Hello Dolly • Akismet
  • 23. A few notable plugins • Hello Dolly • Akismet • BuddyPress
  • 24. A few notable plugins • Hello Dolly • Akismet • BuddyPress • WordPress SEO
  • 25. A few notable plugins • Hello Dolly • Akismet • BuddyPress • WordPress SEO • bbPress
  • 27. Step 1: What do you want to do?
  • 28. Step 1.1: Has anyone ELSE tried to do this?
  • 29. Step 1.2: Has anyone else done this poorly?
  • 34. At this point, this effect will likely kick in.
  • 35. At this point, this effect will likely kick in. • Fight the instinct to procrastinate.
  • 36. At this point, this effect will likely kick in. • Fight the instinct to procrastinate. • Plan.
  • 37. At this point, this effect will likely kick in. • Fight the instinct to procrastinate. • Plan. • Wireframe.
  • 38. At this point, this effect will likely kick in. • Fight the instinct to procrastinate. • Plan. • Wireframe. • Pen and paper can help.
  • 39. Step 2: Getting Started
  • 41. Getting started • This sounds simple, but pick a name for your plugin
  • 42. Getting started • This sounds simple, but pick a name for your plugin • Now pick a “slug” for your plugin
  • 43. Getting started • This sounds simple, but pick a name for your plugin • Now pick a “slug” for your plugin • Check your slug against existing plugins
  • 44. Getting started • This sounds simple, but pick a name for your plugin • Now pick a “slug” for your plugin • Check your slug against existing plugins • Slugs are universally used by WordPress to identify plugins
  • 45. Getting started • This sounds simple, but pick a name for your plugin • Now pick a “slug” for your plugin • Check your slug against existing plugins • Slugs are universally used by WordPress to identify plugins • If you somehow end up with a slug that matches another plugin’s, there will be trouble
  • 46. Getting started • This sounds simple, but pick a name for your plugin • Now pick a “slug” for your plugin • Check your slug against existing plugins • Slugs are universally used by WordPress to identify plugins • If you somehow end up with a slug that matches another plugin’s, there will be trouble • Easy solution: unique slug prefix
  • 47. Getting started (cont.) Plugin Name: LB ColorBox Plugin Slug: lb-colorbox
  • 49. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/
  • 50. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/ • Go to http://wordpress.org/extend/plugins/add/
  • 51. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/ • Go to http://wordpress.org/extend/plugins/add/ • Log in with your WordPress.org account
  • 52. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/ • Go to http://wordpress.org/extend/plugins/add/ • Log in with your WordPress.org account • Register your new plugin
  • 53. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/ • Go to http://wordpress.org/extend/plugins/add/ • Log in with your WordPress.org account • Register your new plugin • Name and description are required
  • 54. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/ • Go to http://wordpress.org/extend/plugins/add/ • Log in with your WordPress.org account • Register your new plugin • Name and description are required • Wait for The Powers That Be to approve your plugin submission
  • 55. Getting started (cont.) • Read about the plugin submission process at http://wordpress.org/extend/plugins/about/ • Go to http://wordpress.org/extend/plugins/add/ • Log in with your WordPress.org account • Register your new plugin • Name and description are required • Wait for The Powers That Be to approve your plugin submission • While you wait...
  • 56. Step 3: Set up your development environment
  • 57. Set up your development environment
  • 58. Set up your development environment • You’ll need a development environment
  • 59. Set up your development environment • You’ll need a development environment • Local?
  • 60. Set up your development environment • You’ll need a development environment • Local? • Remote?
  • 61. Set up your development environment • You’ll need a development environment • Local? • Remote? • Local development environment is preferable
  • 62. Set up your development environment • You’ll need a development environment • Local? • Remote? • Local development environment is preferable • Disconnected development
  • 63. Set up your development environment • You’ll need a development environment • Local? • Remote? • Local development environment is preferable • Disconnected development • No waiting for uploads
  • 64. Set up your development environment • You’ll need a development environment • Local? • Remote? • Local development environment is preferable • Disconnected development • No waiting for uploads • Master of your own domain
  • 65. Set up your development environment (cont.)
  • 66. Set up your development environment (cont.) • Windows
  • 67. Set up your development environment (cont.) • Windows • WAMP (http://www.wampserver.com/en/)
  • 68. Set up your development environment (cont.) • Windows • WAMP (http://www.wampserver.com/en/) • XAMPP (http://www.apachefriends.org/en/xampp-windows.html)
  • 69. Set up your development environment (cont.) • Windows • WAMP (http://www.wampserver.com/en/) • XAMPP (http://www.apachefriends.org/en/xampp-windows.html) • OS X
  • 70. Set up your development environment (cont.) • Windows • WAMP (http://www.wampserver.com/en/) • XAMPP (http://www.apachefriends.org/en/xampp-windows.html) • OS X • MAMP (http://www.mamp.info/en/index.html)
  • 71. Set up your development environment (cont.) • Windows • WAMP (http://www.wampserver.com/en/) • XAMPP (http://www.apachefriends.org/en/xampp-windows.html) • OS X • MAMP (http://www.mamp.info/en/index.html) • XAMPP (http://www.apachefriends.org/en/xampp-macosx.html)
  • 72. Set up your development environment (cont.) • Windows • WAMP (http://www.wampserver.com/en/) • XAMPP (http://www.apachefriends.org/en/xampp-windows.html) • OS X • MAMP (http://www.mamp.info/en/index.html) • XAMPP (http://www.apachefriends.org/en/xampp-macosx.html) • NMPP (http://getmnpp.org/)
  • 73. Set up your development environment (cont.)
  • 74. Set up your development environment (cont.) • Install WordPress
  • 75. Set up your development environment (cont.) • Install WordPress • Create a new directory under [WordPress install directory]/ wp-content/plugins
  • 76. Set up your development environment (cont.) • Install WordPress • Create a new directory under [WordPress install directory]/ wp-content/plugins • Make sure it matches your slug!
  • 78.
  • 80. Skeleton • Let’s put “pen” to “paper”
  • 81. Skeleton • Let’s put “pen” to “paper” • A plugin must have at least the following two files:
  • 82. Skeleton • Let’s put “pen” to “paper” • A plugin must have at least the following two files: • readme.txt
  • 83. Skeleton • Let’s put “pen” to “paper” • A plugin must have at least the following two files: • readme.txt • [plugin-slug].php
  • 86. readme.txt • Full example here: http://wordpress.org/extend/plugins/about/readme.txt
  • 87. readme.txt • Full example here: http://wordpress.org/extend/plugins/about/readme.txt • The important bits are at the top
  • 88. readme.txt • Full example here: http://wordpress.org/extend/plugins/about/readme.txt • The important bits are at the top • Uses a modified Markdown syntax
  • 89. readme.txt • Full example here: http://wordpress.org/extend/plugins/about/readme.txt • The important bits are at the top • Uses a modified Markdown syntax • Contains important information about your theme
  • 90. readme.txt • Full example here: http://wordpress.org/extend/plugins/about/readme.txt • The important bits are at the top • Uses a modified Markdown syntax • Contains important information about your theme • Explicitly controls how your plugin’s WordPress.org directory page looks
  • 91. readme.txt (cont.) This... Text
  • 92. readme.txt (cont.) ...results in this
  • 93. readme.txt (cont.) • WordPress.org has a handy-dandy readme syntax checker: http://wordpress.org/extend/plugins/about/validator/ • Other information displayed • Installation instructions • FAQs • Screenshots • Changelog
  • 95. [plugin-slug].php • Create wp-content/plugins/[plugin-slug]/[plugin-slug].php • Add plugin header information so WordPress knows how to talk about your plugin • Plugin header info defines how WordPress displays your plugin’s info in the Plugins administration screen
  • 97. [plugin-slug].php ...defines this
  • 98. Step 5: Put some meat on those bones
  • 99.
  • 100. Meat
  • 102. Meat • Let’s talk APIs • WordPress core -- http://codex.wordpress.org/Function_Reference
  • 103. Meat • Let’s talk APIs • WordPress core -- http://codex.wordpress.org/Function_Reference • the_title(), get_posts(), add_meta_box(), etc.
  • 104. Meat • Let’s talk APIs • WordPress core -- http://codex.wordpress.org/Function_Reference • the_title(), get_posts(), add_meta_box(), etc. • Plugin API -- http://codex.wordpress.org/Plugin_API
  • 105. Meat (cont.) • Topics for advanced study • Settings API -- http://codex.wordpress.org/Settings_API • Options API -- http://codex.wordpress.org/Options_API • Transients API -- http://codex.wordpress.org/Transients_API • Widgets API -- http://codex.wordpress.org/Widgets_API
  • 106. Meathooks • From the Codex: “Hooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion.”
  • 108. Meathooks (cont.) • There are two kinds of hooks (again, from the Codex):
  • 109. Meathooks (cont.) • There are two kinds of hooks (again, from the Codex): • “Actions: Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API.”
  • 110. Meathooks (cont.) • There are two kinds of hooks (again, from the Codex): • “Actions: Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. Your plugin can specify that one or more of its PHP functions are executed at these points, using the Action API.” • “Filters: Filters are the hooks that WordPress launches to modify text of various types before adding it to the database or sending it to the browser screen. Your plugin can specify that one or more of its PHP functions is executed to modify specific types of text at these times, using the Filter API.”
  • 112. Resources • Codex, Codex, Codex http://codex.wordpress.org • StackExchange http://wordpress.stackexchange.com • WordPress.org forums
  • 113. Useful kickstarts • WordPress Plugin Kickstarter http://wordpress.org/extend/plugins/wordpress-plugin-kickstarter/ • WordPress Plugin Scaffold https://github.com/eteubert/WordPress-Plugin-Scaffold • WordPress Plugin Boilerplate https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate • WordPress Plugin Skeleton https://github.com/lpointet/WordPress-Plugin-Skeleton

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n