Having started out as a self-described "WordPress hacker", it's taken me years to discover how to incorporate best practices into a WordPress context. I'll share a brief overview of the plugin devleopment concepts I wish I'd understood earlier, including object-oriented architecture, interface-like dependency management, robust app-like directory structure, super-charged deployment, the power of WP constants and APIs, and more.
2. @rhodesjason
github.com/jasonrhodes
notrobotic.com
Saturday, March 2, 13
3. WordPress, as described by various PHP developers
Terrible design buried under a mountain of spaghetti code
Reading through [WordPress code] is like jabbing red-hot fire pokeys into your eyes.
BEHOLD WORDPRESS, DESTROYER OF CPUS
remote shell with cms on side, aka: shit
shit plugins
WordPress is for cat pictures and diary entries.
code is crapcrapcrap
F$%@ THAT F$%@ THAT F$%@ THAT F$%@ THAT F$%@ THAT F$%@ THAT
WordPress is... just adequate
WordPress is for amateurs.
WordPress is... terrifyingly insecure.
No good default caching, it will kill your server if you don’t know what you’re doing
A really terrible database structure
Stack Overflow spam questions
Not a “real” CMS and definitely not a “real” framework
Saturday, March 2, 13
32. What’s the difference between
actions and filters?
Filters filter.
Actions (usually) have side effects.
http://wp.smashingmagazine.com/2012/02/16/
inside-wordpress-actions-filters/
Saturday, March 2, 13
33. CALLABLE
add_action(“action_name”, “function_name”);
Saturday, March 2, 13
42. MORE GOOD THINGS
‣ Load JS/CSS with enqueue functions
‣ Write tests (PHPUnit and QUnit)
‣ Experiment with WP-CLI
‣ Fun with caching
‣ Use the APIs
‣ Deploy smart
Saturday, March 2, 13
43. ‣ Database API ‣ Rewrite API
‣ HTTP API ‣ Settings API
‣ File Header API ‣ Shortcode API
‣ Filesystem API ‣ Theme Modification API
‣ Metadata API ‣ Theme Customization API
‣ Options API ‣ Transients API
‣ Plugin API ‣ Widgets API
‣ Quicktags API ‣ XML-RPC WordPress API
Saturday, March 2, 13
44. mysite
current -> releases/1362181983
/releases
/1362181983
/1362153455
/1362141927
/shared
/config
/files
Saturday, March 2, 13