PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.23
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.23
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 / square / controllers / FrmSquareLiteSettingsController.php

FrmSquareLiteSettingsController.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.23, at square/controllers/FrmSquareLiteSettingsController.php

67 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 class FrmSquareLiteSettingsController {
7
8 /**
9 * Add Square section to Global Settings.
10 *
11 * @since 6.22
12 *
13 * @param array $sections
14 * @return array
15 */
16 public static function add_settings_section( $sections ) {
17 $sections['square'] = array(
18 'class' => __CLASS__,
19 'function' => 'route',
20 'icon' => 'frm_icon_font frm_square_icon',
21 );
22
23 return $sections;
24 }
25
26 /**
27 * Handle global settings routing.
28 *
29 * @return void
30 */
31 public static function route() {
32 self::global_settings_form();
33 }
34
35 /**
36 * Print the Stripe section for Global settings.
37 *
38 * @param array $atts
39 * @return void
40 */
41 public static function global_settings_form( $atts = array() ) {
42 include FrmSquareLiteAppHelper::plugin_path() . '/views/settings/form.php';
43 }
44
45 /**
46 * @return array
47 */
48 private static function get_default_settings_atts() {
49 return array(
50 'errors' => array(),
51 'message' => '',
52 );
53 }
54
55 /**
56 * Handle processing changes to global Stripe Settings.
57 *
58 * @return void
59 */
60 public static function process_form() {
61 $settings = FrmSquareLiteAppHelper::get_settings();
62 // phpcs:ignore WordPress.Security.NonceVerification.Missing
63 $settings->update( $_POST );
64 $settings->store();
65 }
66 }
67