Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
14
0
Share
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
25
ทำ Instant Article กับ AMP บน WordPress ได้ไม่ง้อ Coding
wordcampbangkok
0
26
Learn how to create video with a smartphone for your WordPress blog
wordcampbangkok
0
16
Editor In Digital Content World
wordcampbangkok
0
16
How to become a web developer with WordPress and zero experience
wordcampbangkok
1
23
ออกแบบเว็บไซต์โดยใช้ User Journey
wordcampbangkok
0
31
WordPress Security – Know Your Enemy
wordcampbangkok
0
22
Creating-Thai-themes-2017
wordcampbangkok
0
21
ก้าวแรก WordPress ต้องรู้อะไรบ้าง
wordcampbangkok
0
22
Other Decks in Technology
See All in Technology
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8k
Oracle Cloud Infrastructure presents managed, serverless MCP Servers for Oracle AI Database
thatjeffsmith
0
200
10サービス以上のメール到達率改善を地道に継続的に進めている話 / Continue to improve email delivery rates across multiple services
yamaguchitk333
3
120
世界の中心でApp Runnerを叫ぶ FINAL
tsukuboshi
0
250
ServiceによるKubernetes通信制御ーClusterIPを例に
miku01
1
160
Swift Sequence の便利 API 再発見
treastrain
1
230
Purview 勉強会報告 Microsoft Purview 入門しようとしてみた
masakichixo
1
140
Digital Independence: Why, When and How
wannesrams
0
310
PdM・Eng・QAで進めるAI駆動開発の現在地/aidd-with-pdm-eng-qa
shota_kusaba
0
150
「強制アップデート」か「チームの自律」か?エンタープライズが辿り着いたプラットフォームのハイブリッド運用/cloudnative-kaigi-hybrid-platform-operations
mhrtech
0
150
小さいVue.jsを30分で作る
hal_spidernight
0
150
AI時代に越境し、 組織を変えるQAスキルの正体 / QA Skills for Transforming an Organization
mii3king
5
4.2k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
540
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
The SEO identity crisis: Don't let AI make you average
varn
0
460
Heart Work Chapter 1 - Part 1
lfama
PRO
6
35k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Amusing Abliteration
ianozsvald
1
160
エンジニアに許された特別な時間の終わり
watany
106
240k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
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