Skip to content

Commit

Permalink
Share button fix (#737)
Browse files Browse the repository at this point in the history
* fixed facebook and whatsapp share buttons

Co-authored-by: Alexander Bigga <[email protected]>
  • Loading branch information
dersimoezdag and albig authored Nov 4, 2024
1 parent 46aee93 commit 1d9db90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,16 @@ function sunflower_the_social_media_sharers() {
if ( sunflower_get_setting( 'sunflower_sharer_facebook' ) ) {
$sharer[] = sprintf(
'<a href="https://www.facebook.com/sharer/sharer.php?u=%s" target="_blank" title="%s" class="sharer"><i class="fab fa-facebook-f"></i></a>',
rawurlencode( (string) get_the_title() ),
get_permalink(),
__( 'Share on Facebook ', 'sunflower' )
);
}

if ( sunflower_get_setting( 'sunflower_sharer_whatsapp' ) ) {
$sharer[] = sprintf(
'<a href="https://wa.me/?text=%s" target="_blank" title="%s" class="sharer"><i class="fab fa-whatsapp"></i></a>',
'<a href="https://wa.me/?text=%s %s" target="_blank" title="%s" class="sharer"><i class="fab fa-whatsapp"></i></a>',
rawurlencode( (string) get_the_title() ),
get_permalink(),
__( 'Share on WhatsApp ', 'sunflower' )
);
}
Expand Down

0 comments on commit 1d9db90

Please sign in to comment.