Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress Hooks The Right Way to Extend Your Wo...
Search
WordCamp Bangkok
February 18, 2017
Technology
0
13
WordPress Hooks The Right Way to Extend Your WordPress
การเพิ่มขีดความสามารถให้ WordPress โดยใช้ WordPress Hooks
WordCamp Bangkok
February 18, 2017
Tweet
Share
More Decks by WordCamp Bangkok
See All by WordCamp Bangkok
Growing Together – Thoughts on the Global WordPress Community
wordcampbangkok
0
20
ทำ Instant Article กับ AMP บน WordPress ได้ไม่ง้อ Coding
wordcampbangkok
0
22
Learn how to create video with a smartphone for your WordPress blog
wordcampbangkok
0
15
Editor In Digital Content World
wordcampbangkok
0
13
How to become a web developer with WordPress and zero experience
wordcampbangkok
1
19
ออกแบบเว็บไซต์โดยใช้ User Journey
wordcampbangkok
0
21
WordPress Security – Know Your Enemy
wordcampbangkok
0
21
Creating-Thai-themes-2017
wordcampbangkok
0
14
ก้าวแรก WordPress ต้องรู้อะไรบ้าง
wordcampbangkok
0
18
Other Decks in Technology
See All in Technology
Docker, Infraestructuras seguras y Hardening
josejuansanchez
0
150
AI時代におけるアジャイル開発について
polyscape_inc
0
110
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
あなたの知らないDateのひみつ / The Secret of "Date" You Haven't known #tqrk16
expajp
0
120
直接メモリアクセス
koba789
0
180
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
650
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
5
49k
21st ACRi Webinar - AMD Presentation Slide (Nao Sumikawa)
nao_sumikawa
0
220
Noを伝える技術2025: 爆速合意形成のためのNICOフレームワーク速習 #pmconf2025
aki_iinuma
2
1.6k
「え?!それ今ではHTMLだけでできるの!?」驚きの進化を遂げたモダンHTML
riyaamemiya
10
4.5k
Product Engineer
resilire
0
140
eBPFとwaruiBPF
sat
PRO
4
2.2k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Speed Design
sergeychernyshev
33
1.4k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.1k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Faster Mobile Websites
deanohume
310
31k
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