-
-
Save billerickson/8baa8cd8b211d1e0ec161756708b0d81 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 | |
/** | |
* Share Recipe Shortcode | |
* | |
*/ | |
function ea_share_recipe_shortcode() { | |
if( ! function_exists( 'shared_counts' ) ) | |
return; | |
$output = '<aside class="inpost-share-recipe">'; | |
$output .= '<h2>Like this recipe? Share it!</h2>'; | |
$output .= '<p>'; | |
$output .= shared_counts()->front->link( 'pinterest', false, false, 'button' ); | |
$output .= shared_counts()->front->link( 'facebook_shares', false, false, 'button' ); | |
$output .= shared_counts()->front->link( 'email', false, false, 'button' ); | |
$output .= '</p></aside>'; | |
return $output; | |
} | |
add_shortcode( 'share_recipe', 'ea_share_recipe_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment