name = __( 'Custom HTML', 'wp-user-frontend' ); $this->input_type = 'custom_html'; $this->icon = 'code'; } /** * Render the html field * * @param array $field_settings * @param int $form_id * @param string $type * @param int $post_id * * @return void */ public function render( $field_settings, $form_id, $type = 'post', $post_id = null ) { $field_settings['name'] = isset( $field_settings['name'] ) ? $field_settings['name'] : $this->input_type . '_' . $field_settings['id']; ?>
  • print_list_attributes( $field_settings ); ?>>
  • 'html', 'title' => __( 'Html Codes', 'wp-user-frontend' ), 'type' => 'textarea', 'section' => 'basic', 'priority' => 11, 'help_text' => __( 'Paste your HTML codes, WordPress shortcodes will also work here', 'wp-user-frontend' ), ], ]; return $settings; } /** * Get the field props * * @return array */ public function get_field_props() { $props = [ 'input_type' => 'html', 'template' => $this->get_type(), 'label' => $this->get_name(), 'html' => sprintf( '%s', __( 'HTML Section', 'wp-user-frontend' ) ), 'id' => 0, 'is_new' => true, 'wpuf_cond' => null, ]; return $props; } }