subscription_title = $title; return $this; } // Hold an instance of the class private static $instance; /** * * @param type $invalid_email * @return \ext_jp_subscribe */ public function setInvalid_email($invalid_email) { $this->invalid_email = $invalid_email; return $this; } /** * * @param type $success_message * @return \ext_jp_subscribe */ public function setSuccess_message($success_message) { $this->success_message = $success_message; return $this; } /** * */ private function __construct() { // loads the handler function add_action('init', array($this, 'handler')); } /** * Factory method * @return \ext_jp_subscribe */ public static function load() { $factory = new ext_jp_subscribe(); return $factory; } /** * Singleton Pattern * @return class object */ public static function instance(){ if (!is_object(self::$instance)) { $class = __CLASS__ ; self::$instance = new $class; } return self::$instance; } /** * The subscription form * @param type $tpl * @param type $slug * @return type */ public function form($tpl = NULL, $slug = 'exts') { if (!class_exists('Jetpack_Subscriptions')): _e('Sorry the Jetpack Class not found', 'al-manager'); return; endif; if (isset($tpl) AND class_exists('cwp_layout')) : cwp_layout::tpl_part($slug, $tpl); else : ob_start(); ?>
subscription_slug ; ?>
invalid_email; ?>
success_message; ?>.