PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7.2
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7.2
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
← All changes | classes/controllers/FrmOverlayController.php +9 -13 6.356.7.2 View file →
@@ -14,16 +14,16 @@
14 14
15 15 /**
16 16 * Check if the overlay will run again periodically.
17 17 *
18 - * @var bool If the condition is true, the overlay will execute only following a specified time interval.
18 + * @var boolean If the condition is true, the overlay will execute only following a specified time interval.
19 19 */
20 20 private $recurring_execution = false;
21 21
22 22 /**
23 - * The controller configs passed through construct. If empty the overlay will run normally, it will open every time when open_overlay is called.
23 + * The controller configs passed through construct. If empty the overlay will run normaly, it will open every time when open_overlay is called.
24 24 *
25 - * @var array Config {
25 + * @var array $config {
26 26 *
27 27 * @type string $execution-frequency Example values: '1 day', '10 days', '1 week', etc.
28 28 * @type string $config-option-name A handle name that will be used to store the controller options_data.
29 29 *
@@ -40,13 +40,13 @@
40 40
41 41 /**
42 42 * The controller data. It will handle the options from multiple instances of the controller
43 43 *
44 - * @var array Option data {
45 - *
44 + * @var array $options_data {
46 45 * @type array $options_data[ '[instance1-option_name_provided_via-->config-option-name]' ] {
47 46 * @type string $execution-frequency Values example: '1 day' | '10 days' | '1 week' | '10 weeks' | '1 month' | '10 months' | '1 year' | '10 years'
48 47 * }
48 + *
49 49 * @type array $options_data[ '[instance2-option_name_provided_via-->config-option-name]' ] {
50 50 * @type string $execution-frequency Values example: '1 day' | '10 days' | '1 week' | '10 weeks' | '1 month' | '10 months' | '1 year' | '10 years'
51 51 * }
52 52 * }
@@ -52,11 +52,8 @@
52 52 * }
53 53 */
54 54 private $options_data = array();
55 55
56 - /**
57 - * @param array $config
58 - */
59 56 public function __construct( $config = array() ) {
60 57 if ( ! isset( $config['config-option-name'] ) || ! isset( $config['execution-frequency'] ) ) {
61 58 return;
62 59 }
@@ -103,9 +100,9 @@
103 100
104 101 /**
105 102 * Ascertain whether the overlay needs to be executed or not.
106 103 *
107 - * @return bool
104 + * @return boolean
108 105 */
109 106 private function is_time_to_execute() {
110 107 if ( ! isset( $this->options_data[ $this->config['config-option-name'] ] ) ) {
111 108 return true;
@@ -130,9 +127,9 @@
130 127 *
131 128 * @return void
132 129 */
133 130 private function update_options_data() {
134 - update_option( $this->option_meta_name, $this->options_data, false );
131 + update_option( $this->option_meta_name, $this->options_data, 'no' );
135 132 }
136 133
137 134 /**
138 135 * Open overlay.
@@ -147,10 +144,9 @@
147 144 * @type string $buttons[]['url'] URL for the button.
148 145 * @type string $buttons[]['target'] Target attribute for the button link.
149 146 * @type string $buttons[]['label'] Label/text of the button.
150 147 * }
151 - *
152 - * @return bool
148 + * @return boolean
153 149 */
154 150 public function open_overlay( $data = array() ) {
155 151 if ( true === $this->recurring_execution ) {
156 152 if ( false === $this->is_time_to_execute() ) {
@@ -181,9 +177,9 @@
181 177 *
182 178 * @return void
183 179 */
184 180 private function enqueue_assets() {
185 - wp_enqueue_style( 'formidable-animations' );
186 181 wp_enqueue_style( self::$assets_handle_name );
187 182 wp_enqueue_script( self::$assets_handle_name );
188 183 }
184 +
189 185 }