コード例 #1
0
 /**
  * Password reset form tag
  *
  * @param array $atts
  * @param string $content
  *
  * @return string
  */
 public static function password_reset_form_tag($atts, $content)
 {
     $password_reset_structure = ProfilePress_Registration_Auth::validate_registration_form();
     $tag = '<form method="post" action="' . esc_url($_SERVER['REQUEST_URI']) . '">';
     $tag .= do_shortcode($content);
     $tag .= '</form>';
     return $password_reset_structure . $tag;
 }
コード例 #2
0
 public static function profilepress_registration_parser($atts)
 {
     $atts = shortcode_atts(array('id' => '', 'redirect' => ''), $atts);
     // get registration builder id
     $id = absint($atts['id']);
     $redirect = esc_url($atts['redirect']);
     $registration_status = ProfilePress_Registration_Auth::validate_registration_form($id, $redirect);
     $attribution = '<!-- Custom "Edit Profile Page" built with the ProfilePress WordPress plugin - http://profilepress.net -->' . "\r\n";
     $css = self::get_registration_css($id);
     // call the registration structure/design
     return $attribution . $css . $registration_status . self::get_registration_structure($id);
 }
コード例 #3
0
 /**
  * Called to validate registration form field
  * @return string
  */
 public static function validate_registration_form($id = null, $redirect = null)
 {
     // if registration form have been submitted process it
     // filter to change registration submit button name to avoid validation for forms on same page
     $submit_name = apply_filters('pp_registration_submit_name', 'reg_submit', $id);
     if (isset($_POST[$submit_name])) {
         $register_the_user = ProfilePress_Registration_Auth::register_new_user($_POST, $id, $_FILES, $redirect);
     }
     // display form generated messages
     if (!empty($register_the_user)) {
         $registration_errors = html_entity_decode($register_the_user);
     } else {
         $registration_errors = '';
     }
     return $registration_errors;
 }