← All changes
|
stripe/controllers/FrmStrpLiteSettingsController.php
+7
-10
6.5.2
→
trunk
View file →
| @@ -8,15 +8,16 @@ | ||
| 8 | 8 | /** |
| 9 | 9 | * Add Stripe section to Global Settings. |
| 10 | 10 | * |
| 11 | 11 | * @param array $sections |
| 12 | + * | |
| 12 | 13 | * @return array |
| 13 | 14 | */ |
| 14 | 15 | public static function add_settings_section( $sections ) { |
| 15 | 16 | $sections['stripe'] = array( |
| 16 | - 'class' => __CLASS__, | |
| 17 | + 'class' => self::class, | |
| 17 | 18 | 'function' => 'route', |
| 18 | - 'icon' => 'frm_icon_font frm_stripe_icon', | |
| 19 | + 'icon' => 'frmfont frm_stripe_icon', | |
| 19 | 20 | ); |
| 20 | 21 | |
| 21 | 22 | add_action( |
| 22 | 23 | 'frm_messages_settings_form', |
| @@ -21,11 +22,12 @@ | ||
| 21 | 22 | add_action( |
| 22 | 23 | 'frm_messages_settings_form', |
| 23 | 24 | /** |
| 24 | 25 | * @param object $frm_settings |
| 26 | + * | |
| 25 | 27 | * @return void |
| 26 | 28 | */ |
| 27 | - function( $frm_settings ) { | |
| 29 | + function ( $frm_settings ) { | |
| 28 | 30 | $stripe_settings = FrmStrpLiteAppHelper::get_settings()->settings; |
| 29 | 31 | require FrmStrpLiteAppHelper::plugin_path() . '/views/settings/messages.php'; |
| 30 | 32 | } |
| 31 | 33 | ); |
| @@ -45,8 +47,9 @@ | ||
| 45 | 47 | /** |
| 46 | 48 | * Print the Stripe section for Global settings. |
| 47 | 49 | * |
| 48 | 50 | * @param array $atts |
| 51 | + * | |
| 49 | 52 | * @return void |
| 50 | 53 | */ |
| 51 | 54 | public static function global_settings_form( $atts = array() ) { |
| 52 | 55 | $atts = array_merge( $atts, self::get_default_settings_atts() ); |
| @@ -74,16 +77,10 @@ | ||
| 74 | 77 | * |
| 75 | 78 | * @return void |
| 76 | 79 | */ |
| 77 | 80 | public static function process_form() { |
| 78 | - $atts = array( | |
| 79 | - 'errors' => array(), | |
| 80 | - 'message' => '', | |
| 81 | - ); | |
| 82 | - | |
| 83 | 81 | $settings = FrmStrpLiteAppHelper::get_settings(); |
| 84 | 82 | // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 85 | - $settings->update( $_POST ); | |
| 83 | + $settings->update( wp_unslash( $_POST ) ); | |
| 86 | 84 | $settings->store(); |
| 87 | 85 | } |
| 88 | - | |
| 89 | 86 | } |