public function setUp()
 {
     parent::setUp();
     update_option(self::OFFICIAL_OPTION_APPID, self::OFFICIAL_APPID);
     update_option(Push7_Subscribe_Button::PLUGIN_OPTIONS, Push7_Subscribe_Button_Options::create_options(array('appid' => self::OUR_APPID)), true);
     Push7_Subscribe_Button_Options::invalidate_options();
 }
 /**
  * Filter to the_content
  *
  * @param string $content
  *
  * @return string
  * @since 0.0.1-dev
  */
 final function the_content($content)
 {
     global $wp_current_filter;
     if (!is_singular() || in_array('get_the_excerpt', (array) $wp_current_filter)) {
         return $content;
     }
     if (!in_array(get_post_type(), \Push7_Subscribe_Button_Options::get_options()->social_buzz_posttype)) {
         return $content;
     }
     if (is_admin() && !(defined('DOING_AJAX') && DOING_AJAX)) {
         return $content;
     }
     /**
      * Filter button template after content like social-buzz
      *
      * @param string $template
      * @param Base $button
      *
      * @since 0.0.1-dev
      * @global \WP_Post $post
      */
     $content .= apply_filters('push7_sb_sb_template', $this->get_template(), $this);
     return $content;
 }
 public static function invalidate_options()
 {
     self::$options = null;
 }
 /**
  * @since 0.0.1-dev
  * @return string
  */
 public static function get_appid()
 {
     return Push7_Subscribe_Button_Options::get_options()->appid;
 }
 /**
  * @return string
  * @since 0.0.1-dev
  */
 public function get_template()
 {
     return sprintf('<div class="push7-sb-sbz-with-thumb" id="push7-sb-sbz"><div class="push7-sb-sbz-with-thumb-thumbnail"></div><div class="push7-sb-sbz-with-thumb-subscribe">%s</div></div>', sprintf('<p>%s</p><div class="push7ssb-subscribe">%s</div>', \Push7_Subscribe_Button_Options::get_options()->social_buzz_message, \Push7_Subscribe_Button::get_official_button(\Push7_Subscribe_Button::get_appid_inc_official(), 'r')));
 }
    public function render_sbz_message()
    {
        printf('<input type="text" id="push7ssb_sbz_message" class="regular-text" name="%s" value="%s"
		/>', \Push7_Subscribe_Button::PLUGIN_OPTIONS . '[social_buzz_message]', esc_attr(\Push7_Subscribe_Button_Options::get_options()->social_buzz_message));
    }