Created
May 30, 2018 05:41
-
-
Save Steeru/cccabd0fbd8bd04e74051ff01b31d9c2 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
/** | |
* [travel_log_social_share_meta Diusplay the Social share Blog Meta] | |
* | |
* @since 1.0.0 | |
*/ | |
function travel_log_social_share_meta() { | |
$social_share_disable = travel_log_get_theme_option( 'travel_log_social_share_disable' ); | |
$fb_enable = travel_log_get_theme_option( 'sharer_fb_enable' ); | |
$twitter_enable = travel_log_get_theme_option( 'sharer_twitter_enable' ); | |
$gplus_enable = travel_log_get_theme_option( 'sharer_gplus_enable' ); | |
if ( true === $social_share_disable ) : | |
return; | |
endif; | |
if ( true == $fb_enable || true === $twitter_enable || true === $gplus_enable ) : | |
?> | |
<div class="share-handle card-share"> | |
<div class="social-reveal social-reveal-active"> | |
<?php if ( true === $fb_enable ) : ?> | |
<!--Facebook--> | |
<a type="button" title="Share on Facebook" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>" class="btn-floating btn-fb "><i class="fa fa-facebook"></i></a> | |
<?php endif; ?> | |
<?php if ( true === $twitter_enable ) : ?> | |
<!--Twitter--> | |
<a type="button" title="Share on Twitter" target="_blank" href="https://twitter.com/share?url=<?php the_permalink(); ?>&text=<?php the_title(); ?>" class="btn-floating btn-tw "><i class="fa fa-twitter"></i></a> | |
<?php endif; ?> | |
<?php if ( true === $gplus_enable ) : ?> | |
<!--Google --> | |
<a type="button" title="Share on Google Plus" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>" class="btn-floating btn-gplus "><i class="fa fa-google-plus"></i></a> | |
<?php endif; ?> | |
</div> | |
<a class="btn-floating share-toggle float-right"><i class="fa fa-share-alt"></i></a> | |
</div> | |
<?php | |
endif; | |
} | |
add_action( 'travel_log_social_share', 'travel_log_social_share_meta' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment