jetpack_social_media_icons_widget_profile_link

Fires for each profile link in the social icons widget.

Description

apply_filters( 'jetpack_social_media_icons_widget_profile_link', $esc_url, (string) $service ); 

Can be used to change the links for certain social networks if needed.

Parameters (2)

0. $esc_url
The currently processed URL
1. $service (string)
The lowercase service slug, e.g. facebook,, youtube, etc.

Usage

To run the hook, copy the example below.
  1. $esc_url = apply_filters( 'jetpack_social_media_icons_widget_profile_link', $esc_url, $service ); 
  2.  
  3. if ( !empty( $esc_url ) ) { 
  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_profile_link callback 
  2. function filter_jetpack_social_media_icons_widget_profile_link( $esc_url, $service ) { 
  3. // make filter magic happen here... 
  4. return $esc_url
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_social_media_icons_widget_profile_link', 'filter_jetpack_social_media_icons_widget_profile_link', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_social_media_icons_widget_profile_link', 'filter_jetpack_social_media_icons_widget_profile_link', 10, 2 ); 

Defined (1)

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

/modules/widgets/social-media-icons.php  
  1. $link = apply_filters( 'jetpack_social_media_icons_widget_profile_link', esc_url( sprintf( $url, $link_username ) ), $service );