Documentation

Player Social Icons

Description

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

Usage

function my_player_social_icon_fields( $social_fields) {
    # ....
}
add_filter( 'trn_player_social_icon_fields', 'my_player_social_icon_fields' );

Parameters

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

Examples

The following sample code adds a Steam social icon to player profiles.

function my_player_social_icon_fields( $social_fields) {
    $data = array(
        'steam' => array(
            'display_name' => 'Steam',
            'input_type' => 'text',
            'icon' => 'fa fa-steam',
        ),
    );

    return array_merge( $social_fields, $data );
}
add_filter( 'trn_player_social_icon_fields', 'my_player_social_icon_fields' );

Changelog

Version Description
3.16.0 Introduced