Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created October 9, 2017 22:26
Show Gist options
  • Save billerickson/858ce03c85e317cd2b9cabbadd3991f9 to your computer and use it in GitHub Desktop.
Save billerickson/858ce03c85e317cd2b9cabbadd3991f9 to your computer and use it in GitHub Desktop.
<?php
/**
* EA Share Count Shortcode
*
*/
function be_easc_shortcode( $atts = array() ) {
if( ! function_exists( 'ea_share' ) )
return;
$atts = shortcode_atts( array( 'location' => 'inpost', 'style' => false ), $atts, 'ea_share_count' );
return ea_share()->front->display( esc_attr( $atts['location'] ), false, esc_attr( $atts['style'] ) );
}
add_shortcode( 'ea_share_count', 'be_easc_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment