示例#1
0
 protected function _dispatch($default = null)
 {
     $action = $this->get_current_action();
     if (get_awpcp_option('reply-to-ad-requires-registration') && !is_user_logged_in()) {
         $message = __('Only registered users can reply to Ads. If you are already registered, please login below in order to reply to the Ad.', 'AWPCP');
         return $this->render('content', awpcp_login_form($message, awpcp_current_url()));
     }
     $ad = $this->get_ad();
     if (is_null($ad)) {
         $message = __('The specified Ad does not exist.', 'AWPCP');
         return $this->render('content', awpcp_print_error($message));
     }
     switch ($action) {
         case 'contact':
             return $this->contact_step();
         case 'docontact1':
         default:
             return $this->process_contact_form();
     }
 }
<h2><?php 
echo esc_html(_x('Login/Registration', 'place ad login step', 'AWPCP'));
?>
</h2>

<?php 
if (get_awpcp_option('show-create-listing-form-steps')) {
    echo awpcp_render_listing_form_steps('login');
}
?>

<?php 
echo awpcp_login_form($message, $page_url);