What Would Core Do?


Published on

A fun look at how to extend WordPress with class and consistency. Challenges plug-in and theme authors to apply a new, rigorous philosophy to their work: what would core do?

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

What Would Core Do?

  1. 1. WWCD? (What would core do?)Extending with Classiness and Consistency What Would Core Do?
  2. 2. About Me: Jake Goldman• President (& chief engineer!) @ 10up LLC, a WordPress development & strategy agency• Author of over a dozen WordPress plug-ins• Dozens of clients, from university like Bates College to WP.com VIP clients like TechCrunch• Writer/expert reviewer @ Smashing Magazine• @jakemgold What Would Core Do?
  3. 3. This is WordPress Core Simple, clean,economical. And moddable! What Would Core Do?
  4. 4. This is (often) WordPress Core with Plug-insWell… I guess it does go faster.And it has more HTML5! What Would Core Do?
  5. 5. WordPress with a lot of complex plug-insIs this even a car? What Would Core Do?
  6. 6. (BTW – What Drupal Developers Think WordPress is) What Would Core Do?
  7. 7. (…And what we think Drupal is) What Would Core Do?
  8. 8. What Extended WordPress Should Look Like What Would Core Do?
  9. 9. Seriously, here‟s the point.It’s not the our extensions don’t work, or aren’t well coded (there are plenty of those, too). It’s that they stick out like sore thumbs. What Would Core Do?
  10. 10. WordPress WordPress WordPress Page pageMash Category Post Editor Editor Editor What Would Core Do?
  11. 11. Why do “consumers” love WordPress?• It’s simple for writers to understand. The user interface is intuitive and (mostly) consistent.• It’s pretty.• There are no more bullets.• Alright maybe it’s affordable, too. Many of our extensions are ruining this. What Would Core Do?
  12. 12. 10up‟s Philosophy• WHAT WOULD CORE DO?• Can you tell where “out of the box” WordPress stops and our custom functionality begins? If so, we did it wrong.• If the core team was tasked with building this functionality in, how would they have done it? What Would Core Do?
  13. 13. The right way: AkismetDo you even remember it’s not built into core? BTW, is anyone else surprised that erectile dysfunction is still the most common spam? What Would Core Do?
  14. 14. The wrong way: cformsII Where did these colors come from?? What Would Core Do?
  15. 15. The wrong way: cformsII Where else do we select content to edit like this? What Would Core Do?
  16. 16. The wrong way: cformsII Where did these icon conventions come from? What Would Core Do?
  17. 17. The wrong way: cformsII What is a “Save form settings” option doing in the admin bar? What Would Core Do?
  18. 18. The wrong way: cformsII Why are forms at the bottom instead of with content? And should we just call it “Forms”? What Would Core Do?
  19. 19. The wrong way: cformsII Why is there a “Help” menu item? What Would Core Do?
  20. 20. Case Study: Simple Local Avatars Why did I build it? I just wanted to upload avatars. Weren‟t there other plug-ins that do that?Sure, if you want a page full of settings (including a defaultoption to include a plug-in author credit), a completely new user admin page to manage the avatars, want to retrieve avatars from Twitter and Facebook, want SnapShot integration, and… What Would Core Do?
  21. 21. The Alternative: Add Local Avatars Do I really need a whole new user list screen? What Would Core Do?
  22. 22. Oh come on. Really?What Would Core Do?
  23. 23. Who careswhere it’s saved?? What Would Core Do?
  24. 24. Isn’t size aparameter in“get_avatar” already? What Would Core Do?
  25. 25. Save it for another plug-in. What Would Core Do?
  26. 26. No. What Would Core Do?
  27. 27. Case Study: Simple Local Avatars Number of new admin screens: None. What Would Core Do?
  28. 28. Simple Local AvatarsNumber of new setting fields: One. What Would Core Do?
  29. 29. Simple Local AvatarsNumber of new user profile fields: One. What Would Core Do?
  30. 30. Simple Local AvatarsValue of “it justworks”:Priceless. What Would Core Do?
  31. 31. It‟s not just plug-ins Where else do we have tabs like We get it. these?Heading… 5? What’s with the font?Hex only? What Would Core Do?
  32. 32. It‟s not just plug-ins Oh god. What Would Core Do?
  33. 33. Best Practices: Think About DesignWhat would core do? Heck, what does WordPress do? What Would Core Do?
  34. 34. Best Practices: Think About Settings • Should it be a top level menu or submenu? • Does it need its own page? Or is it part of, say, “writing” settings? • Should it be a drop down or a radio button? • Do really you even need any settings? What Would Core Do?
  35. 35. Best Practices: Leave DashboardAlone! (a.k.a. stop advertising to us) I love you, Frederick, but frankly, my dear, I don’t give a damn. What Would Core Do?
  36. 36. Yep. This isn’t Best Practices: even theadvanced tab. Less is More For users: the paradox of choice. Save it for another plug-in. Decisions > Options. What Would Core Do?
  37. 37. Coding Techniques: Settings API add_settings_field & add_settings_section http://codex.wordpress.org/Settings_APIYou can add setting fields and sections to existingsetting screens. Don’t make a page for two media settings. What Would Core Do?
  38. 38. Coding Techniques: Screen API Add help and documentation using the native “Help” pull down.wpdevel.wordpress.com/2011/12/06/help-and-screen-api-changes-in-3-3/ What Would Core Do?
  39. 39. Coding Techniques: Add HooksInstead of two dozen options, add your own hooksso that other developers can override behavior forthe 5% in the long tail. (Like core does!)do_action( „my_plugin_save‟ );$output = apply_filter( „my_plugin_output‟, $output ) ; What Would Core Do?
  40. 40. Coding Techniques: Uninstall Hookcodex.wordpress.org/Function_Reference/register_uninstall_hook “Thank goodness that plug-in is gone!” What Would Core Do?
  41. 41. WWCD? What would core do? by Jake Goldman @jakemgoldslides & code will be available at get10up.com What Would Core Do?