Example #1
0
/**
 * One function for displaying the buttons in theme files
 * Use wp_socializer(the button code or template name) in the theme files to print the 
 * button or the template
 * 
 * Available button codes are given in the variable $wpsr_button_code_list (line 582) without brackets
 * Available template name are 'template1' and 'template2'
 */
function wp_socializer($to_display, $params = "")
{
    switch ($to_display) {
        case 'socialbts':
            return wpsr_socialbts($params);
            break;
        case 'addthis':
            return wpsr_addthis($params);
            break;
        case 'sharethis':
            return wpsr_sharethis($params);
            break;
        case 'retweet':
            return wpsr_retweet($params);
            break;
        case 'digg':
            return wpsr_digg($params);
            break;
        case 'facebook':
            return wpsr_facebook($params);
            break;
        case 'plusone':
            return wpsr_plusone($params);
            break;
        case 'stumbleupon':
            return wpsr_stumbleupon($params);
            break;
        case 'reddit':
            return wpsr_reddit($params);
            break;
        case 'linkedin':
            return wpsr_linkedin($params);
            break;
        case 'pinterest':
            return wpsr_pinterest($params);
            break;
        case 'custom-1':
            return wpsr_custom_bt('custom1');
            break;
        case 'custom-2':
            return wpsr_custom_bt('custom2');
            break;
        case 'template-1':
            return wpsr_process_template('1');
            break;
        case 'template-2':
            return wpsr_process_template('2');
            break;
    }
}
Example #2
0
function wpsr_socialbts_shortcode($atts)
{
    return wpsr_socialbts($atts);
}
function wpsr_socialbts_rss($type)
{
    ## Get Social Button options
    $wpsr_socialbt = get_option('wpsr_socialbt_data');
    $wpsr_socialbt_processed = wpsr_socialbts(array('output' => 'rss', 'target' => $wpsr_socialbt['target'], 'services' => $wpsr_socialbt['selected' . $type]));
    return $wpsr_socialbt_processed;
}