/home/altere25/infinet.finance/wp-content/plugins/weforms/includes/fields
NameSizeModeActions
class-abstract-fields.php183250644editdlrm
class-field-checkbox.php46900644editdlrm
class-field-column.php44880644editdlrm
class-field-date.php59410644editdlrm
class-field-dropdown.php46880644editdlrm
class-field-email.php54680644editdlrm
class-field-hidden.php28720644editdlrm
class-field-html.php26940644editdlrm
class-field-humanpresence.php19640644editdlrm
class-field-image.php54850644editdlrm
class-field-multidropdown.php43710644editdlrm
class-field-name.php107370644editdlrm
class-field-radio.php46280644editdlrm
class-field-recaptcha.php97500644editdlrm
class-field-sectionbreak.php33110644editdlrm
class-field-text.php60460644editdlrm
class-field-textarea.php61740644editdlrm
class-field-url.php41710644editdlrm
class-fields-pro.php9120644editdlrm
field-image-render-script.js4680644editdlrm
Edit: /home/altere25/infinet.finance/wp-content/plugins/weforms/includes/fields/class-field-textarea.php (6174B)
name = __( 'Textarea', 'weforms' ); $this->input_type = 'textarea_field'; $this->icon = 'paragraph'; } /** * Render the text field * * @param array $field_settings * @param int $form_id * * @return void */ public function render( $field_settings, $form_id ) { $req_class = ( $field_settings['required'] == 'yes' ) ? 'required' : 'rich-editor'; $value = $field_settings['default']; $textarea_id = $field_settings['name'] ? $field_settings['name'] . '_' . $form_id : 'textarea_'; $form_settings = weforms()->form->get( $form_id )->get_settings(); $use_theme_css = isset( $form_settings['use_theme_css'] ) ? $form_settings['use_theme_css'] : 'wpuf-style'; ?>
  • print_list_attributes( $field_settings ); ?>> print_label( $field_settings, $form_id ); ?>
    $field_settings['rows'], 'quicktags' => false, 'media_buttons' => false, 'editor_class' => $req_class, 'textarea_name' => $field_settings['name'], ]; $editor_settings = apply_filters( 'wpuf_textarea_editor_args', $editor_settings ); wp_editor( $value, $textarea_id, $editor_settings ); } elseif ( $field_settings['rich'] == 'teeny' ) { $editor_settings = [ 'textarea_rows' => $field_settings['rows'], 'quicktags' => false, 'media_buttons' => false, 'teeny' => true, 'editor_class' => $req_class, 'textarea_name' => $field_settings['name'], ]; $editor_settings = apply_filters( 'wpuf_textarea_editor_args', $editor_settings ); wp_editor( $value, $textarea_id, $editor_settings ); } else { ?> help_text( $field_settings ); if ( isset( $field_settings['word_restriction'] ) && $field_settings['word_restriction'] ) { $this->check_word_restriction_func( $field_settings['word_restriction'], $field_settings['rich'], $field_settings['name'] . '_' . $form_id ); } ?>
  • get_default_option_settings(); $default_text_options = $this->get_default_textarea_option_settings(); return array_merge( $default_options, $default_text_options ); } /** * Get the field props * * @return array */ public function get_field_props() { $defaults = $this->default_attributes(); $props = [ 'word_restriction' => '', 'rows' => 5, 'cols' => 25, 'rich' => 'no', ]; return array_merge( $defaults, $props ); } /** * Prepare entry * * @param $field * * @return mixed */ public function prepare_entry( $field, $args = [] ) { if( empty( $_POST['_wpnonce'] ) ) { wp_send_json_error( __( 'Unauthorized operation', 'weforms' ) ); } if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['_wpnonce'] ) ), 'wpuf_form_add' ) ) { wp_send_json_error( __( 'Unauthorized operation', 'weforms' ) ); } $args = ! empty( $args ) ? $args : weforms_clean( $_POST ); return wp_kses_post( $args[$field['name']] ); } }