• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Playing nicely-with-other-plugins

Playing nicely-with-other-plugins






Total Views
Views on SlideShare
Embed Views



1 Embed 1

https://twitter.com 1


Upload Details

Uploaded via as Microsoft PowerPoint

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.

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

    Playing nicely-with-other-plugins Playing nicely-with-other-plugins Presentation Transcript

    • playing nicely with other plugins being a good citizen in the plugin development world Pippin Williamson @pippinsplugins http://pippinsplugins.com
    • some goals
    • we want to write plugins that work even in environments “polluted” by other plugins
    • we want to avoid support tickets “your plugin broke when I installed this other plugin”
    • we want to be nice to other developers *or we should want to be nice*
    • we want to be liked by other developers no one likes it when other developers break their plugins let’s try to avoid being the ones responsible
    • we want to create a cohesive environment plugins running nicely with other plugins is awesome
    • we want to be good citizens
    • don’t be that person “ain’t my problem!”
    • it is always our problem a problem for the users is a problem for the developer
    • we help others by helping ourselves eliminating a conflict with plugin Y prevents X support tickets for both parties
    • tips
    • never assume a clean environment test on sites with dozens or hundreds of plugins installed
    • use classes and IDs in your CSS form input { display: none; } that’s just not nice
    • be careful when filtering content the the_content filter is awesome and oh so dangerous
    • check if libraries are loaded loading Stripe’s API twice isn’t pretty
    • don’t take over all the queries! pre_get_posts is the key master it can break everything
    • don’t arbitrarily change actions or filters backwards compatibility matters don’t break your extensions and/or themes
    • be careful with form submissions always use input names or nonces to detect your own form submissions
    • notices can break ajax requests be a good citizen and use isset() and empty()
    • for the love of all that is holy never load your own jQuery or other scripts included in WP core pippinsplugins.com/why-loading
    • conditionally load JS
    • conditionally load CSS
    • be careful with post type names “book” may not be the best option, but “product” might
    • be careful with option names and meta_keys having settings conflict between two plugins is no fun
    • be careful with list table column names naming a column “user” can easily be overwritten in another plugin with one called “user”
    • - - ————
    • encourage others to be good citizens reward developers for finding conflicts be courteous when developers report conflicts
    • encourage others to be good citizens do not always assume YOU are right every developer screws up
    • encourage others to be good citizens take the high road and be willing to help resolve issues even if they aren’t in your code
    • be nice find a conflict, report it appropriately never black list a plugin immediately
    • be nice find a security flaw, report it confidentially don’t yell and scream how plugin X is insecure
    • treat others how you wish to be treated it was true before code and it is still true with code
    • ask me anything seriously, anything