Documentation

Team Social Icons

Description

Filters the list of social icons displayed for a team. Social icons should be Font-Awesome 5 icons. When a user enters a value for a corresponding social icon, it appears in the team's list and that team's profile page.

Usage

function my_team_social_icon_fields( $social_fields ) {
    # ....
}
add_filter( 'trn_team_social_icon_fields', 'my_team_social_icon_fields' );

Parameters

social_fields
(array)(required) Associative array of icons to display.

Examples

The following sample code adds a Discord social icon to team profiles. Check out our How to Extend a Plugin in WordPress with a Filter Hook blog post for helping extending this example.

function my_team_social_icon_fields( $social_fields) {
    $data = array(
        'discord' => array(
            'display_name' => 'Discord',
            'input_type' => 'text',
            'icon' => 'fab fa-discord',
        ),
    );

    return array_merge( $social_fields, $data );
}
add_filter( 'trn_team_social_icon_fields', 'my_team_social_icon_fields' );

Changelog

Version Description
3.22.0 Introduced