title: How to edit form register wordpress theme eduma
body: <p>I'm trying to add a new field in the registry, but I'm not sure how to do the insert in the database with the wordpress functions, and when I search the internet I think only plugins ... wanted to do in hand.
  I do not want anyone to do it for me, just tell me where I make this new field be inserted into the database</p>
  
  <pre><code>&lt;?php
  
  if ( ! class_exists( 'Thim_Login_Popup_Widget' ) ) {
      class Thim_Login_Popup_Widget extends Thim_Widget {
  
          public $ins = array();
  
          function __construct() {
              parent::__construct(
                  'login-popup',
                  esc_html__( 'Thim: Login Popup', 'eduma' ),
                  array(
                      'panels_groups' =&gt; array( 'thim_widget_group' ),
                      'panels_icon'   =&gt; 'thim-widget-icon thim-widget-icon-login-popup'
                  ),
                  array(),
                  array(
                      'text_register' =&gt; array(
                          'type'    =&gt; 'text',
                          'label'   =&gt; esc_html__( 'Register Label', 'eduma' ),
                          'default' =&gt; 'Register',
                      ),
                      'text_login'    =&gt; array(
                          'type'    =&gt; 'text',
                          'label'   =&gt; esc_html__( 'Login Label', 'eduma' ),
                          'default' =&gt; 'Login',
                      ),
                      'text_logout'   =&gt; array(
                          'type'    =&gt; 'text',
                          'label'   =&gt; esc_html__( 'Logout Label', 'eduma' ),
                          'default' =&gt; 'Logout',
                      ),
                      'text_profile'  =&gt; array(
                          'type'    =&gt; 'text',
                          'label'   =&gt; esc_html__( 'Profile Label', 'eduma' ),
                          'default' =&gt; 'Profile',
                      ),
                      'layout'        =&gt; array(
                          'type'    =&gt; 'select',
                          'label'   =&gt; esc_html__( 'Layout', 'eduma' ),
                          'default' =&gt; 'base',
                          'options' =&gt; array(
                              'base' =&gt; esc_html__( 'Default', 'eduma' ),
                              'icon' =&gt; esc_html__( 'Icon', 'eduma' ),
                          ),
                      ),
                      'captcha'       =&gt; array(
                          'type'        =&gt; 'checkbox',
                          'label'       =&gt; esc_html__( 'Use captcha?', 'eduma' ),
                          'description' =&gt; esc_html__( 'Use captcha in register and login form.', 'eduma' ),
                          'default'     =&gt; false
                      ),
                      'term'          =&gt; array(
                          'type'        =&gt; 'text',
                          'label'       =&gt; esc_html__( 'Terms of Service link', 'eduma' ),
                          'description' =&gt; esc_html__( 'Leave empty to disable this field.', 'eduma' ),
                          'default'     =&gt; '',
                      ),
                      'shortcode'     =&gt; array(
                          'type'        =&gt; 'text',
                          'label'       =&gt; esc_html__( 'Shortcode', 'eduma' ),
                          'description' =&gt; esc_html__( 'Enter shortcode to show in form Login.', 'eduma' ),
                          'default'     =&gt; '',
                      )
  
                  )
              );
          }
  
          /**
           * Initialize the CTA widget
           */
          function get_template_name( $instance ) {
              $this-&gt;ins = $instance;
              add_action( 'wp_footer', array( $this, 'thim_display_login_popup_form' ), 5 );
  
              return 'base';
          }
  
          function get_style_name( $instance ) {
              return false;
          }
  
          function thim_display_login_popup_form() {
              $instance = $this-&gt;ins;
              global $wp;
  
              if ( ! is_user_logged_in() ) {
                  $registration_enabled = get_option( 'users_can_register' );
                  ?&gt;
                  &lt;div id="thim-popup-login"&gt;
                      &lt;div class="popup-login-wrapper"&gt;
                          &lt;div class="thim-login-container&lt;?php echo ( ! empty( $instance['shortcode'] ) ) ? ' has-shortcode' : ''; ?&gt;"&gt;
                              &lt;?php
                              if ( ! empty( $instance['shortcode'] ) ) {
                                  echo do_shortcode( $instance['shortcode'] );
                              }
  
                              $current_page_id = get_queried_object_id();
                              ?&gt;
  
                              &lt;div class="thim-popup-inner"&gt;
                                  &lt;div class="thim-login"&gt;
                                      &lt;?php
                                      $login_redirect = home_url( $wp-&gt;request );
                                      $login_redirect_option = get_theme_mod( 'thim_login_redirect', false );
  
                                      // Set redirect url priority
                                      if ( is_singular( 'lp_course' ) &amp;&amp; 'yes' == get_post_meta( $current_page_id, '_lp_required_enroll', true ) ) {
                                          $login_redirect = add_query_arg( array( 'enroll-course' =&gt; $current_page_id ), $login_redirect );
                                      }
  
                                      if ( ! empty( $login_redirect_option ) ) {
                                          $login_redirect = $login_redirect_option;
                                      }
  
                                      if ( ! empty( $_REQUEST['redirect_to'] ) ) {
                                          $login_redirect = $_REQUEST['redirect_to'];
                                      }
                                      ?&gt;
  
                                      &lt;h4 class="title"&gt;&lt;?php esc_html_e( 'Login with your site account', 'eduma' ); ?&gt;&lt;/h4&gt;
                                      &lt;form name="loginpopopform" action="&lt;?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?&gt;" method="post"&gt;
  
                                          &lt;?php do_action( 'thim_before_login_form' ); ?&gt;
  
                                          &lt;p class="login-username"&gt;
                                              &lt;input type="text" name="log" placeholder="&lt;?php esc_html_e( 'Username or email', 'eduma' ); ?&gt;" class="input required" value="" size="20" /&gt;
                                          &lt;/p&gt;
                                          &lt;p class="login-password"&gt;
                                              &lt;input type="password" name="pwd" placeholder="&lt;?php esc_html_e( 'Password', 'eduma' ); ?&gt;" class="input required" value="" size="20" /&gt;
                                          &lt;/p&gt;
  
                                          &lt;?php
                                          /**
                                           * Fires following the 'Password' field in the login form.
                                           *
                                           * @since 2.1.0
                                           */
                                          do_action( 'login_form' );
                                          ?&gt;
  
                                          &lt;?php if ( ! empty( $instance['captcha'] ) ): ?&gt;
                                              &lt;p class="thim-login-captcha"&gt;
                                                  &lt;?php
                                                  $value_1 = rand( 1, 9 );
                                                  $value_2 = rand( 1, 9 );
                                                  ?&gt;
                                                  &lt;input type="text" data-captcha1="&lt;?php echo esc_attr( $value_1 ); ?&gt;" data-captcha2="&lt;?php echo esc_attr( $value_2 ); ?&gt;" placeholder="&lt;?php echo esc_attr( $value_1 . ' &amp;#43; ' . $value_2 . ' &amp;#61;' ); ?&gt;" class="captcha-result required" /&gt;
                                              &lt;/p&gt;
                                          &lt;?php endif; ?&gt;
  
                                          &lt;?php echo '&lt;a class="lost-pass-link" href="' . thim_get_lost_password_url() . '" title="' . esc_attr__( 'Lost Password', 'eduma' ) . '"&gt;' . esc_html__( 'Lost your password?', 'eduma' ) . '&lt;/a&gt;'; ?&gt;
                                          &lt;p class="forgetmenot login-remember"&gt;
                                              &lt;label for="popupRememberme"&gt;&lt;input name="rememberme" type="checkbox" value="forever" id="popupRememberme" /&gt; &lt;?php esc_html_e( 'Remember Me', 'eduma' ); ?&gt;
                                              &lt;/label&gt;&lt;/p&gt;
                                          &lt;p class="submit login-submit"&gt;
                                              &lt;input type="submit" name="wp-submit" class="button button-primary button-large" value="&lt;?php esc_attr_e( 'Login', 'eduma' ); ?&gt;" /&gt;
                                              &lt;input type="hidden" name="redirect_to" value="&lt;?php echo esc_url( $login_redirect ); ?&gt;" /&gt;
                                              &lt;input type="hidden" name="testcookie" value="1" /&gt;
                                          &lt;/p&gt;
  
                                          &lt;?php do_action( 'thim_after_login_form' ); ?&gt;
  
                                      &lt;/form&gt;
                                      &lt;?php
  
                                      if ( $registration_enabled ) {
                                          echo '&lt;p class="link-bottom"&gt;' . esc_html__( 'Not a member yet? ', 'eduma' ) . ' &lt;a class="register" href="' . esc_url( thim_get_register_url() ) . '"&gt;' . esc_html__( 'Register now', 'eduma' ) . '&lt;/a&gt;&lt;/p&gt;';
                                      }
                                      ?&gt;
                                  &lt;/div&gt;
  
                                  &lt;?php if ( $registration_enabled ): ?&gt;
                                      &lt;div class="thim-register"&gt;
                                          &lt;?php
                                          $register_redirect = home_url( $wp-&gt;request );
                                          $register_redirect_option = get_theme_mod( 'thim_register_redirect', false );
  
                                          // Set redirect url priority
                                          if ( is_singular( 'lp_course' ) &amp;&amp; 'yes' == get_post_meta( $current_page_id, '_lp_required_enroll', true ) ) {
                                              $register_redirect = add_query_arg( array( 'enroll-course' =&gt; $current_page_id ), $register_redirect );
                                          }
  
                                          if ( ! empty( $register_redirect_option ) ) {
                                              $register_redirect = $register_redirect_option;
                                          }
  
                                          if ( ! empty( $_REQUEST['redirect_to'] ) ) {
                                              $register_redirect = $_REQUEST['redirect_to'];
                                          }
                                          ?&gt;
  
                                          &lt;h4 class="title"&gt;&lt;?php echo esc_html_x( 'Register a new account', 'Login popup form', 'eduma' ); ?&gt;&lt;/h4&gt;
  
                                          &lt;form class="&lt;?php if ( get_theme_mod( 'thim_auto_login', true ) ) {
                                              echo 'auto_login';
                                          } ?&gt;" name="registerformpopup" action="&lt;?php echo esc_url( site_url( 'wp-login.php?action=register', 'login_post' ) ); ?&gt;" method="post" novalidate="novalidate"&gt;
  
                                              &lt;?php wp_nonce_field( 'ajax_register_nonce', 'register_security' ); ?&gt;
  
                                              &lt;p&gt;
                                                  &lt;input placeholder="&lt;?php esc_attr_e( 'Username', 'eduma' ); ?&gt;" type="text" name="user_login" class="input required" /&gt;
                                              &lt;/p&gt;
  
                                              &lt;p&gt;
                                                  &lt;input placeholder="&lt;?php esc_attr_e( 'Email', 'eduma' ); ?&gt;" type="email" name="user_email" class="input required" /&gt;
                                              &lt;/p&gt;
  
                                              &lt;p&gt;
                                                  &lt;input placeholder="&lt;?php esc_attr_e( 'Name', 'eduma' ); ?&gt;" type="text" name="user_name" id="user_name" class="input" /&gt;&lt;!-- My Custon Field--&gt;
                                              &lt;/p&gt;
  
                                              &lt;p&gt;
                                                  &lt;input placeholder="&lt;?php esc_attr_e( 'Password', 'eduma' ); ?&gt;" type="password" name="password" class="input required" /&gt;
                                              &lt;/p&gt;
                                              &lt;p&gt;
                                                  &lt;input placeholder="&lt;?php esc_attr_e( 'Repeat Password', 'eduma' ); ?&gt;" type="password" name="repeat_password" class="input required" /&gt;
                                              &lt;/p&gt;
  
                                              &lt;?php
                                              if ( is_multisite() &amp;&amp; function_exists( 'gglcptch_login_display' ) ) {
                                                  gglcptch_login_display();
                                              }
  
                                              do_action( 'register_form' );
                                              ?&gt;
  
                                              &lt;?php if ( ! empty( $instance['captcha'] ) ) : ?&gt;
                                                  &lt;p class="thim-login-captcha"&gt;
                                                      &lt;?php
                                                      $value_1 = rand( 1, 9 );
                                                      $value_2 = rand( 1, 9 );
                                                      ?&gt;
                                                      &lt;input type="text" data-captcha1="&lt;?php echo esc_attr( $value_1 ); ?&gt;" data-captcha2="&lt;?php echo esc_attr( $value_2 ); ?&gt;" placeholder="&lt;?php echo esc_attr( $value_1 . ' &amp;#43; ' . $value_2 . ' &amp;#61;' ); ?&gt;" class="captcha-result required" /&gt;
                                                  &lt;/p&gt;
                                              &lt;?php endif; ?&gt;
  
                                              &lt;?php if ( ! empty( $instance['term'] ) ): ?&gt;
                                                  &lt;p&gt;
                                                      &lt;input type="checkbox" class="required" name="term" id="termFormFieldPopup"&gt;
                                                      &lt;label for="termFormFieldPopup"&gt;&lt;?php printf( __( 'I accept the &lt;a href="%s" target="_blank"&gt;Terms of Service&lt;/a&gt;', 'eduma' ), esc_url( $instance['term'] ) ); ?&gt;&lt;/label&gt;
                                                  &lt;/p&gt;
                                              &lt;?php endif; ?&gt;
                                              &lt;p&gt;
                                                  &lt;input type="hidden" name="redirect_to" value="&lt;?php echo esc_url( $register_redirect ); ?&gt;" /&gt;
                                                  &lt;input type="hidden" name="modify_user_notification" value="1"&gt;
                                              &lt;/p&gt;
  
                                              &lt;!--                        --&gt;&lt;?php //do_action( 'signup_hidden_fields', 'create-another-site' ); ?&gt;
  
                                              &lt;p class="submit"&gt;
                                                  &lt;input type="submit" name="wp-submit" class="button button-primary button-large" value="&lt;?php echo esc_attr_x( 'Sign up', 'Login popup form', 'eduma' ); ?&gt;" /&gt;
                                              &lt;/p&gt;
                                          &lt;/form&gt;
                                          &lt;?php echo '&lt;p class="link-bottom"&gt;' . esc_html_x( 'Are you a member? ', 'Login popup form', 'eduma' ) . ' &lt;a class="login" href="' . esc_url( thim_get_login_page_url() ) . '"&gt;' . esc_html_x( 'Login now', 'Login popup form', 'eduma' ) . '&lt;/a&gt;&lt;/p&gt;'; ?&gt;
  
                                          &lt;div class="popup-message"&gt;&lt;/div&gt;
                                      &lt;/div&gt;
                                  &lt;?php endif; ?&gt;
                              &lt;/div&gt;
  
                              &lt;span class="close-popup"&gt;&lt;i class="fa fa-times" aria-hidden="true"&gt;&lt;/i&gt;&lt;/span&gt;
                              &lt;div class="cssload-container"&gt;
                                  &lt;div class="cssload-loading"&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;i&gt;&lt;/i&gt;&lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;?php
              }
          }
      }
  }
  
  function thim_login_popup_widget() {
      register_widget( 'Thim_Login_Popup_Widget' );
  
  }
  
  add_action( 'widgets_init', 'thim_login_popup_widget' );
  </code></pre>