Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created February 21, 2013 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/5005558 to your computer and use it in GitHub Desktop.
Save billerickson/5005558 to your computer and use it in GitHub Desktop.
<?php
// Save all stats data, don't limit it to just posts
add_filter( 'be_stats_update', '__return_true' );
// -- OR --
/**
* Limit Stats to Events
*
*/
function be_stats_for_events( $update, $id ) {
return 'events' == get_post_type( $id );
}
add_filter( 'be_stats_update', 'be_stats_for_events', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment