コード例 #1
0
 /**
  * Login form tag
  *
  * @param array $atts
  * @param string $content
  *
  * @return string
  */
 public static function login_form_tag($atts, $content)
 {
     $login_error = ProfilePress_Login_Auth::credentials_validation();
     $tag = '<form method="post" action="' . esc_url($_SERVER['REQUEST_URI']) . '">';
     $tag .= do_shortcode($content);
     $tag .= '</form>';
     return $login_error . $tag;
 }
コード例 #2
0
 /** Parse login form */
 public function profilepress_login_parser($atts)
 {
     $atts = shortcode_atts(array('id' => '', 'redirect' => ''), $atts);
     // get login builder id
     $id = absint($atts['id']);
     $redirect = esc_url($atts['redirect']);
     $login_error = ProfilePress_Login_Auth::credentials_validation($id, $redirect);
     $attribution = '<!-- Custom Login form built with the ProfilePress WordPress plugin - http://profilepress.net -->' . "\r\n";
     $css = self::get_login_css($id);
     return $attribution . $css . $login_error . $this->get_login_structure($id);
 }