action

jetpack_sharing_display_title

Filter the sharing display title.

Parameters

$title
string

Sharing service title.

$id
(string | false)

Sharing ID.

$args
array

Array of sharing service options.

$this
object

Sharing service properties.

Changelog

How to use this hook

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

Notes

You can use this filter to change the title parameter of the links for each one of the sharing buttons. Here is how you could use that filter to change the sharing title depending on the sharing service:
/*
 * Customize the sharing title.
 *
 * @param string $text Sharing service title.
 * @param object $sharing_obj Sharing service properties.
 * @param int|false $id Sharing ID.
 * @param array $args Array of sharing service options.
 */
function jetpack_developer_custom_sharing_text( $text, $sharing_obj, $id, $args ) {
        if ( ! empty( $args[1] ) ) {
                switch ( $args[1] ) {
                        case 'Email' :
                                return esc_html__( 'Email', 'jetpack' );
                        case 'Facebook' :
                                return esc_html__( 'Share', 'jetpack' );
                        case 'Twitter' :
                                return esc_html__( 'Tweet', 'jetpack' );
                }
        }
}
add_filter( 'jetpack_sharing_display_title', 'jetpack_developer_custom_sharing_text', 20, 4 );