filter

jetpack_social_media_icons_widget_array

Fires at the end of the list of Social Media accounts. Can be used to add a new Social Media Site to the Social Media Icons Widget. The filter function passed the array of HTML entries that will be sorted by key, each wrapped in a list item element and output as an unsorted list.

Parameters

$html
array

Associative array of HTML snippets per each icon.

Changelog

How to use this hook

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

Notes

Here is an example of how to use this filter to add a new icon, for a LinkedIn company page:
function jetpackme_linkedin_company_icon( $html_array ) {
    return
        $html_array +
        array(
            25 =>    // This key can be modified to change the order the new item will appear in the list
                '<a title="Automattic" '
                . 'href="https://www.linkedin.com/company/automattic" '
                . 'class="genericon genericon-linkedin" target="_blank">'
                . '<span class="screen-reader-text">Automattic Company Profile</span></a>'
        );
}
add_filter( 'jetpack_social_media_icons_widget_array', 'jetpackme_linkedin_company_icon' );