<?php
/**
 * @author  Rainbow-Themes
 * @since   1.0
 * @version 1.0
 * @package histudy
 */
 
trait rainbowsocialTrait
{

    public static function rainbow_socials()
    {
        $rainbow_get_options = self::rainbow_get_options();
        $rainbow_social_attributes = $rainbow_get_options['histudy_social_icons'];
        $rainbow_socials = array(
            'social_facebook' => array(
                'icon' => 'feather-facebook',
                'url' => isset($rainbow_social_attributes['facebook-f']) ? $rainbow_social_attributes['facebook-f'] : '',
                'title' => __('Facebook', 'histudy'),
            ),
            'social_twitter' => array(
                'icon' => 'feather-twitter',
                'url' => isset($rainbow_social_attributes['twitter']) ? $rainbow_social_attributes['twitter'] : '',
                'title' => __('Twitter', 'histudy'),
            ),
            'social_linkedin' => array(
                'icon' => 'feather-linkedin',
                'url' => isset($rainbow_social_attributes['linkedin-in']) ? $rainbow_social_attributes['linkedin-in'] : '',
                'title' => __('Linkedin', 'histudy'),
            ),
            'social_youtube' => array(
                'icon' => 'feather-youtube',
                'url' => isset($rainbow_social_attributes['youtube']) ? $rainbow_social_attributes['youtube'] : '',
                'title' => __('Youtube', 'histudy'),
            ),
            'social_instagram' => array(
                'icon' => 'feather-instagram',
                'url' => isset($rainbow_social_attributes['instagram']) ? $rainbow_social_attributes['instagram'] : '',
                'title' => __('Instagram', 'histudy'),
            ),
            'social_tiktok' => array(
                'icon' => 'fab fa-tiktok',
                'url' => isset($rainbow_social_attributes['tiktok']) ? $rainbow_social_attributes['tiktok'] : '',
                'title' => __('Tiktok', 'histudy'),
            ),
            'social_snapchat' => array(
                'icon' => 'fab fa-snapchat',
                'url' => isset($rainbow_social_attributes['snapchat-ghost']) ? $rainbow_social_attributes['snapchat-ghost'] : '',
                'title' => __('Snapchat', 'histudy'),
            ),
            'social_whatsapp' => array(
                'icon' => 'fab fa-whatsapp',
                'url' => isset($rainbow_social_attributes['whatsapp']) ? $rainbow_social_attributes['whatsapp'] : '',
                'title' => __('WhatsApp', 'histudy'),
            ),
            'social_pinterest' => array(
                'icon' => 'fab fa-pinterest',
                'url' => isset($rainbow_social_attributes['pinterest-p']) ? $rainbow_social_attributes['pinterest-p'] : '',
                'title' => __('Pinterest', 'histudy'),
            ),
            'social_reddit' => array(
                'icon' => 'fab fa-reddit',
                'url' => isset($rainbow_social_attributes['reddit-alien']) ? $rainbow_social_attributes['reddit-alien'] : '',
                'title' => __('Reddit', 'histudy'),
            ),
            'social_vimeo' => array(
                'icon' => 'fab fa-vimeo',
                'url' => isset($rainbow_social_attributes['vimeo-v']) ? $rainbow_social_attributes['vimeo-v'] : '',
                'title' => __('Vimeo', 'histudy'),
            ),
            'social_qq' => array(
                'icon' => 'fab fa-qq',
                'url' => isset($rainbow_social_attributes['qq']) ? $rainbow_social_attributes['qq'] : '',
                'title' => __('QQ', 'histudy'),
            ),
            'social_skype' => array(
                'icon' => 'fab fa-skype',
                'url' => isset($rainbow_social_attributes['skype']) ? $rainbow_social_attributes['skype'] : '',
                'title' => __('Skype', 'histudy'),
            ),
            'social_wordpress' => array(
                'icon' => 'fab fa-wordpress',
                'url' => isset($rainbow_social_attributes['wordpress']) ? $rainbow_social_attributes['wordpress'] : '',
                'title' => __('WordPress', 'histudy'),
            ),
            'social_discord' => array(
                'icon' => 'fab fa-discord',
                'url' => isset($rainbow_social_attributes['discord']) ? $rainbow_social_attributes['discord'] : '',
                'title' => __('Discord', 'histudy'),
            ),
            'social_stack_overflow' => array(
                'icon' => 'fab fa-stack-overflow',
                'url' => isset($rainbow_social_attributes['stack-overflow']) ? $rainbow_social_attributes['stack-overflow'] : '',
                'title' => __('Stack Overflow', 'histudy'),
            ),
            'social_stack_dribbble' => array(
                'icon' => 'fab fa-dribbble',
                'url' => isset($rainbow_social_attributes['dribbble']) ? $rainbow_social_attributes['dribbble'] : '',
                'title' => __('Dribbble', 'histudy'),
            ),
            'social_stack_behance' => array(
                'icon' => 'fab fa-behance',
                'url' => isset($rainbow_social_attributes['behance']) ? $rainbow_social_attributes['behance'] : '',
                'title' => __('Behance', 'histudy'),
            ),
            'social_telegram' => array(
                'icon' => 'rbt feather-send',
                'url' => isset($rainbow_social_attributes['telegram-plane']) ? $rainbow_social_attributes['telegram-plane'] : '',
                'title' => __('Telegram', 'histudy'),
            ),

            

            
        );
        
        return array_filter($rainbow_socials, array(__CLASS__, 'rainbow_filter_social'));
    }
    public static function rainbow_filter_social($args)
    {
        return ($args['url'] != '');
    }
}
