/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-checkbox.php (4690B)
name = __( 'Checkbox', 'weforms' ); $this->input_type = 'checkbox_field'; $this->icon = 'check-square-o'; } /** * Render the text field * * @param array $field_settings * @param int $form_id * * @return void */ public function render( $field_settings, $form_id ) { $selected = !empty( $field_settings['selected'] ) ? $field_settings['selected'] : []; ?>
  • print_list_attributes( $field_settings ); ?>> print_label( $field_settings, $form_id ); ?>
    0 ) { foreach ( $field_settings['options'] as $value => $option ) { ?> help_text( $field_settings ); ?>
  • get_default_option_settings( true, [ 'width' ] ); $dropdown_options = [ $this->get_default_option_dropdown_settings( true ), [ 'name' => 'inline', 'title' => __( 'Show in inline list', 'weforms' ), 'type' => 'radio', 'options' => [ 'yes' => __( 'Yes', 'weforms' ), 'no' => __( 'No', 'weforms' ), ], 'default' => 'no', 'inline' => true, 'section' => 'advanced', 'priority' => 23, 'help_text' => __( 'Show this option in an inline list', 'weforms' ), ], ]; $dropdown_options = apply_filters( 'weforms_checkbox_field_option_settings', $dropdown_options ); return array_merge( $default_options, $dropdown_options ); } /** * Get the field props * * @return array */ public function get_field_props() { $defaults = $this->default_attributes(); $props = [ 'selected' => [], 'inline' => 'no', 'options' => [ 'Option' => __( 'Option', 'weforms' ) ], ]; $props = apply_filters( 'weforms_checkbox_field_props', $props ); 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 ); $entry_value = ( is_array( $args[ $field[ 'name' ] ] ) && $args[ $field[ 'name' ] ] ) ? $args[ $field[ 'name' ] ] : array(); if ( $entry_value ) { $new_val = []; foreach ( $entry_value as $option_key ) { $new_val[] = isset( $field['options'][$option_key] ) ? $field['options'][$option_key] : $option_key; } $entry_value = implode( WeForms::$field_separator, $new_val ); } else { $entry_value = ''; } return $entry_value; } }