Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Making shortcodes a piece of cake
Search
Matthew Haines-Young
March 10, 2015
Programming
0
24k
Making shortcodes a piece of cake
How we manage complex page elements
in WordPress with Shortcake on Fusion.net
Matthew Haines-Young
March 10, 2015
Tweet
Share
More Decks by Matthew Haines-Young
See All by Matthew Haines-Young
Building Sites with Gutenberg
mattheu
1
230
WordPress REST API - Writing Custom Endpoints
mattheu
0
94
Intro to I18N in code
mattheu
0
83
Tips for writing secure code in WordPress
mattheu
1
130
Other Decks in Programming
See All in Programming
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
39
26k
チームをチームにするEM
hitode909
0
340
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
310
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
170
Cap'n Webについて
yusukebe
0
140
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
510
WebRTC、 綺麗に見るか滑らかに見るか
sublimer
1
190
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
410
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
430
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
440
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
220
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
130
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
0
2.3k
Tell your own story through comics
letsgokoyo
0
740
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Code Review Best Practice
trishagee
74
19k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
300
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
240
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
73
A Modern Web Designer's Workflow
chriscoyier
698
190k
Chasing Engaging Ingredients in Design
codingconduct
0
71
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.3k
Speed Design
sergeychernyshev
33
1.4k
Transcript
MAKING SHORTCODES A PIECE OF CAKE Manage complex page elements
in WordPress with Shortcake https://github.com/fusioneng/Shortcake
None
• US-based, multi-platform media company • Expanding their web presence
• Migrated Fusion.net to WordPress (end 2014) • Launched a big redesign (early 2015) • Want to publish great content on the web
AUTHORS NEED TO BUILD INTERESTING PAGES THEMSELVES ON A DAILY
BASIS
EXAMPLE: BLOCKQUOTE
GOALS • Simple and easy to use tool • No
code • WYSIWYG • Flexible, reusable modules • Simple for developers to add new modules • Make use of existing tools
None
None
None
None
None
None
HOW DO WE DO IT?
• Available in WordPress since 2.5 • WordPress uses them
for galleries, audio and video • Simple code: [name attr="value"] • Converted to HTML when output SHORTCODES
BUT EVERYBODY HATES SHORTCODES!
• Terrible user experience • Users still have to write
code • No discoverability • Poor documentation • Often don’t have previews WHY ARE SHORTCODES BAD?
SHORTCODE PREVIEWS • It is possible to get previews in
the editor • Easier now than it once was • MCE Views • Simple JavaScript API to register a preview for a shortcode
SHORTCAKE = SHORTCODES + MCE VIEWS + INTERFACE
• Mostly JavaScript - Backbone.js • Modules - Grunt +
Browserify • Jasmine for unit testing (Grunt, TravisCI) • PHP to generate preview - output exactly as on the front end TECHNICAL INFO
EXAMPLES FROM FUSION.NET
GALLERY
IMAGE COMPARISON
EMBEDDED PDF
• Interactives. JS apps & games • Liveblogs (WordPress VIP
Liveblogs) • Social Streams. Curated grid of content from Twitter, Instagram etc • Embedding third party content. (Quiz from Playbuzz) OTHER EXAMPLES
SHORTCAKE MAKES USING SHORTCODES A PIECE OF CAKE!
BUT ITS NOT REALLY ABOUT SHORTCODES
IF A USER EVER SEES A SHORTCODE, THEN
WE’VE FAILED
SHORTCAKE MAKES IT EASY TO ADD COMPLEX BLOCKS OF CONTENT