Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created March 27, 2019 22:03
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/a3772b80c26b611eb647a2d3d4c4bb55 to your computer and use it in GitHub Desktop.
Save billerickson/a3772b80c26b611eb647a2d3d4c4bb55 to your computer and use it in GitHub Desktop.
<?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