Snippets: Add New Social Options to Top Bar & VC Social Module

The Total theme has various functions for displaying social links on the site. While there are filters included for each (author social, social widget, top bar, VC module...etc) in Total 4.4 we've added a new global filter named "wpex_social_profile_options_list'. Currently this filter only targets the Top Bar and social VC widget. In the future this option may also be used for other parts of the theme such as the Social widget, currently it's not because it will require some updating on the user's end or a fallback functionality.

add_filter( 'wpex_social_profile_options_list', function( $array ) {
	$array['spotify'] = array(
		'label' => 'Spotify',
		'icon_class' => 'ticon ticon-spotify',
	);
	return $array;
} );

Snippet Type: PHP

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)