Created
February 21, 2013 15:40
-
-
Save billerickson/5005558 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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