jetpack_social_media_icons_widget_array

Fires at the end of the list of Social Media accounts.

Description

apply_filters( 'jetpack_social_media_icons_widget_array', (array) $html ); 

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 (1)

0. $html (array)
Associative array of HTML snippets per each icon.

Usage

To run the hook, copy the example below.
  1. $html = apply_filters( 'jetpack_social_media_icons_widget_array', $html ); 
  2.  
  3. if ( !empty( $html ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_social_media_icons_widget_array callback 
  2. function filter_jetpack_social_media_icons_widget_array( $html ) { 
  3. // make filter magic happen here... 
  4. return $html
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_social_media_icons_widget_array', 'filter_jetpack_social_media_icons_widget_array', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_social_media_icons_widget_array', 'filter_jetpack_social_media_icons_widget_array', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/modules/widgets/social-media-icons.php  
  1. $html = apply_filters( 'jetpack_social_media_icons_widget_array', $html );