Enviar búsqueda
Cargar
Using shortcode in plugin development
•
Descargar como PPTX, PDF
•
0 recomendaciones
•
357 vistas
G
gskhanal
Seguir
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 8
Descargar ahora
Recomendados
10. Imagini in MongoDB
10. Imagini in MongoDB
Razvan Raducanu, PhD
Php cookies
Php cookies
JIGAR MAKHIJA
Php sessions
Php sessions
JIGAR MAKHIJA
AngulrJS Overview
AngulrJS Overview
Eyal Vardi
Nanoc
Nanoc
joren de groof
Assignment4
Assignment4
H K
HelloWorld
HelloWorld
llynn83wou
Manish
Manish
Manish Jain
Recomendados
10. Imagini in MongoDB
10. Imagini in MongoDB
Razvan Raducanu, PhD
Php cookies
Php cookies
JIGAR MAKHIJA
Php sessions
Php sessions
JIGAR MAKHIJA
AngulrJS Overview
AngulrJS Overview
Eyal Vardi
Nanoc
Nanoc
joren de groof
Assignment4
Assignment4
H K
HelloWorld
HelloWorld
llynn83wou
Manish
Manish
Manish Jain
Better Selenium Tests with Geb - Selenium Conf 2014
Better Selenium Tests with Geb - Selenium Conf 2014
Naresha K
Jquery
Jquery
PaRa Vaishnav
programming
programming
Burson Augustin
Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008
Mark Jaquith
Java script
Java script
Sukrit Gupta
JavaScript and jQuery Basics
JavaScript and jQuery Basics
Kaloyan Kosev
jQuery Best Practice
jQuery Best Practice
chandrashekher786
Php workshop L03 superglobals
Php workshop L03 superglobals
Mohammad Tahsin Alshalabi
Zen based theming
Zen based theming
Drupal Camp Kyiv
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
camp_drupal_ua
Php workshop L04 database
Php workshop L04 database
Mohammad Tahsin Alshalabi
Java script basic
Java script basic
Vithushan Vinayagamoorthy
Mojolicious
Mojolicious
Lenz Gschwendtner
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
Chris Wu
Defeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security Policy
Francois Marier
Meta Programming with JavaScript
Meta Programming with JavaScript
jeresig
Php with mysql ppt
Php with mysql ppt
Rajamanickam Gomathijayam
Shortcodes In-Depth
Shortcodes In-Depth
Micah Wood
Gail villanueva add muscle to your wordpress site
Gail villanueva add muscle to your wordpress site
references
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Orlando
Chris Scott
Add loop shortcode
Add loop shortcode
Peter Baylies
Más contenido relacionado
La actualidad más candente
Better Selenium Tests with Geb - Selenium Conf 2014
Better Selenium Tests with Geb - Selenium Conf 2014
Naresha K
Jquery
Jquery
PaRa Vaishnav
programming
programming
Burson Augustin
Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008
Mark Jaquith
Java script
Java script
Sukrit Gupta
JavaScript and jQuery Basics
JavaScript and jQuery Basics
Kaloyan Kosev
jQuery Best Practice
jQuery Best Practice
chandrashekher786
Php workshop L03 superglobals
Php workshop L03 superglobals
Mohammad Tahsin Alshalabi
Zen based theming
Zen based theming
Drupal Camp Kyiv
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
camp_drupal_ua
Php workshop L04 database
Php workshop L04 database
Mohammad Tahsin Alshalabi
Java script basic
Java script basic
Vithushan Vinayagamoorthy
Mojolicious
Mojolicious
Lenz Gschwendtner
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Ayes Chinmay
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
Chris Wu
Defeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security Policy
Francois Marier
Meta Programming with JavaScript
Meta Programming with JavaScript
jeresig
Php with mysql ppt
Php with mysql ppt
Rajamanickam Gomathijayam
La actualidad más candente
(18)
Better Selenium Tests with Geb - Selenium Conf 2014
Better Selenium Tests with Geb - Selenium Conf 2014
Jquery
Jquery
programming
programming
Secure Coding with WordPress - WordCamp SF 2008
Secure Coding with WordPress - WordCamp SF 2008
Java script
Java script
JavaScript and jQuery Basics
JavaScript and jQuery Basics
jQuery Best Practice
jQuery Best Practice
Php workshop L03 superglobals
Php workshop L03 superglobals
Zen based theming
Zen based theming
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Ilivanov Alexander.How to make best theme.DrupalCamp Kyiv 2011
Php workshop L04 database
Php workshop L04 database
Java script basic
Java script basic
Mojolicious
Mojolicious
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
I use drupal / 我是 OO 師,我用 Drupal
I use drupal / 我是 OO 師,我用 Drupal
Defeating Cross-Site Scripting with Content Security Policy
Defeating Cross-Site Scripting with Content Security Policy
Meta Programming with JavaScript
Meta Programming with JavaScript
Php with mysql ppt
Php with mysql ppt
Similar a Using shortcode in plugin development
Shortcodes In-Depth
Shortcodes In-Depth
Micah Wood
Gail villanueva add muscle to your wordpress site
Gail villanueva add muscle to your wordpress site
references
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Orlando
Chris Scott
Add loop shortcode
Add loop shortcode
Peter Baylies
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
Adam Tomat
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
Adam Tomat
20110820 header new style
20110820 header new style
AgentiadeturismInvenio
QA for PHP projects
QA for PHP projects
Michelangelo van Dam
WCMTL 15 - Create your own shortcode (Fr)
WCMTL 15 - Create your own shortcode (Fr)
MichaelBontyes
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Mike Schinkel
Form demoinplaywithmysql
Form demoinplaywithmysql
Knoldus Inc.
Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
Becoming a better WordPress Developer
Becoming a better WordPress Developer
Joey Kudish
You're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp Atlanta
Chris Scott
WordPress 3.4 Theme Customizer
WordPress 3.4 Theme Customizer
Chandra Maharzan
Building Potent WordPress Websites
Building Potent WordPress Websites
Kyle Cearley
php2.pptx
php2.pptx
ElieNGOMSEU
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
Simon Su
Flask – Python
Flask – Python
Max Claus Nunes
WordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin Pages
Brandon Dove
Similar a Using shortcode in plugin development
(20)
Shortcodes In-Depth
Shortcodes In-Depth
Gail villanueva add muscle to your wordpress site
Gail villanueva add muscle to your wordpress site
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Orlando
Add loop shortcode
Add loop shortcode
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
[WLDN] Supercharging word press development in 2018
[WLDN] Supercharging word press development in 2018
20110820 header new style
20110820 header new style
QA for PHP projects
QA for PHP projects
WCMTL 15 - Create your own shortcode (Fr)
WCMTL 15 - Create your own shortcode (Fr)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Hardcore URL Routing for WordPress - WordCamp Atlanta 2014 (PPT)
Form demoinplaywithmysql
Form demoinplaywithmysql
Blog Hacks 2011
Blog Hacks 2011
Becoming a better WordPress Developer
Becoming a better WordPress Developer
You're Doing it Wrong - WordCamp Atlanta
You're Doing it Wrong - WordCamp Atlanta
WordPress 3.4 Theme Customizer
WordPress 3.4 Theme Customizer
Building Potent WordPress Websites
Building Potent WordPress Websites
php2.pptx
php2.pptx
Nko workshop - node js crud & deploy
Nko workshop - node js crud & deploy
Flask – Python
Flask – Python
WordPress Admin UI - Future Proofing Your Admin Pages
WordPress Admin UI - Future Proofing Your Admin Pages
Último
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
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
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
wesley chun
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Último
(20)
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
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...
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Slack Application Development 101 Slides
Slack Application Development 101 Slides
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Using shortcode in plugin development
1.
USING SHORTCODE IN PLUGIN
DEVELOPMENT GHANSHYAM KHANAL PROUD MEMBER OF WORDPRESS NEPAL NCOMSERVICES.COM IT-S, NEPAL
2.
SHORTCODE API • Introduced
in WordPress 2.5 • It’s a tag that can dynamically insert content into your wordpress site. 1. [mycode] 2. [mycode foo="bar" id="123" color="red" something="data"] 3. [mycode]Some Content[/mycode] 4. [mycode]<p><a href="http://example.com/">HTML Content</a></p>[/mycode] 5. [mycode]Content [another-shotcode] more content[/mycode] 6. [mycode foo="bar" id="123"]Some Content[/mycode]
3.
CREATING SHORTCODE add_shortcode( $tag
, $func ); function wpnepal_shortcode ( ) { return "Hello WP Nepal Meetup!"; } add_shortcode('wpnepal', 'wpnepal_shortcode'); [wpnepal]
4.
CREATING SHORTCODE… function wpnepal_shortcode
( $atts, $content) { return "{$atts[greet]} WP Nepal Meetup! {$content}"; } add_shortcode('wpnepal', 'wpnepal_shortcode'); [wpnepal greet=“Hello”]Welcome[/wpnepal]
5.
A PROBLEM Need to
add excerpt of a post to another THE SOLUTION Embed Post Plugin http://wordpress.org/extend/plugins/embed-post
6.
EMBED POST function embed_post_shortcode(
$atts ){ extract( shortcode_atts( array( 'post_id' => 0, 'type' => 'excerpt’ ), $atts ) ); global $post; [embed_post post_id=‘12’] $post = get_post($post_id); if($post->post_status == "publish"){ setup_postdata( $post ); $excerpt = '<div class="embed_post">'; $excerpt .= get_the_excerpt(); $excerpt .= '</div>'; wp_reset_query(); return $excerpt; } } add_shortcode('embed_post', 'embed_post_shortcode');
7.
MORE SHORTCODE • Run
Shortcode anywhere in template files: do_shortcode([wpnepal]); • Run shortcode in a text widget: add_filter('widget_text', 'do_shortcode');
8.
THANK YOU QUESTIONS?
Descargar ahora