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 | |
/** | |
* Shared Counts update increments | |
* @see https://sharedcountsplugin.com/2019/03/27/change-how-often-share-counts-refresh/ | |
*/ | |
function be_shared_counts_update_increments( $increments ) { | |
return array( | |
array( | |
'post_date' => strtotime( '-2 days' ), | |
'increment' => strtotime( '-15 minutes' ), | |
), | |
array( | |
'post_date' => strtotime( '-7 days' ), | |
'increment' => strtotime( '-6 hours' ), | |
), | |
array( | |
'post_date' => 0, | |
'increment' => strtotime( '-3 days' ), | |
), | |
); | |
} | |
add_filter( 'shared_counts_update_increments', 'be_shared_counts_update_increments' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment