PATH:
home
/
lab2454c
/
spaxtac.com
/
wp-content
/
plugins
/
wp-user-frontend-pro
/
includes
/
fields
<?php /** * Last name Field Class * * @since 3.1.0 **/ class WPUF_Form_Field_First_Name extends WPUF_Field_Contract { function __construct() { $this->name = __( 'First Name', 'wpuf-pro' ); $this->input_type = 'first_name'; $this->icon = 'user'; } /** * Render the First Name field * * @param array $field_settings * * @param integer $form_id * * @param string $type * * @param integer $post_id * * @return void */ public function render( $field_settings, $form_id, $type = 'post', $post_id = null ) { if ( isset( $post_id ) && $post_id !=0 ) { $value = $this->get_user_data( $post_id, $field_settings['name'] ); } else { $value = $field_settings['default']; } ?> <li <?php $this->print_list_attributes( $field_settings ); ?>> <?php $this->print_label( $field_settings, $form_id ); ?> <div class="wpuf-fields"> <input class="textfield <?php echo 'wpuf_' . $field_settings['name'] . '_' . $form_id; ?>" id="<?php echo $field_settings['name'] . '_' . $form_id; ?>" type="text" data-required="<?php echo $field_settings['required'] ?>" data-type="text" name="<?php echo esc_attr( $field_settings['name'] ); ?>" placeholder="<?php echo esc_attr( $field_settings['placeholder'] ); ?>" value="<?php echo esc_attr( $value ) ?>" size="<?php echo esc_attr( $field_settings['size'] ) ?>" /> <span class="wpuf-wordlimit-message wpuf-help"></span> <?php $this->help_text( $field_settings ); ?> </div> </li> <?php } /** * Get field options setting * * @return array **/ public function get_options_settings() { $default_options = $this->get_default_option_settings( false, array('dynamic') ); $settings = $this->get_default_text_option_settings( true ); return array_merge( $default_options, $settings ); } /** * Get the field props * * @return array **/ public function get_field_props() { $defaults = $this->default_attributes(); $props = array( 'input_type' => 'text', 'is_meta' => 'no', 'name' => 'first_name', 'is_meta' => 'no', 'size' => 40, 'id' => 0, 'is_new' => true, ); return array_merge( $defaults, $props ); } /** * Prepare entry * * @param $field * * @return mixed */ public function prepare_entry( $field ) { return sanitize_text_field( trim( $_POST[$field['name']] ) ); } }
[-] class-field-user-url.php
[edit]
[-] class-field-address.php
[edit]
[+]
..
[-] class-field-country.php
[edit]
[-] class-field-shortcode.php
[edit]
[-] class-field-nickname.php
[edit]
[-] class-field-user-email.php
[edit]
[-] class-field-file.php
[edit]
[-] class-field-numeric.php
[edit]
[-] class-field-password.php
[edit]
[-] class-field-really-simple-captcha.php
[edit]
[-] class-field-user-bio.php
[edit]
[-] class-field-date.php
[edit]
[-] class-field-avatar.php
[edit]
[-] class-field-username.php
[edit]
[-] class-field-toc.php
[edit]
[-] class-field-math-captcha.php
[edit]
[-] class-field-rating.php
[edit]
[-] class-field-step.php
[edit]
[-] class-field-display-name.php
[edit]
[-] class-field-repeat.php
[edit]
[-] class-field-first-name.php
[edit]
[-] class-field-gmap.php
[edit]
[-] class-field-embed.php
[edit]
[-] class-field-last-name.php
[edit]
[-] class-field-hook.php
[edit]