PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / models / fields / FrmFieldCreditCard.php

FrmFieldCreditCard.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.32.1, at classes/models/fields/FrmFieldCreditCard.php

68 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 die( 'You are not allowed to call this page directly.' );
5 }
6
7 /**
8 * @since 3.0
9 */
10 class FrmFieldCreditCard extends FrmFieldType {
11
12 /**
13 * @var string
14 *
15 * @since 3.0
16 */
17 protected $type = 'credit_card';
18
19 /**
20 * @var bool
21 *
22 * @since 3.0
23 */
24 protected $has_for_label = false;
25
26 /**
27 * @return array
28 */
29 protected function field_settings_for_type() {
30 return array(
31 'clear_on_focus' => false,
32 'description' => false,
33 'default' => false,
34 'required' => false,
35 );
36 }
37
38 protected function include_form_builder_file() {
39 return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-credit-card.php';
40 }
41
42 /**
43 * @param array $args
44 * @param array $shortcode_atts
45 *
46 * @return string
47 */
48 public function front_field_input( $args, $shortcode_atts ) {
49 $pass_args = array(
50 'errors' => $args['errors'],
51 'html_id' => $args['html_id'],
52 'field_id' => $args['field_id'],
53 );
54
55 ob_start();
56
57 if ( FrmAppHelper::is_style_editor_page() || FrmFormsHelper::is_block_or_page_builder_preview() ) {
58 // Payment gateway scripts are unavailable in preview contexts, use the builder placeholder.
59 $field = $this->field;
60 include $this->include_form_builder_file();
61 } else {
62 FrmStrpLiteActionsController::show_card( $this->field, $args['field_name'], $pass_args );
63 }
64
65 return ob_get_clean();
66 }
67 }
68