function widget($args, $instance)
 {
     extract($args);
     $MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
     $widget_title = empty($instance['widget_title']) ? '' : $instance['widget_title'];
     $followers = $MR_Social_Sharing_Toolkit->create_followers();
     echo $before_widget;
     if ($widget_title != '') {
         echo $before_title . $widget_title . $after_title;
     }
     echo $followers;
     echo $after_widget;
 }
예제 #2
0
                $content = preg_replace("/(^|\\s)+((?:(?<!&))#([a-zA-Z0-9]+^[-|;]))([^|\n|\r|\t|\\s|\\.|\\<|\\&]*)/i", "\$1<a href=\"http://twitter.com/search/\$3\">\$2</a>\$4", $content);
            }
        }
        return $content;
    }
}
require 'includes/class.button.php';
$buttons = glob(dirname(__FILE__) . '/includes/buttons/button.*.php');
if (is_array($buttons) && count($buttons) > 0) {
    foreach ($buttons as $button) {
        include str_replace(dirname(__FILE__) . '/', '', $button);
    }
}
unset($buttons);
//global $MR_Social_Sharing_Toolkit;
$MR_Social_Sharing_Toolkit = new MR_Social_Sharing_Toolkit();
add_action('admin_menu', array($MR_Social_Sharing_Toolkit, 'plugin_menu'));
if ($MR_Social_Sharing_Toolkit->should_print_opengraph()) {
    add_action('wp_head', array($MR_Social_Sharing_Toolkit, 'print_opengraph'), 1);
}
if ($MR_Social_Sharing_Toolkit->should_linkify_content()) {
    add_filter('the_content', array($MR_Social_Sharing_Toolkit, 'linkify'));
}
if ($MR_Social_Sharing_Toolkit->should_linkify_comments()) {
    add_filter('comment_text', array($MR_Social_Sharing_Toolkit, 'linkify'));
}
if ($MR_Social_Sharing_Toolkit->should_share_excerpt()) {
    add_filter('the_excerpt', array($MR_Social_Sharing_Toolkit, 'share_excerpt'));
}
if ($MR_Social_Sharing_Toolkit->should_share_content()) {
    add_filter('the_content', array($MR_Social_Sharing_Toolkit, 'share'));