Example #1
0
function thinkup_input_socialmediafooter()
{
    global $thinkup_header_socialswitchfooter;
    global $thinkup_header_socialmessage;
    global $thinkup_header_facebookswitch;
    global $thinkup_header_facebooklink;
    global $thinkup_header_twitterswitch;
    global $thinkup_header_twitterlink;
    global $thinkup_header_googleswitch;
    global $thinkup_header_googlelink;
    global $thinkup_header_linkedinswitch;
    global $thinkup_header_linkedinlink;
    global $thinkup_header_flickrswitch;
    global $thinkup_header_flickrlink;
    global $thinkup_header_youtubeswitch;
    global $thinkup_header_youtubelink;
    global $thinkup_header_rssswitch;
    global $thinkup_header_rsslink;
    // Reset count values used in foreach loop
    $i = 0;
    $j = 0;
    if ($thinkup_header_socialswitchfooter == '1') {
        // Assign social media link to an array
        $social_links = array(array('social' => 'Facebook', 'icon' => 'facebook', 'toggle' => $thinkup_header_facebookswitch, 'link' => $thinkup_header_facebooklink), array('social' => 'Twitter', 'icon' => 'twitter', 'toggle' => $thinkup_header_twitterswitch, 'link' => $thinkup_header_twitterlink), array('social' => 'Google+', 'icon' => 'google-plus', 'toggle' => $thinkup_header_googleswitch, 'link' => $thinkup_header_googlelink), array('social' => 'LinkedIn', 'icon' => 'linkedin', 'toggle' => $thinkup_header_linkedinswitch, 'link' => $thinkup_header_linkedinlink), array('social' => 'Flickr', 'icon' => 'flickr', 'toggle' => $thinkup_header_flickrswitch, 'link' => $thinkup_header_flickrlink), array('social' => 'YouTube', 'icon' => 'youtube', 'toggle' => $thinkup_header_youtubeswitch, 'link' => $thinkup_header_youtubelink), array('social' => 'RSS', 'icon' => 'rss', 'toggle' => $thinkup_header_rssswitch, 'link' => $thinkup_header_rsslink));
        // Output social media links if any link is set
        foreach ($social_links as $social) {
            if (!empty($social['link']) and $j == 0) {
                echo '<div id="post-footer-social"><ul>';
                $j = 1;
                if (!empty($thinkup_header_socialmessage)) {
                    echo '<li class="social message">' . thinkup_input_socialmessage() . '</li>';
                }
            }
            if (!empty($social['link']) and $social['toggle'] == '1') {
                echo '<li class="social ' . $social['icon'] . '">', '<a href="' . $social['link'] . '" data-tip="top" data-original-title="' . $social['social'] . '" target="_blank">', '<i class="fa fa-' . $social['icon'] . '"></i>', '</a>', '</li>';
            }
        }
        // Close list output of social media links if any link is set
        if ($j !== 0) {
            echo '</ul></div>';
        }
    }
}
function thinkup_input_socialmediaheadermain()
{
    global $thinkup_header_socialswitchmain;
    global $thinkup_header_socialmessage;
    global $thinkup_header_facebookswitch;
    global $thinkup_header_facebooklink;
    global $thinkup_header_twitterswitch;
    global $thinkup_header_twitterlink;
    global $thinkup_header_googleswitch;
    global $thinkup_header_googlelink;
    global $thinkup_header_linkedinswitch;
    global $thinkup_header_linkedinlink;
    global $thinkup_header_flickrswitch;
    global $thinkup_header_flickrlink;
    global $thinkup_header_pinterestswitch;
    global $thinkup_header_pinterestlink;
    global $thinkup_header_youtubeswitch;
    global $thinkup_header_youtubelink;
    global $thinkup_header_rssswitch;
    global $thinkup_header_rsslink;
    // Reset count values used in foreach loop
    $i = 0;
    $j = 0;
    $output = NULL;
    if ($thinkup_header_socialswitchmain == '1') {
        // Assign social media link to an array
        $social_links = array(array('social' => 'Facebook', 'icon' => 'facebook', 'toggle' => $thinkup_header_facebookswitch, 'link' => $thinkup_header_facebooklink), array('social' => 'Twitter', 'icon' => 'twitter', 'toggle' => $thinkup_header_twitterswitch, 'link' => $thinkup_header_twitterlink), array('social' => 'Google+', 'icon' => 'google-plus', 'toggle' => $thinkup_header_googleswitch, 'link' => $thinkup_header_googlelink), array('social' => 'LinkedIn', 'icon' => 'linkedin', 'toggle' => $thinkup_header_linkedinswitch, 'link' => $thinkup_header_linkedinlink), array('social' => 'Flickr', 'icon' => 'flickr', 'toggle' => $thinkup_header_flickrswitch, 'link' => $thinkup_header_flickrlink), array('social' => 'Pinterest', 'icon' => 'pinterest', 'toggle' => $thinkup_header_pinterestswitch, 'link' => $thinkup_header_pinterestlink), array('social' => 'YouTube', 'icon' => 'youtube', 'toggle' => $thinkup_header_youtubeswitch, 'link' => $thinkup_header_youtubelink), array('social' => 'RSS', 'icon' => 'rss', 'toggle' => $thinkup_header_rssswitch, 'link' => $thinkup_header_rsslink));
        // Output social media links if any link is set
        foreach ($social_links as $social) {
            if (!empty($social['link']) and $j == 0) {
                $output .= '<div id="header-social"><ul>';
                $j = 1;
                if (!empty($thinkup_header_socialmessage)) {
                    $output .= '<li class="social message">' . thinkup_input_socialmessage() . '</li>';
                }
            }
            if (!empty($social['link']) and $social['toggle'] == '1') {
                $output .= '<li class="social ' . esc_attr($social['icon']) . '">';
                $output .= '<a href="' . esc_url($social['link']) . '" data-tip="bottom" data-original-title="' . esc_attr($social['social']) . '">';
                $output .= '<i class="fa fa-' . esc_attr($social['icon']) . '"></i>';
                $output .= '</a>';
                $output .= '</li>';
            }
        }
        // Close list output of social media links if any link is set
        if ($j !== 0) {
            $output .= '</ul></div>';
        }
    }
    if (!empty($output)) {
        return $output;
    } else {
        return false;
    }
}
Example #3
0
function thinkup_input_socialmedia()
{
    global $thinkup_header_socialswitch;
    global $thinkup_header_socialmessage;
    global $thinkup_header_facebookswitch;
    global $thinkup_header_facebooklink;
    global $thinkup_header_twitterswitch;
    global $thinkup_header_twitterlink;
    global $thinkup_header_googleswitch;
    global $thinkup_header_googlelink;
    global $thinkup_header_linkedinswitch;
    global $thinkup_header_linkedinlink;
    global $thinkup_header_flickrswitch;
    global $thinkup_header_flickrlink;
    global $thinkup_header_lastfmswitch;
    global $thinkup_header_lastfmlink;
    global $thinkup_header_rssswitch;
    global $thinkup_header_rsslink;
    if ($thinkup_header_socialswitch == '1') {
        echo '<div id="pre-header-social"><ul>';
        if (!empty($thinkup_header_socialmessage)) {
            echo '<li class="social message">' . thinkup_input_socialmessage() . '</li>';
        }
        // Facebook settings
        if ($thinkup_header_facebookswitch == '1') {
            echo '<li class="social facebook"><a href="' . $thinkup_header_facebooklink . '" data-tip="bottom" data-original-title="Facebook"></a></li>';
        }
        // Twitter settings
        if ($thinkup_header_twitterswitch == '1') {
            echo '<li class="social twitter"><a href="' . $thinkup_header_twitterlink . '" data-tip="bottom" data-original-title="Twitter"></a></li>';
        }
        // Google+ settings
        if ($thinkup_header_googleswitch == '1') {
            echo '<li class="social google"><a href="' . $thinkup_header_googlelink . '" data-tip="bottom" data-original-title="Google+"></a></li>';
        }
        // LinkedIn settings
        if ($thinkup_header_linkedinswitch == '1') {
            echo '<li class="social linkedin"><a href="' . $thinkup_header_linkedinlink . '" data-tip="bottom" data-original-title="LinkedIn"></a></li>';
        }
        // Flickr settings
        if ($thinkup_header_flickrswitch == '1') {
            echo '<li class="social flickr"><a href="' . $thinkup_header_flickrlink . '" data-tip="bottom" data-original-title="Flickr"></a></li>';
        }
        // Last FM settings
        if ($thinkup_header_lastfmswitch == '1') {
            echo '<li class="social lastfm"><a href="' . $thinkup_header_lastfmlink . '" data-tip="bottom" data-original-title="Last FM"></a></li>';
        }
        // RSS settings
        if ($thinkup_header_rssswitch == '1') {
            echo '<li class="social rss"><a href="' . $thinkup_header_rsslink . '" data-tip="bottom" data-original-title="RSS"></a></li>';
        }
        echo '</ul></div>';
    }
}
Example #4
0
function thinkup_input_socialmedia()
{
    global $thinkup_header_socialswitch;
    global $thinkup_header_socialmessage;
    global $thinkup_header_facebookswitch;
    global $thinkup_header_facebooklink;
    global $thinkup_header_twitterswitch;
    global $thinkup_header_twitterlink;
    global $thinkup_header_weiboswitch;
    global $thinkup_header_weibolink;
    global $thinkup_header_googleswitch;
    global $thinkup_header_googlelink;
    global $thinkup_header_linkedinswitch;
    global $thinkup_header_linkedinlink;
    global $thinkup_header_flickrswitch;
    global $thinkup_header_flickrlink;
    global $thinkup_header_youtubeswitch;
    global $thinkup_header_youtubelink;
    global $thinkup_header_rssswitch;
    global $thinkup_header_rsslink;
    if ($thinkup_header_socialswitch == '1') {
        echo '<div id="pre-header-social"><ul>';
        if (!empty($thinkup_header_socialmessage)) {
            echo '<li class="social message">' . thinkup_input_socialmessage() . '</li>';
        }
        /* Facebook settings */
        if ($thinkup_header_facebookswitch == '1') {
            echo '<li class="social facebook"><a href="' . esc_url($thinkup_header_facebooklink) . '" data-tip="bottom" data-original-title="Facebook">', '<i class="icon-facebook"></i>', '</a></li>';
        }
        /* Twitter settings */
        if ($thinkup_header_twitterswitch == '1') {
            echo '<li class="social twitter"><a href="' . esc_url($thinkup_header_twitterlink) . '" data-tip="bottom" data-original-title="Twitter">', '<i class="icon-twitter"></i>', '</a></li>';
        }
        /* Weibo settings */
        if ($thinkup_header_weiboswitch == '1') {
            echo '<li class="social weibo"><a href="' . esc_url($thinkup_header_weibolink) . '" data-tip="bottom" data-original-title="微博">', '<i class="icon-weibo"></i>', '</a></li>';
        }
        /* Google+ settings */
        if ($thinkup_header_googleswitch == '1') {
            echo '<li class="social google"><a href="' . esc_url($thinkup_header_googlelink) . '" data-tip="bottom" data-original-title="Google+">', '<i class="icon-google-plus"></i>', '</a></li>';
        }
        /* LinkedIn settings */
        if ($thinkup_header_linkedinswitch == '1') {
            echo '<li class="social linkedin"><a href="' . esc_url($thinkup_header_linkedinlink) . '" data-tip="bottom" data-original-title="LinkedIn">', '<i class="icon-linkedin"></i>', '</a></li>';
        }
        /* Flickr settings */
        if ($thinkup_header_flickrswitch == '1') {
            echo '<li class="social flickr"><a href="' . esc_url($thinkup_header_flickrlink) . '" data-tip="bottom" data-original-title="Flickr">', '<i class="icon-flickr"></i>', '</a></li>';
        }
        /* YouTube settings */
        if ($thinkup_header_youtubeswitch == '1') {
            echo '<li class="social youtube"><a href="' . esc_url($thinkup_header_youtubelink) . '" data-tip="bottom" data-original-title="YouTube">', '<i class="icon-youtube-play"></i>', '</a></li>';
        }
        /* RSS settings */
        if ($thinkup_header_rssswitch == '1') {
            echo '<li class="social rss"><a href="' . esc_url($thinkup_header_rsslink) . '" data-tip="bottom" data-original-title="RSS">', '<i class="icon-rss"></i>', '</a></li>';
        }
        echo '</ul></div>';
    }
}