The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
Upcoming SlideShare
Loading in...5
×
 

The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]

on

  • 1,235 views

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 ...

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.

Statistics

Views

Total Views
1,235
Views on SlideShare
942
Embed Views
293

Actions

Likes
5
Downloads
7
Comments
0

6 Embeds 293

http://notrobotic.com 205
http://librosweb.es 73
http://localhost 9
https://www.linkedin.com 3
http://www.linkedin.com 2
https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP] The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP] Presentation Transcript

  • The WordPress Hacker’s Guide to the Galaxy()Saturday, March 2, 13
  • @rhodesjason github.com/jasonrhodes notrobotic.comSaturday, March 2, 13
  • 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” frameworkSaturday, March 2, 13
  • WORDPRESS IS NOT THE DEVILSaturday, March 2, 13
  • WORDPRESS IS PHPSaturday, March 2, 13
  • WORDPRESS IS CODESaturday, March 2, 13
  • BETTER CODE BETTER PHP BETTER WORDPRESSSaturday, March 2, 13
  • THE WP HACKER’S GUIDE TO THE GALAXYSaturday, March 2, 13
  • +Saturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • THE WP HACKER’S GUIDE TO THE GALAXYSaturday, March 2, 13
  • FOLDER STRUCTURESaturday, March 2, 13
  • mysite /wp-admin /wp-content /wp-includes index.php wp-config.php wp-{etc}.phpSaturday, March 2, 13
  • mysite index.php /wpSaturday, March 2, 13
  • WP GIANTS: MARK JAQUITHSaturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • mysite /config /environments environment-config.php /public /content /wp index.php wp-config.php /vendorSaturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • LET’S WRITE SOME PLUGIN CODESaturday, March 2, 13
  • Saturday, March 2, 13
  • YES, PLUGINS (NOT FUNCTIONS.PHP)Saturday, March 2, 13
  • Saturday, March 2, 13
  • MUST USE PLUGINSSaturday, March 2, 13
  • content /plugins cornify.php /batcache /themes /uploadsSaturday, March 2, 13
  • content /mu-plugins /plugins cornify.php /batcache /themes /uploadsSaturday, March 2, 13
  • Saturday, March 2, 13
  • 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
  • CALLABLE add_action(“action_name”, “function_name”);Saturday, March 2, 13
  • array($object, “method_name”)Saturday, March 2, 13
  • LET’S USE OOPSaturday, March 2, 13
  • WP GIANTS: SCRIBUSaturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • LET’S NAMESPACESaturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • 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 smartSaturday, March 2, 13
  • ‣ 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 APISaturday, March 2, 13
  • mysite current -> releases/1362181983 /releases /1362181983 /1362153455 /1362141927 /shared /config /filesSaturday, March 2, 13
  • Saturday, March 2, 13
  • Saturday, March 2, 13
  • @rhodesjason Please rate this talk https://joind.in/8209 Slides, notes, example code: http://notrobotic.com/talks/ 2013-02-20-wpgalaxy.htmlSaturday, March 2, 13