The WordPress Hacker’s                  Guide to the Galaxy()Saturday, March 2, 13
@rhodesjason                        github.com/jasonrhodes                        notrobotic.comSaturday, March 2, 13
Saturday, March 2, 13
Saturday, March 2, 13
Saturday, March 2, 13
WordPress, as described by various PHP developers                Terrible design buried under a mountain of spaghetti code...
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,...
+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,...
FOLDER STRUCTURESaturday, March 2, 13
mysite                        	 	 /wp-admin                        	 	 /wp-content                        	 	 /wp-includes...
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        ...
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                           	 	 /batcac...
content                            /mu-plugins                           /plugins                           	 	 cornify.ph...
Saturday, March 2, 13
What’s the difference between                             actions and filters?                                    Filters fi...
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) ...
‣   Database API      ‣   Rewrite API                    ‣   HTTP API          ‣   Settings API                    ‣   Fil...
mysite                	 	 current -> releases/1362181983                	 	 /releases                	 	 	 	 /1362181983  ...
Saturday, March 2, 13
Saturday, March 2, 13
@rhodesjason                        Please rate this talk                        https://joind.in/8209                    ...
Upcoming SlideShare
Loading in...5
×

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

246

Published on

As someone who started with PHP as a self-described "WordPress hacker", I had a hard time finding the path to becoming a knowledgeable programmer. Having now stumbled a short way up that path, I think we can make it easier for anyone who's interested in finding it. I'll share a brief overview of the tools and concepts I wish I'd known getting started, including why the command line matters, how version control fits with WP, MVC architecture, interfaces/adapters, general PHP tips, etc.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
246
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 1. The WordPress Hacker’s Guide to the Galaxy()Saturday, March 2, 13
  2. 2. @rhodesjason github.com/jasonrhodes notrobotic.comSaturday, March 2, 13
  3. 3. Saturday, March 2, 13
  4. 4. Saturday, March 2, 13
  5. 5. Saturday, March 2, 13
  6. 6. 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
  7. 7. WORDPRESS IS NOT THE DEVILSaturday, March 2, 13
  8. 8. WORDPRESS IS PHPSaturday, March 2, 13
  9. 9. WORDPRESS IS CODESaturday, March 2, 13
  10. 10. BETTER CODE BETTER PHP BETTER WORDPRESSSaturday, March 2, 13
  11. 11. THE WP HACKER’S GUIDE TO THE GALAXYSaturday, March 2, 13
  12. 12. +Saturday, March 2, 13
  13. 13. Saturday, March 2, 13
  14. 14. Saturday, March 2, 13
  15. 15. Saturday, March 2, 13
  16. 16. THE WP HACKER’S GUIDE TO THE GALAXYSaturday, March 2, 13
  17. 17. FOLDER STRUCTURESaturday, March 2, 13
  18. 18. mysite /wp-admin /wp-content /wp-includes index.php wp-config.php wp-{etc}.phpSaturday, March 2, 13
  19. 19. mysite index.php /wpSaturday, March 2, 13
  20. 20. WP GIANTS: MARK JAQUITHSaturday, March 2, 13
  21. 21. Saturday, March 2, 13
  22. 22. Saturday, March 2, 13
  23. 23. Saturday, March 2, 13
  24. 24. mysite /config /environments environment-config.php /public /content /wp index.php wp-config.php /vendorSaturday, March 2, 13
  25. 25. Saturday, March 2, 13
  26. 26. Saturday, March 2, 13
  27. 27. LET’S WRITE SOME PLUGIN CODESaturday, March 2, 13
  28. 28. Saturday, March 2, 13
  29. 29. YES, PLUGINS (NOT FUNCTIONS.PHP)Saturday, March 2, 13
  30. 30. Saturday, March 2, 13
  31. 31. MUST USE PLUGINSSaturday, March 2, 13
  32. 32. content /plugins cornify.php /batcache /themes /uploadsSaturday, March 2, 13
  33. 33. content /mu-plugins /plugins cornify.php /batcache /themes /uploadsSaturday, March 2, 13
  34. 34. Saturday, March 2, 13
  35. 35. 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
  36. 36. CALLABLE add_action(“action_name”, “function_name”);Saturday, March 2, 13
  37. 37. array($object, “method_name”)Saturday, March 2, 13
  38. 38. LET’S USE OOPSaturday, March 2, 13
  39. 39. WP GIANTS: SCRIBUSaturday, March 2, 13
  40. 40. Saturday, March 2, 13
  41. 41. Saturday, March 2, 13
  42. 42. LET’S NAMESPACESaturday, March 2, 13
  43. 43. Saturday, March 2, 13
  44. 44. Saturday, March 2, 13
  45. 45. 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
  46. 46. ‣ 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
  47. 47. mysite current -> releases/1362181983 /releases /1362181983 /1362153455 /1362141927 /shared /config /filesSaturday, March 2, 13
  48. 48. Saturday, March 2, 13
  49. 49. Saturday, March 2, 13
  50. 50. @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
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×