Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
WordPress Hooks The Right Way to Extend Your Wo...
Search
WordCamp Bangkok
February 18, 2017
Technology
19
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WordPress Hooks The Right Way to Extend Your WordPress
การเพิ่มขีดความสามารถให้ WordPress โดยใช้ WordPress Hooks
WordCamp Bangkok
February 18, 2017
More Decks by WordCamp Bangkok
See All by WordCamp Bangkok
Growing Together – Thoughts on the Global WordPress Community
wordcampbangkok
0
32
ทำ Instant Article กับ AMP บน WordPress ได้ไม่ง้อ Coding
wordcampbangkok
0
29
Learn how to create video with a smartphone for your WordPress blog
wordcampbangkok
0
23
Editor In Digital Content World
wordcampbangkok
0
19
How to become a web developer with WordPress and zero experience
wordcampbangkok
1
30
ออกแบบเว็บไซต์โดยใช้ User Journey
wordcampbangkok
0
38
WordPress Security – Know Your Enemy
wordcampbangkok
0
25
Creating-Thai-themes-2017
wordcampbangkok
0
26
ก้าวแรก WordPress ต้องรู้อะไรบ้าง
wordcampbangkok
0
30
Other Decks in Technology
See All in Technology
USB PDを使ってスマホを労わりたい
raspython3
0
180
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
go-sqletch
moznion
0
140
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
780
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
920
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
350
10年後、Engineering 行為を剥奪されるとして、わたしたちは、どう、何を創ればいいだろうか。 / If Engineering Is Taken Away in 10 Years, How and What Should We Create?
bitkey
PRO
1
200
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
480
NDIでApple Vision Proにリアルタイム映像送信
jyouryuusui
0
120
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
340
Metadata - Section 1: HTML Basics
mohab1
0
120
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Building an army of robots
kneath
307
47k
The Language of Interfaces
destraynor
162
27k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Mobile First: as difficult as doing things right
swwweet
225
10k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Transcript
WordPress Hooks: The Right Way to Extend Your WordPress
B Y K A N O U I V I R A C H http://www.freeiconspng.com/free-images/hook-icon-24086
Research & Development Architect KAN OUIVIRACH Who am I?
WHAT ARE HOOK?
http://vignette1.wikia.nocookie.net/villains/images/a/a6/Captain_Hook_(Hook).jpg/revision/ latest?cb=20140330214655 http://www.punchdrunksports.com/n4s-content/uploads/2015/01/Boxing-Right-Hook.jpg ??????
HOOK are… • Magic • Extend WordPress without messing with
the core! • Event-driven programming • Actions + Filters
How do they work?
What if we want to do something here? W O
R D P R E S S <code> </code> Normal Flow ? ? ?
Hook it! W O R D P R E S
S <code> </code> We write code. <code>
W O R D P R E S S <code>
</code> <code> New Flow!!! 2 1 3
Actions vs. Filters
File: wp-includes/plugin.php
File: wp-includes/plugin.php apply_filters
File: wp-includes/plugin.php do_action
Actions vs. Filters do something change something
File: functions.php Add text in ‘Footer’
File: functions.php Make content ‘UPPERCASE’
YOUR OWN HOOK!
Recap • Extend without modifying • Actions vs. Filters
Thank you https://github.com/zkan/wordcamp-bangkok-2017