SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
The first steps…
• Pre‐development issues
      – Wordpress Plugin Directory
      – Plugin and File Names
      – File Headers
• Wordpress Plugin Hooks 
      – Actions 
      – Filters
• Adding data to wordpress database
      – Creating tables with plugins
• Adding Administration Menus
      – Creating options page
• “Hello Dolly” example
                       Wordpress Plugin Development ‐ A Short 
11/10/2008                                                       2
                                      Tutorial
Pre‐development issues (1)
Wordpress Plugin Directory 
                                                                  code



                                                                  javascript



wp‐content    plugins             your plugin
                                                                  css



                           place your plugin here                 images



                        Wordpress Plugin Development ‐ A Short 
 11/10/2008                                                                    3
                                       Tutorial
Pre‐development issues (2)
Plugin and File Names

Choose  your  plugin’s name  carefully.  Think  about 
what the plugin will do, and make a, hopefully unique, 
name for it. 


It is good for the names of your php files to be derived 
from your chosen plugin name.




                         Wordpress Plugin Development ‐ A Short 
  11/10/2008                                                       4
                                        Tutorial
Pre‐development issues (3)
File Headers




               Wordpress Plugin Development ‐ A Short 
 11/10/2008                                              5
                              Tutorial
Wordpress Plugin Hooks (1)
Hooks are provided 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.




                                                                 Hooks




                       Wordpress Plugin Development ‐ A Short 
11/10/2008                                                               6
                                      Tutorial
Wordpress Plugin Hooks (2)
Hooks = Actions + Filters
Actions are triggered by specific events (e.g. publishing a
post ) that take place in WordPress. Your plugin can respond
to the event by executing a PHP function




         Action                                                Event
                     Wordpress Plugin Development ‐ A Short 
 11/10/2008                                                            7
                                    Tutorial
Wordpress Plugin Hooks (3)
Hooks = Actions + Filters
                  Filters - Functions




                               DATA


Filters are functions that WordPress passes data through
at certain points in execution, just before taking some
action with the data such as adding it to the database or
sending it to the browser screen.
                    Wordpress Plugin Development ‐ A Short 
 11/10/2008                                                   8
                                   Tutorial
Adding data to Wordpress database
Create tables with plugins
There are two types of information you could store
• Setup Information: user choices that are entered when the user first sets up
your plugin.
• Data: information that is added as the user continues to use your plugin

Steps…
1. Write a PHP function that creates the table.
2. Ensure that WordPress calls the function when the plugin is activated.
3. Create an upgrade function, if a new version of your plugin needs to have a
   different table structure.


http://codex.wordpress.org/Creating_Tables_with_Plugins#Create_Database_Tables
                              Wordpress Plugin Development ‐ A Short 
  11/10/2008                                                                     9
                                             Tutorial
A simple example
$table_name = $wpdb->prefix . quot;liveshoutboxquot;;

// check if there is a table with the same name
if($wpdb->get_var(quot;show tables like '$table_name'quot;) != $table_name) {


// SQL Statement
$sql = quot;CREATE TABLE quot; . $table_name . quot; (
id mediumint(9) NOT NULL AUTO_INCREMENT,
time bigint(11) DEFAULT '0' NOT NULL,
name tinytext NOT NULL,
text text NOT NULL,
url VARCHAR(55) NOT NULL,
UNIQUE KEY id (id)
);quot;;


// Creating the table
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);
A simple example
$welcome_name = quot;Mr. Wordpressquot;;
$welcome_text = quot;Congratulations, you just completed the installation!quot;;

// SQL Statememt
$insert = quot;INSERT INTO quot; . $table_name .
quot; (time, name, text) quot; .
quot;VALUES ('quot; . time() . quot;','quot; . $wpdb->escape($welcome_name) . quot;','quot; . $wpdb->escape($welcome_text) .
      quot;')quot;;

// Adding Data into the table
$results = $wpdb->query( $insert );
Adding Administration Menus
 Create options page
Top-level menus: Settings, Manage, Plugins, Presentation, Write, Users


Admin Menu Functions
• add_menu_page: create a top-level menu
• add_submenu_page: define one or more sub-menu pages
In the above wordpress functions the developers defined the name of their php
functions which are responsible to build the options pages.
See an example here
http://codex.wordpress.org/Creating_Options_Pages



                             Wordpress Plugin Development ‐ A Short 
  11/10/2008                                                                    12
                                            Tutorial
Hello Dolly example



Hello Dolly Lyrics             Chose randomly one lyric and place it
                               the upper right of your Administation
                               panels


              add_action('admin_footer', 'hello_dolly');


                          Wordpress Plugin Development ‐ A Short 
 11/10/2008                                                         13
                                         Tutorial
Wordpress Development Community
                                  Are you ready to enter into an
                                  evolving development community?




             Wordpress Plugin Development ‐ A Short 
11/10/2008                                                     14
                            Tutorial
Matt Mullenweg
Creator of Wordpress.org


                                  14th place
                                  The 25 most influential
                                  people on the web
                                  (2008)


               Wordpress Plugin Development ‐ A Short 
11/10/2008                                               15
                              Tutorial
More details on the internet…
                     The truth is out there…

http://codex.wordpress.org/Writing_a_Plugin#WordPress_Plugin_Hooks
http://codex.wordpress.org/Plugin_API
http://codex.wordpress.org/Creating_Tables_with_Plugins
http://codex.wordpress.org/Adding_Administration_Menus




                         Wordpress Plugin Development ‐ A Short 
  11/10/2008                                                         16
                                        Tutorial
THE END


             Thank you!

             Wordpress Plugin Development ‐ A Short 
11/10/2008                                             17
                            Tutorial

Más contenido relacionado

La actualidad más candente

Vue.js Getting Started
Vue.js Getting StartedVue.js Getting Started
Vue.js Getting StartedMurat Doğan
 
안드로이드 윈도우 마스터 되기
안드로이드 윈도우 마스터 되기안드로이드 윈도우 마스터 되기
안드로이드 윈도우 마스터 되기Myungwook Ahn
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewDiacode
 
[부스트캠프 Tech Talk] 신원지_Wandb Visualization
[부스트캠프 Tech Talk] 신원지_Wandb Visualization[부스트캠프 Tech Talk] 신원지_Wandb Visualization
[부스트캠프 Tech Talk] 신원지_Wandb VisualizationCONNECT FOUNDATION
 
WordPress Security for Beginners
WordPress Security for BeginnersWordPress Security for Beginners
WordPress Security for BeginnersAdam W. Warner
 
Strategies for Digital Natives
Strategies for Digital NativesStrategies for Digital Natives
Strategies for Digital Nativeshblowers
 
Laravel dokumentacja Restful API - swagger
Laravel dokumentacja Restful API - swaggerLaravel dokumentacja Restful API - swagger
Laravel dokumentacja Restful API - swaggerLaravel Poland MeetUp
 
Google analytics version 4 in details
Google analytics version 4 in detailsGoogle analytics version 4 in details
Google analytics version 4 in detailsOmkar Nandi
 
QnA blog using Django - ORM, 회원가입, 로그인/로그아웃
QnA blog using Django - ORM, 회원가입, 로그인/로그아웃QnA blog using Django - ORM, 회원가입, 로그인/로그아웃
QnA blog using Django - ORM, 회원가입, 로그인/로그아웃Kwangyoun Jung
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPressHarshad Mane
 
Pinterest Marketing
Pinterest MarketingPinterest Marketing
Pinterest MarketingVishanth NJ
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
Audit SEO du site Marmiton mars 2020 - Isabelle Piel
Audit SEO du site Marmiton mars 2020 - Isabelle PielAudit SEO du site Marmiton mars 2020 - Isabelle Piel
Audit SEO du site Marmiton mars 2020 - Isabelle PielPiel Isabelle
 
White hat seo vs black hat seo
White hat seo vs black hat seoWhite hat seo vs black hat seo
White hat seo vs black hat seoINDIAN SEO COMPANY
 

La actualidad más candente (20)

Vue.js Getting Started
Vue.js Getting StartedVue.js Getting Started
Vue.js Getting Started
 
Présentation netvibes
Présentation netvibesPrésentation netvibes
Présentation netvibes
 
안드로이드 윈도우 마스터 되기
안드로이드 윈도우 마스터 되기안드로이드 윈도우 마스터 되기
안드로이드 윈도우 마스터 되기
 
Front-End Frameworks: a quick overview
Front-End Frameworks: a quick overviewFront-End Frameworks: a quick overview
Front-End Frameworks: a quick overview
 
[부스트캠프 Tech Talk] 신원지_Wandb Visualization
[부스트캠프 Tech Talk] 신원지_Wandb Visualization[부스트캠프 Tech Talk] 신원지_Wandb Visualization
[부스트캠프 Tech Talk] 신원지_Wandb Visualization
 
WordPress Security for Beginners
WordPress Security for BeginnersWordPress Security for Beginners
WordPress Security for Beginners
 
Strategies for Digital Natives
Strategies for Digital NativesStrategies for Digital Natives
Strategies for Digital Natives
 
Laravel dokumentacja Restful API - swagger
Laravel dokumentacja Restful API - swaggerLaravel dokumentacja Restful API - swagger
Laravel dokumentacja Restful API - swagger
 
Google analytics version 4 in details
Google analytics version 4 in detailsGoogle analytics version 4 in details
Google analytics version 4 in details
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
 
QnA blog using Django - ORM, 회원가입, 로그인/로그아웃
QnA blog using Django - ORM, 회원가입, 로그인/로그아웃QnA blog using Django - ORM, 회원가입, 로그인/로그아웃
QnA blog using Django - ORM, 회원가입, 로그인/로그아웃
 
Content strategy 101
Content strategy 101Content strategy 101
Content strategy 101
 
Introduction to WordPress
Introduction to WordPressIntroduction to WordPress
Introduction to WordPress
 
使用 Controller
使用 Controller使用 Controller
使用 Controller
 
Pinterest Marketing
Pinterest MarketingPinterest Marketing
Pinterest Marketing
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
Audit SEO du site Marmiton mars 2020 - Isabelle Piel
Audit SEO du site Marmiton mars 2020 - Isabelle PielAudit SEO du site Marmiton mars 2020 - Isabelle Piel
Audit SEO du site Marmiton mars 2020 - Isabelle Piel
 
Maven
MavenMaven
Maven
 
White hat seo vs black hat seo
White hat seo vs black hat seoWhite hat seo vs black hat seo
White hat seo vs black hat seo
 

Similar a Wordpress Plugin Development Short Tutorial

Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012Bastian Grimm
 
<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into WordpressMatt Harris
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIWP Engine
 
Microsoft WebMatrix Platform Overview
Microsoft WebMatrix Platform OverviewMicrosoft WebMatrix Platform Overview
Microsoft WebMatrix Platform OverviewSpiffy
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!Marko Heijnen
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated wayMichaël Perrin
 
WebFest 2011 WebMatrix Overview by Gavin Warrener
WebFest 2011 WebMatrix Overview by Gavin WarrenerWebFest 2011 WebMatrix Overview by Gavin Warrener
WebFest 2011 WebMatrix Overview by Gavin WarrenerSpiffy
 
WordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, LondonWordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, LondonBastian Grimm
 
Mastering WordPress Vol.1
Mastering WordPress Vol.1Mastering WordPress Vol.1
Mastering WordPress Vol.1Wataru OKAMOTO
 
Plugin Development Practices
Plugin Development PracticesPlugin Development Practices
Plugin Development Practicesdanpastori
 
FSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the MatrixFSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the MatrixFrédéric Harper
 
Basic Wordpress PPT
Basic Wordpress PPT Basic Wordpress PPT
Basic Wordpress PPT mayur akabari
 
WordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeWordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeRakesh Kushwaha
 
How to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy StepsHow to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy StepsSingsys Pte Ltd
 
Amazing WordPress & Productivity Tips
Amazing WordPress & Productivity TipsAmazing WordPress & Productivity Tips
Amazing WordPress & Productivity TipsTony Cecala, Ph.D.
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress PluginBrad Williams
 
WordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for BeginnersWordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for BeginnersStewart Ritchie
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 

Similar a Wordpress Plugin Development Short Tutorial (20)

Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012
 
<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
 
Microsoft WebMatrix Platform Overview
Microsoft WebMatrix Platform OverviewMicrosoft WebMatrix Platform Overview
Microsoft WebMatrix Platform Overview
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!
 
Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 
WebFest 2011 WebMatrix Overview by Gavin Warrener
WebFest 2011 WebMatrix Overview by Gavin WarrenerWebFest 2011 WebMatrix Overview by Gavin Warrener
WebFest 2011 WebMatrix Overview by Gavin Warrener
 
WordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, LondonWordPress Optimization & Security - LAC 2013, London
WordPress Optimization & Security - LAC 2013, London
 
Mastering WordPress Vol.1
Mastering WordPress Vol.1Mastering WordPress Vol.1
Mastering WordPress Vol.1
 
Plugin Development Practices
Plugin Development PracticesPlugin Development Practices
Plugin Development Practices
 
Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
FSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the MatrixFSOSS - Take the red pill and enter the Matrix
FSOSS - Take the red pill and enter the Matrix
 
Basic Wordpress PPT
Basic Wordpress PPT Basic Wordpress PPT
Basic Wordpress PPT
 
WordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcodeWordPress basic fundamental of plugin development and creating shortcode
WordPress basic fundamental of plugin development and creating shortcode
 
Wordpress customer support
Wordpress customer support Wordpress customer support
Wordpress customer support
 
How to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy StepsHow to Create WordPress Website in Easy Steps
How to Create WordPress Website in Easy Steps
 
Amazing WordPress & Productivity Tips
Amazing WordPress & Productivity TipsAmazing WordPress & Productivity Tips
Amazing WordPress & Productivity Tips
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
WordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for BeginnersWordCamp Belfast DevOps for Beginners
WordCamp Belfast DevOps for Beginners
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 

Último

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
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
 

Último (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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...
 
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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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
 

Wordpress Plugin Development Short Tutorial

  • 1.
  • 2. The first steps… • Pre‐development issues – Wordpress Plugin Directory – Plugin and File Names – File Headers • Wordpress Plugin Hooks  – Actions  – Filters • Adding data to wordpress database – Creating tables with plugins • Adding Administration Menus – Creating options page • “Hello Dolly” example Wordpress Plugin Development ‐ A Short  11/10/2008 2 Tutorial
  • 3. Pre‐development issues (1) Wordpress Plugin Directory  code javascript wp‐content plugins your plugin css place your plugin here images Wordpress Plugin Development ‐ A Short  11/10/2008 3 Tutorial
  • 4. Pre‐development issues (2) Plugin and File Names Choose  your  plugin’s name  carefully.  Think  about  what the plugin will do, and make a, hopefully unique,  name for it.  It is good for the names of your php files to be derived  from your chosen plugin name. Wordpress Plugin Development ‐ A Short  11/10/2008 4 Tutorial
  • 5. Pre‐development issues (3) File Headers Wordpress Plugin Development ‐ A Short  11/10/2008 5 Tutorial
  • 6. Wordpress Plugin Hooks (1) Hooks are provided 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. Hooks Wordpress Plugin Development ‐ A Short  11/10/2008 6 Tutorial
  • 7. Wordpress Plugin Hooks (2) Hooks = Actions + Filters Actions are triggered by specific events (e.g. publishing a post ) that take place in WordPress. Your plugin can respond to the event by executing a PHP function Action Event Wordpress Plugin Development ‐ A Short  11/10/2008 7 Tutorial
  • 8. Wordpress Plugin Hooks (3) Hooks = Actions + Filters Filters - Functions DATA Filters are functions that WordPress passes data through at certain points in execution, just before taking some action with the data such as adding it to the database or sending it to the browser screen. Wordpress Plugin Development ‐ A Short  11/10/2008 8 Tutorial
  • 9. Adding data to Wordpress database Create tables with plugins There are two types of information you could store • Setup Information: user choices that are entered when the user first sets up your plugin. • Data: information that is added as the user continues to use your plugin Steps… 1. Write a PHP function that creates the table. 2. Ensure that WordPress calls the function when the plugin is activated. 3. Create an upgrade function, if a new version of your plugin needs to have a different table structure. http://codex.wordpress.org/Creating_Tables_with_Plugins#Create_Database_Tables Wordpress Plugin Development ‐ A Short  11/10/2008 9 Tutorial
  • 10. A simple example $table_name = $wpdb->prefix . quot;liveshoutboxquot;; // check if there is a table with the same name if($wpdb->get_var(quot;show tables like '$table_name'quot;) != $table_name) { // SQL Statement $sql = quot;CREATE TABLE quot; . $table_name . quot; ( id mediumint(9) NOT NULL AUTO_INCREMENT, time bigint(11) DEFAULT '0' NOT NULL, name tinytext NOT NULL, text text NOT NULL, url VARCHAR(55) NOT NULL, UNIQUE KEY id (id) );quot;; // Creating the table require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql);
  • 11. A simple example $welcome_name = quot;Mr. Wordpressquot;; $welcome_text = quot;Congratulations, you just completed the installation!quot;; // SQL Statememt $insert = quot;INSERT INTO quot; . $table_name . quot; (time, name, text) quot; . quot;VALUES ('quot; . time() . quot;','quot; . $wpdb->escape($welcome_name) . quot;','quot; . $wpdb->escape($welcome_text) . quot;')quot;; // Adding Data into the table $results = $wpdb->query( $insert );
  • 12. Adding Administration Menus Create options page Top-level menus: Settings, Manage, Plugins, Presentation, Write, Users Admin Menu Functions • add_menu_page: create a top-level menu • add_submenu_page: define one or more sub-menu pages In the above wordpress functions the developers defined the name of their php functions which are responsible to build the options pages. See an example here http://codex.wordpress.org/Creating_Options_Pages Wordpress Plugin Development ‐ A Short  11/10/2008 12 Tutorial
  • 13. Hello Dolly example Hello Dolly Lyrics Chose randomly one lyric and place it the upper right of your Administation panels add_action('admin_footer', 'hello_dolly'); Wordpress Plugin Development ‐ A Short  11/10/2008 13 Tutorial
  • 14. Wordpress Development Community Are you ready to enter into an evolving development community? Wordpress Plugin Development ‐ A Short  11/10/2008 14 Tutorial
  • 15. Matt Mullenweg Creator of Wordpress.org 14th place The 25 most influential people on the web (2008) Wordpress Plugin Development ‐ A Short  11/10/2008 15 Tutorial
  • 16. More details on the internet… The truth is out there… http://codex.wordpress.org/Writing_a_Plugin#WordPress_Plugin_Hooks http://codex.wordpress.org/Plugin_API http://codex.wordpress.org/Creating_Tables_with_Plugins http://codex.wordpress.org/Adding_Administration_Menus Wordpress Plugin Development ‐ A Short  11/10/2008 16 Tutorial
  • 17. THE END Thank you! Wordpress Plugin Development ‐ A Short  11/10/2008 17 Tutorial