SlideShare a Scribd company logo
1 of 18
Download to read offline
Write your first WordPress Plugin
    Ibrahim Abdel Fattah Mohamed, aka bingorabbit
                  www.bingorabbit.com
                  Twitter: @bingorabbit
               .. and I HEART WordPress
Agenda
● What is a WordPress Plugin?
● Why do I need to write a WordPress Plugin?

● Plugin files structure and headers.

● How to add my plugin to my WordPress Blog.

● How to contribute to WordPress Development?

● Questions..
What is a WordPress Plugin?

A piece of code, written to solve a problem or to
 add a specific functionality that is not there.
Why do I need to write a WordPress Plugin?

 ● Solving a problem.
 ● Add new functionality

 ● You love it, but have a better implementation?

 ● Modify it, extend it

 ● Want to make money?
How can I write a plugin?

● Find a problem you need to solve, or
  something new to add.
● Warm your hands.

● Choose a descriptive name.

● Document every little thing.

● Think about the license.

● Then start coding it..
Structure

Wordpress/
   |- wp-content/
      |- plugins/
        |- YourPlugin/
           |- mainfile.php
           |- js/
           |- css/
           |- php/
Headers

<?php
   /*
   Plugin Name: Your desired name
   Plugin URI: http://path.to/plugin/
   Description: What does it actually do?
   Version: x.Y
   Author: This should be you
   Author URI: http://path.to/you/
   */
?>
Hooks
● Hooks are just..hooks..
● Used to attach your plugin to a working system.

● Two types of Hook; Actions and Filters
Actions
● Actions, are just actions..
● Actions triggers an event or a function.

● When a post is published (action), send an email

  to the administrator (function, event or reaction).

add_action('hook_name',
 'your_function_name', [priority],
 [accepted_args]);
Filters
    Database/User <----> Filters <----> Data

● Filters are also just..Filters..
● Example, add some text just after every post.




add_filter('hook_name',
 'your_function_name', [priority],
 [accepted_args]);
Sample Plugin:
Email Friends on New Post
Important Links
●   Writing a Plugin (
  http://codex.wordpress.org/Writing_a_Plugin)
● Plugin API (http://codex.wordpress.org/Plugin_API)

● Actions Reference (

  http://codex.wordpress.org/Plugin_API/Action_Reference)
● Filters Reference (

  http://codex.wordpress.org/Plugin_API/Filter_Reference)
● WordPress Coding Standards (

  http://codex.wordpress.org/WordPress_Coding_Standards)
Contributing to WordPress..
Why?
● Improve the software you use..
● Being a part of the community, learning and

  experience.
Where?
●   Documentation, aka Codex (
  http://codex.wordpress.org/Codex:Contributing)
● Translation (

  http://codex.wordpress.org/Translating_WordPress)
● Support Forum (http://www.wordpress.org/support)

● IRC Channel (#WordPress-dev on Freenode)

● Development (Next Slide?)
How?
  ● Trac (http://trac.wordpress.org/)
  ● Code it, refine it, or just test it..

  ● Got a bug? Go and report it..




http://wordpress.org/development/2009/03/contributing-to-wordpress-part-i-development/
Any Questions?..
Thanks!..
Ibrahim Abdel Fattah Mohamed
       www.bingorabbit.com
       www.catreloaded.net

More Related Content

What's hot

Child Themes in WordPress
Child Themes in WordPressChild Themes in WordPress
Child Themes in WordPressJeff Cohan
 
Using composer with WordPress
Using composer with WordPressUsing composer with WordPress
Using composer with WordPressMicah Wood
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsAmanda Giles
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
Behavior Driven Development - How To Start with Behat
Behavior Driven Development - How To Start with BehatBehavior Driven Development - How To Start with Behat
Behavior Driven Development - How To Start with Behatimoneytech
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
The Future Of WordPress Presentation
The Future Of WordPress PresentationThe Future Of WordPress Presentation
The Future Of WordPress PresentationDougal Campbell
 
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
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme EnlightenmentAmanda Giles
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressChris Jean
 
How to WordPress: the basics, part 1
How to WordPress:  the basics, part 1How to WordPress:  the basics, part 1
How to WordPress: the basics, part 1R-Cubed Design Forge
 
Word press Plugins by WordPress Experts
Word press Plugins by WordPress ExpertsWord press Plugins by WordPress Experts
Word press Plugins by WordPress ExpertsYameen Khan
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIsmdawaffe
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalChandra Prakash Thapa
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme developmenthenri_makembe
 
Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Amanda Giles
 

What's hot (20)

Child Themes in WordPress
Child Themes in WordPressChild Themes in WordPress
Child Themes in WordPress
 
Using composer with WordPress
Using composer with WordPressUsing composer with WordPress
Using composer with WordPress
 
Rebrand WordPress Admin
Rebrand WordPress AdminRebrand WordPress Admin
Rebrand WordPress Admin
 
Creating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable NeedsCreating Customizable Widgets for Unpredictable Needs
Creating Customizable Widgets for Unpredictable Needs
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Behavior Driven Development - How To Start with Behat
Behavior Driven Development - How To Start with BehatBehavior Driven Development - How To Start with Behat
Behavior Driven Development - How To Start with Behat
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
WordPress plugins
WordPress pluginsWordPress plugins
WordPress plugins
 
The Future Of WordPress Presentation
The Future Of WordPress PresentationThe Future Of WordPress Presentation
The Future Of WordPress Presentation
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
The Way to Theme Enlightenment
The Way to Theme EnlightenmentThe Way to Theme Enlightenment
The Way to Theme Enlightenment
 
Intrebari Hydro
Intrebari HydroIntrebari Hydro
Intrebari Hydro
 
WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Plugins
 
How I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPressHow I Learned to Stop Worrying and Backup WordPress
How I Learned to Stop Worrying and Backup WordPress
 
How to WordPress: the basics, part 1
How to WordPress:  the basics, part 1How to WordPress:  the basics, part 1
How to WordPress: the basics, part 1
 
Word press Plugins by WordPress Experts
Word press Plugins by WordPress ExpertsWord press Plugins by WordPress Experts
Word press Plugins by WordPress Experts
 
WordPress APIs
WordPress APIsWordPress APIs
WordPress APIs
 
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 NepalWordPress theme development from scratch : ICT MeetUp 2013 Nepal
WordPress theme development from scratch : ICT MeetUp 2013 Nepal
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme development
 
Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?Shortcodes vs Widgets: Which one and how?
Shortcodes vs Widgets: Which one and how?
 

Viewers also liked

WordPress Customizer
WordPress CustomizerWordPress Customizer
WordPress CustomizerThad Allender
 
WordPress customizer for themes and more
WordPress customizer for themes and moreWordPress customizer for themes and more
WordPress customizer for themes and moreSantosh Kunwar
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme DevelopmentSantosh Kunwar
 
Ionic Hybrid Mobile Application
Ionic Hybrid Mobile ApplicationIonic Hybrid Mobile Application
Ionic Hybrid Mobile ApplicationAl Sayed Gamal
 

Viewers also liked (7)

WordPress Customizer
WordPress CustomizerWordPress Customizer
WordPress Customizer
 
Modern Web Applications using AngularJS
Modern Web Applications using AngularJSModern Web Applications using AngularJS
Modern Web Applications using AngularJS
 
Rails course day 4
Rails course day 4Rails course day 4
Rails course day 4
 
Rails course day 5
Rails course day 5Rails course day 5
Rails course day 5
 
WordPress customizer for themes and more
WordPress customizer for themes and moreWordPress customizer for themes and more
WordPress customizer for themes and more
 
WordPress Theme Development
WordPress Theme DevelopmentWordPress Theme Development
WordPress Theme Development
 
Ionic Hybrid Mobile Application
Ionic Hybrid Mobile ApplicationIonic Hybrid Mobile Application
Ionic Hybrid Mobile Application
 

Similar to Write Your First WordPress Plugin Guide

Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017ylefebvre
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress PluginBrad Williams
 
Developing WordPress Plugins
Developing WordPress PluginsDeveloping WordPress Plugins
Developing WordPress Pluginsrebelpixel
 
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
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress pluginAnthony Montalbano
 
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
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTYWilliam Chong
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentAizat Faiz
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginMainak Goswami
 
Developing WordPress Plugins : For Begineers
Developing WordPress Plugins :  For BegineersDeveloping WordPress Plugins :  For Begineers
Developing WordPress Plugins : For BegineersM A Hossain Tonu
 
Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011David Carr
 
WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Pluginsrandyhoyt
 
WordPress Plugin Development For Beginners
WordPress Plugin Development For BeginnersWordPress Plugin Development For Beginners
WordPress Plugin Development For Beginnersjohnpbloch
 
WordPress
WordPressWordPress
WordPressrisager
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015topher1kenobe
 
Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressHristo Chakarov
 
Learning Wordpress - the internal guide
Learning Wordpress - the internal guideLearning Wordpress - the internal guide
Learning Wordpress - the internal guidetom altman
 
How to Create a Custom WordPress Plugin
How to Create a Custom WordPress PluginHow to Create a Custom WordPress Plugin
How to Create a Custom WordPress PluginAndolasoft Inc
 

Similar to Write Your First WordPress Plugin Guide (20)

Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Developing WordPress Plugins
Developing WordPress PluginsDeveloping WordPress Plugins
Developing 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
 
Extending WordPress
Extending WordPressExtending WordPress
Extending WordPress
 
Write your first WordPress plugin
Write your first WordPress pluginWrite your first WordPress plugin
Write your first WordPress plugin
 
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
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin Development
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
 
Developing WordPress Plugins : For Begineers
Developing WordPress Plugins :  For BegineersDeveloping WordPress Plugins :  For Begineers
Developing WordPress Plugins : For Begineers
 
Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011
 
Faster WordPress Workflows
Faster WordPress WorkflowsFaster WordPress Workflows
Faster WordPress Workflows
 
WordPress Plugins
WordPress PluginsWordPress Plugins
WordPress Plugins
 
WordPress Plugin Development For Beginners
WordPress Plugin Development For BeginnersWordPress Plugin Development For Beginners
WordPress Plugin Development For Beginners
 
WordPress
WordPressWordPress
WordPress
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
 
Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPress
 
Learning Wordpress - the internal guide
Learning Wordpress - the internal guideLearning Wordpress - the internal guide
Learning Wordpress - the internal guide
 
How to Create a Custom WordPress Plugin
How to Create a Custom WordPress PluginHow to Create a Custom WordPress Plugin
How to Create a Custom WordPress Plugin
 

More from Ibrahim Abdel Fattah Mohamed (13)

dubizzle's Guide to RabbitMQ
dubizzle's Guide to RabbitMQdubizzle's Guide to RabbitMQ
dubizzle's Guide to RabbitMQ
 
HTML5
HTML5HTML5
HTML5
 
Desk2Me Pitch
Desk2Me PitchDesk2Me Pitch
Desk2Me Pitch
 
CAT, Your dreams start here
CAT, Your dreams start hereCAT, Your dreams start here
CAT, Your dreams start here
 
Map Your MIInd
Map Your MIIndMap Your MIInd
Map Your MIInd
 
IT Career Planning v2
IT Career Planning v2IT Career Planning v2
IT Career Planning v2
 
Java Based RFID Attendance Management System Graduation Project Presentation
Java Based RFID Attendance Management System Graduation Project PresentationJava Based RFID Attendance Management System Graduation Project Presentation
Java Based RFID Attendance Management System Graduation Project Presentation
 
IT Career Planning
IT Career PlanningIT Career Planning
IT Career Planning
 
Map your Mind, Your mind on a paper
Map your Mind, Your mind on a paperMap your Mind, Your mind on a paper
Map your Mind, Your mind on a paper
 
Web 3.0
Web 3.0Web 3.0
Web 3.0
 
Keynote by Jane Wells
Keynote by Jane WellsKeynote by Jane Wells
Keynote by Jane Wells
 
Getting Started: The Environment
Getting Started: The EnvironmentGetting Started: The Environment
Getting Started: The Environment
 
Getting Started: The Installation
Getting Started: The InstallationGetting Started: The Installation
Getting Started: The Installation
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Write Your First WordPress Plugin Guide

  • 1. Write your first WordPress Plugin Ibrahim Abdel Fattah Mohamed, aka bingorabbit www.bingorabbit.com Twitter: @bingorabbit .. and I HEART WordPress
  • 2. Agenda ● What is a WordPress Plugin? ● Why do I need to write a WordPress Plugin? ● Plugin files structure and headers. ● How to add my plugin to my WordPress Blog. ● How to contribute to WordPress Development? ● Questions..
  • 3. What is a WordPress Plugin? A piece of code, written to solve a problem or to add a specific functionality that is not there.
  • 4. Why do I need to write a WordPress Plugin? ● Solving a problem. ● Add new functionality ● You love it, but have a better implementation? ● Modify it, extend it ● Want to make money?
  • 5. How can I write a plugin? ● Find a problem you need to solve, or something new to add. ● Warm your hands. ● Choose a descriptive name. ● Document every little thing. ● Think about the license. ● Then start coding it..
  • 6. Structure Wordpress/ |- wp-content/ |- plugins/ |- YourPlugin/ |- mainfile.php |- js/ |- css/ |- php/
  • 7. Headers <?php /* Plugin Name: Your desired name Plugin URI: http://path.to/plugin/ Description: What does it actually do? Version: x.Y Author: This should be you Author URI: http://path.to/you/ */ ?>
  • 8. Hooks ● Hooks are just..hooks.. ● Used to attach your plugin to a working system. ● Two types of Hook; Actions and Filters
  • 9. Actions ● Actions, are just actions.. ● Actions triggers an event or a function. ● When a post is published (action), send an email to the administrator (function, event or reaction). add_action('hook_name', 'your_function_name', [priority], [accepted_args]);
  • 10. Filters Database/User <----> Filters <----> Data ● Filters are also just..Filters.. ● Example, add some text just after every post. add_filter('hook_name', 'your_function_name', [priority], [accepted_args]);
  • 12. Important Links ● Writing a Plugin ( http://codex.wordpress.org/Writing_a_Plugin) ● Plugin API (http://codex.wordpress.org/Plugin_API) ● Actions Reference ( http://codex.wordpress.org/Plugin_API/Action_Reference) ● Filters Reference ( http://codex.wordpress.org/Plugin_API/Filter_Reference) ● WordPress Coding Standards ( http://codex.wordpress.org/WordPress_Coding_Standards)
  • 14. Why? ● Improve the software you use.. ● Being a part of the community, learning and experience.
  • 15. Where? ● Documentation, aka Codex ( http://codex.wordpress.org/Codex:Contributing) ● Translation ( http://codex.wordpress.org/Translating_WordPress) ● Support Forum (http://www.wordpress.org/support) ● IRC Channel (#WordPress-dev on Freenode) ● Development (Next Slide?)
  • 16. How? ● Trac (http://trac.wordpress.org/) ● Code it, refine it, or just test it.. ● Got a bug? Go and report it.. http://wordpress.org/development/2009/03/contributing-to-wordpress-part-i-development/
  • 18. Thanks!.. Ibrahim Abdel Fattah Mohamed www.bingorabbit.com www.catreloaded.net