filter

jetpack_sharing_facebook_official_button_output

Filter the output of the Facebook Sharing button.

Parameters

$fb_share_html
string

Facebook Sharing button HTML.

$share_url
string

URL of the post to share.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

Notes

You can use that filter to change the output of the official Facebook Sharing button. For example, to use a “Like” action instead of “Share”, you can do the following:
function jeherve_custom_fb_button( $fb_share_html, $share_url ) {
        $custom_fb_button = '<div class="fb-like" data-href="' . $share_url . '" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>';
        return $custom_fb_button;
}
add_filter( 'jetpack_sharing_facebook_official_button_output', 'jeherve_custom_fb_button', 10, 2 );