<?php

$active_shortcode = isset($_REQUEST['code']) ? $_REQUEST['code'] : 'easy-social-share';
$scg = new ESSBShortcodeGenerator3();
$scg->activate($active_shortcode);
?>



		<div class="essb-shortcode-container essb-shortcode-select">
			<div class="essb-shortcode-title" style="margin-top: 20px;">Choose shortcode</div>
			<a href="<?php 
echo esc_url(add_query_arg('code', 'easy-social-share', 'admin.php?page=essb_redirect_shortcode&tab=shortcode'));
?>
" class="essb-shortcode essb-shortcode-fixed">[easy-social-share]<br/><span class="essb-shortcode-comment">Shortcode to display social share buttons</span></a>
			<a href="<?php 
echo esc_url(add_query_arg('code', 'easy-social-share-popup', 'admin.php?page=essb_redirect_shortcode&tab=shortcode'));
?>
" class="essb-shortcode essb-shortcode-fixed">[easy-social-share-popup]<br/><span class="essb-shortcode-comment">Shortcode to display buttons into popup</span></a>
			<a href="<?php 
echo esc_url(add_query_arg('code', 'easy-social-share-flyin', 'admin.php?page=essb_redirect_shortcode&tab=shortcode'));
?>
" class="essb-shortcode essb-shortcode-fixed">[easy-social-share-flyin]<br/><span class="essb-shortcode-comment">Shortcode to display buttons into flyin</span></a>
			<a href="<?php 
echo esc_url(add_query_arg('code', 'easy-social-like', 'admin.php?page=essb_redirect_shortcode&tab=shortcode'));
?>
" class="essb-shortcode essb-shortcode-fixed">[easy-social-like]<br/><span class="essb-shortcode-comment">Shortcode to display native social buttons</span></a>
			<a href="<?php 
echo esc_url(add_query_arg('code', 'easy-total-shares', 'admin.php?page=essb_redirect_shortcode&tab=shortcode'));
?>
" class="essb-shortcode essb-shortcode-fixed">[easy-total-shares]<br/><span class="essb-shortcode-comment">Shortcode to display total shares</span></a>
<?php

// check for Visual Composer Added and Activated
if (!function_exists('vc_map')) {
    return;
}
// using shortcode generator options for better shortcode mapping
if (!class_exists('ESSBShortcodeGenerator3')) {
    include_once ESSB3_PLUGIN_ROOT . 'lib/admin/essb-shortcode-generator.php';
}
global $essb_options, $essb_networks;
// creating instance of Shortcode Generator
$scg = new ESSBShortcodeGenerator3();
$listOfMappedShortcodes = array("easy-social-share" => array("name" => "Social share buttons", "description" => "Display social share buttons"), "easy-social-share-popup" => array("name" => "Popup social share buttons", "description" => "Display social share buttons as popup"), "easy-social-share-flyin" => array("name" => "Flyin social share buttons", "description" => "Display social share buttons as flyin"), "easy-social-like" => array("name" => "Native Like, Follow & Subscribe buttons", "description" => "Display native buttons"), "easy-total-shares" => array("name" => "Total social shares", "description" => "Display total social shares"), "easy-profiles" => array("name" => "Social profiles", "description" => "Display links to social profiles"), "easy-followers" => array("name" => "Social followers counter", "description" => "Display social followers counter"), "easy-total-followers" => array("name" => "Total social followers counter", "description" => "Display number of total social followers"));
if (defined('ESSB3_SFCE_VERSION')) {
    $listOfMappedShortcodes['easy-multifans'] = array("name" => "Social followers counter (extended)", "description" => "Display extended social followers counter");
}
$vc_shortcode_settings = array();
foreach ($listOfMappedShortcodes as $shortcode => $data) {
    $scg->activate($shortcode);
    $last_used_group = $data['name'];
    $vc_shortcode_settings[$shortcode] = array();
    $exist_network_names = false;
    $exist_sections = false;
    foreach ($scg->shortcodeOptions as $param => $settings) {
        $type = isset($settings['type']) ? $settings['type'] : 'textbox';
        $text = isset($settings['text']) ? $settings['text'] : '';
        if ($type == "section" && !empty($text)) {
            $exist_sections = true;
        }
    }