Exemplo n.º 1
0
function clickdesk_widget_add_scripts()
{
    $cdwidgetid = livily_livechat_get_options();
    // If null
    if (strlen($cdwidgetid) == 0) {
        return;
    }
    wp_enqueue_script('push2call_script_client', plugins_url('/js/widget.js', __FILE__), array('jquery'), '1.0.1', true);
    ?>
	<!-- Start of InVox.com Widget -->
	<script  type="text/javascript">
	
	var _glc =_glc || [];
	_glc.push('<?php 
    echo $cdwidgetid;
    ?>
');
	</script>
	<!-- End of InVox.com Widget -->
  
<?php 
}
Exemplo n.º 2
0
function clickdesk_webchat_dashboard()
{
    // Get widgetid from url
    $cdwidgetid = livily_livechat_get_options();
    // Check configuration of ClickDesk
    if (!isset($cdwidgetid) || empty($cdwidgetid)) {
        // Show error page for configure
        include 'cd-authentication.php';
        return;
    }
    // Get blog url
    $Path = livily_get_blog_url();
    // Pass this as query param to webchat-plugins page
    $webchatURL = isset($cdwidgetid) && !empty($cdwidgetid) ? $cdwidgetid : "";
    $webchatURL = LIVILY_WEBCHAT_PANEL_URL . $Path . "&widgetid=" . $webchatURL;
    // Add iframe for webchat
    echo '<div id="webchatdashboarddiv"><iframe id="webchatdashboardiframe" src=' . $webchatURL . '' . ' height=800 width=100% scrolling="yes"></iframe></div>';
}