Beispiel #1
0
 function widget($args, $options)
 {
     if (!empty($args)) {
         extract($args);
     }
     $loggedin = ShoppCustomer()->loggedin();
     // Hide login form on account page when not logged in to prevent duplicate forms
     if (is_account_page() && !$loggedin) {
         return '';
     }
     $defaults = array('title' => $loggedin ? __('Your Account', 'Shopp') : __('Login', 'Shopp'));
     $options = array_merge($defaults, $options);
     extract($options);
     $title = $before_title . $title . $after_title;
     remove_filter('shopp_show_account_errors', array($this, 'showerrors'));
     $Page = new ShoppAccountPage();
     $menu = $Page->content('', 'widget');
     echo $before_widget . $title . $menu . $after_widget;
 }