We The People WordPress Plugin



We The People WordPress Plugin

0 0


we-the-people-wordpress-talk

Presentation on the We The People WordPress plugin for the National Day of Civic Hacking at the White House on June 1, 2013

On Github stevegrunwell / we-the-people-wordpress-talk

We The People WordPress Plugin

National Day of Civic Hacking June 1, 2013@BuckeyeWebDev / @stevegrunwell

Who am I?

Goals of the plugin

Make it as easy as possible for site owners to embed petitions Provide reasonable defaults but make them easy for developers to override Reduce impact on site performance

Default styles in TwentyTwelve

How the plugin works

  • [wtp-petition] shortcode
  • Sidebar widget
  • Access to the API methods via the $we_the_people global (for advanced users)

Highly themeable

WordPress-inspired template inheritance:

wtp-petition-{id}.php (child theme) wtp-petition.php (child theme) wtp-petition-{id}.php (parent theme) wtp-petition.php (parent theme) templates/wtp-petition.php (plugin)

Performance

  • Stores API responses as short-term transients
  • Keeps long-term transients in case of API disruption
  • Ajax results cached to prevent unnecessary calls

Questions?

Steve Grunwell Developer, Buckeye Interactive@BuckeyeWebDev / @stevegrunwell

We The People WordPress Pluginhttps://github.com/buckii/we-the-people-wordpress/