PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 1.2.4
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v1.2.4
6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 3.6.66 All 195 releases
fluentform / app / Modules / Activator.php

Activator.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 1.2.4, at app/Modules/Activator.php

44 lines 977 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Modules;
4
5 use FluentForm\App\Modules\Acl\Acl;
6 use FluentForm\App\Databases\DatabaseMigrator;
7
8 class Activator
9 {
10 /**
11 * This method will be called on plugin activation
12 * @return void
13 */
14 public function handleActivation()
15 {
16 // We are going to migrate all the database tables here.
17 DatabaseMigrator::run();
18
19 // Assign fluentform permission set.
20 Acl::setPermissions();
21
22 $this->setDefaultGlobalSettings();
23 $this->setCurrentVersion();
24 }
25
26 private function setDefaultGlobalSettings()
27 {
28 if(!get_option('_fluentform_global_form_settings')) {
29 update_option('__fluentform_global_form_settings', array(
30 'layout' => array(
31 'labelPlacement' => 'top',
32 'helpMessagePlacement' => 'with_label',
33 'errorMessagePlacement' => 'inline',
34 'cssClassName' => ''
35 )
36 ));
37 }
38 }
39
40 private function setCurrentVersion()
41 {
42 update_option('_fluentform_installed_version', '1.2.4');
43 }
44 }