Esempio n. 1
0
    function widget($args, $instance)
    {
        extract($args);
        //if show via widget is checked
        $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
        $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
        $sfsi_plus_show_via_widget = $sfsi_plus_section8_options['sfsi_plus_show_via_widget'];
        if ($sfsi_plus_show_via_widget == "yes") {
            /*Our variables from the widget settings. */
            $title = apply_filters('widget_title', $instance['title']);
            $show_info = isset($instance['show_info']) ? $instance['show_info'] : false;
            global $is_floter;
            echo $before_widget;
            /* Display the widget title */
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>
				<div class="sfsi_plus_widget" data-position="widget">   
					<div id='sfsi_plus_wDiv'></div>
						<?php 
            /* Link the main icons function */
            echo sfsi_plus_check_visiblity(0);
            ?>
                    <div style="clear: both;"></div>
				</div>
				<?php 
            if (is_active_widget(false, false, $this->id_base, true)) {
            }
            echo $after_widget;
        } else {
            //echo 'Kindly go to setting page and check the option "show them via a widget"';
        }
    }
function DISPLAY_ULTIMATE_PLUS($args = null, $content = null)
{
    $instance = array("showf" => 1, "title" => '');
    $sfsi_plus_section8_options = get_option("sfsi_plus_section8_options");
    $sfsi_plus_section8_options = unserialize($sfsi_plus_section8_options);
    $sfsi_plus_place_item_manually = $sfsi_plus_section8_options['sfsi_plus_place_item_manually'];
    if ($sfsi_plus_place_item_manually == "yes") {
        $return = '';
        if (!isset($before_widget)) {
            $before_widget = '';
        }
        if (!isset($after_widget)) {
            $after_widget = '';
        }
        /*Our variables from the widget settings. */
        $title = apply_filters('widget_title', $instance['title']);
        $show_info = isset($instance['show_info']) ? $instance['show_info'] : false;
        global $is_floter;
        $return .= $before_widget;
        /* Display the widget title */
        if ($title) {
            $return .= $before_title . $title . $after_title;
        }
        $return .= '<div class="sfsi_plus_widget">';
        $return .= '<div id="sfsi_plus_wDiv"></div>';
        /* Link the main icons function */
        $return .= sfsi_plus_check_visiblity(0);
        $return .= '<div style="clear: both;"></div>';
        $return .= '</div>';
        $return .= $after_widget;
        return $return;
    } else {
        return 'Kindly go to setting page and check the option "Place them manually"';
    }
}
function sfsi_plus_frontFloter($content)
{
    $sfsi_section8 = unserialize(get_option('sfsi_plus_section8_options', false));
    $sfsi_section8['sfsi_plus_float_on_page'];
    if ($sfsi_section8['sfsi_plus_float_on_page'] == "yes") {
        ob_start();
        /* call the all icons function under sfsi_plus_widget.php file */
        echo sfsi_plus_check_visiblity(1);
        echo $output = ob_get_clean();
        $res = $content . $output;
        return $res;
        exit;
    }
}