Exemplo n.º 1
0
 public function __construct($main = false)
 {
     global $post;
     /**
      * Load the parent's constructor in order to correctly get
      * the popup and post IDs.
      */
     parent::__construct();
     /**
      * Set vars
      */
     $options = maybe_unserialize(get_option('wpbo_options', array()));
     $this->role = isset($options['wp_default_role']) ? $options['wp_default_role'] : 'betteroptin';
     $this->password = false;
     /* Add direct link to leads. */
     add_action('admin_menu', array($this, 'add_leads_menu'), 9);
     if (!is_admin() && $this->is_submission()) {
         add_action('init', array($this, 'submit'));
     }
 }