Esempio n. 1
0
function wpsr_floatingbts_output()
{
    $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
    if (wpsr_floatingbts_check()) {
        echo do_shortcode(wpsr_process_floatingbts());
    }
}
Esempio n. 2
0
function wpsr_button_used($name)
{
    $temp_data = '';
    $button_codes = array('facebook' => array('{facebook-like}', '{facebook-send}', '[wpsr_facebook'), 'retweet' => array('{retweet-bt}', '[wpsr_retweet'), 'digg' => array('{digg-bt}', '[wpsr_digg'), 'addthis' => array("{addthis-bt}", "{addthis-tb-16px}", "{addthis-tb-32px}", "{addthis-sc}"), 'sharethis' => array("{sharethis-large}", "{sharethis-hcount}", "{sharethis-vcount}", "{sharethis-regular}", "{sharethis-regular2}", "{sharethis-bt}", "{sharethis-classic}"), 'plusone' => array('{plusone-small}', '{plusone-medium}', '{plusone-standard}', '{plusone-tall}', '[wpsr_plusone'), 'linkedin' => array('{linkedin-standard}', '{linkedin-right}', '{linkedin-top}', '[wpsr_linkedin'), 'stumbleupon' => array('{stumbleupon-1}', '{stumbleupon-2}', '{stumbleupon-3}', '{stumbleupon-5}', '[wpsr_stumbleupon'), 'pinterest' => array('{pinterest-nocount}', '{pinterest-horizontal}', '{pinterest-vertical}', '[wpsr_pinterest'));
    $templates = get_option('wpsr_templates');
    foreach ($templates as $k => $v) {
        $wpsr_template[$k] = get_option('wpsr_template' . $k . '_data');
        $temp_data .= $wpsr_template[$k]['content'];
    }
    $temp_data .= wpsr_process_floatingbts();
    $is_bt_used = wpsr_helper_strposa($temp_data, $button_codes[$name]);
    if ($is_bt_used === false) {
        return 0;
    } else {
        return 1;
    }
}