post_excerpt ? get_post( get_post_thumbnail_id() )->post_excerpt : get_post( get_post_thumbnail_id() )->post_title;
?>
';
foreach ( $categories as $category ){
$url = get_category_link( $category->term_id );
echo '
'. esc_html( $category->name ) .'';
}
echo '
';
}
/*
=================================================================================================================
fasto_count_shares() - Count freebie downloads - for ajax
=================================================================================================================
*/
add_action( 'wp_ajax_fasto_count_shares', 'fasto_count_shares' );
add_action( 'wp_ajax_nopriv_fasto_count_shares', 'fasto_count_shares' );
function fasto_count_shares() {
$nonce = $_POST['nonce'];
if ( ! wp_verify_nonce( $nonce, 'fasto_count_shares' ) ){
die ( 'cheatin?');
}
$post_id = sanitize_text_field( $_POST['post_id'] );
$share_counter = get_post_meta( $post_id, 'share-counter', true );
if( !$share_counter ) {
$share_counter = 0;
}
$response = update_post_meta( $post_id, 'share-counter', ++$share_counter );
if( $response ){
die('success');
}
die('fail');
}
/*
=================================================================================================================
fasto_output_social - Output social
=================================================================================================================
*/
function fasto_output_social(){
$socials = array(
'facebook' => 'facebook',
'twitter' => 'twitter',
'youtube' => 'youtube',
'linkedin' => 'linkedin',
'pinterest' => 'pinterest',
'dribbble' => 'dribbble',
'instagram' => 'instagram',
'behance' => 'behance',
);
foreach ( $socials as $key => $value ){
$get_social = get_theme_mod( $key );
if ( !empty( $get_social ) ){
echo '