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 | |
/** | |
* Change button location based on share count | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/code/easc-location-based-on-share-count | |
* | |
* @param array $locations | |
* @return array $locations | |
*/ | |
function be_easc_location( $locations ) { | |
$total = ea_share()->core->count( false, 'included_total' ); | |
if( 10 > $total ) { | |
$locations['before']['hook'] = false; | |
$locations['before']['filter'] = false; | |
} | |
return $locations; | |
} | |
add_filter( 'ea_share_count_theme_locations', 'be_easc_location' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment