Created
February 4, 2020 07:25
-
-
Save thecodepoetry/6a71e75e30b553d9444bf9deec44cdff to your computer and use it in GitHub Desktop.
Add new share buttons
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
function new_share_email($share_buttons, $place, $post_id, $buttons){ | |
$url = get_permalink( $post_id ); | |
$title = isset( $_post->post_title ) ? $_post->post_title : ''; | |
$share_buttons[] = array( | |
'id' => 'email' , | |
'url' => 'mailto:?subject=I wanted you to see this site&body=' . $title . ' ' . $url, | |
'name' => 'Email', | |
'title' => 'Share on Facebook', | |
'alt_title' => 'Share on Facebook', | |
'icon_class' => 'email' , | |
'custom_atts' => '', | |
); | |
return $share_buttons; | |
} | |
add_filter("the7_get_share_buttons_list", "new_share_email", 10, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then you will have to add necessary CSS to style the button, it will be something like this