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
- Introduced in Jetpack 3.8.0
How to use this hook
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' );