PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.12
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.12
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/helpers/FrmDashboardHelper.php +7 -43 6.29 → 6.12 View file →
@@ -86,10 +86,9 @@
86 86 *
87 87 * @return void
88 88 */
89 89 public function __construct( $data ) {
90 - $sections = array( 'counters', 'license', 'get_free_templates', 'payments', 'entries', 'inbox', 'video', 'payments' );
91 -
90 + $sections = array( 'counters', 'license', 'payments', 'entries', 'inbox', 'video', 'payments' );
92 91 foreach ( $sections as $section ) {
93 92 if ( isset( $data[ $section ] ) ) {
94 93 $this->view[ $section ] = $data[ $section ];
95 94 }
@@ -153,9 +152,8 @@
153 152 * @return void
154 153 */
155 154 public function get_license_management() {
156 155 $template = $this->view['license'];
157 -
158 156 if ( is_callable( 'FrmProDashboardHelper::load_license_management' ) ) {
159 157 FrmProDashboardHelper::load_license_management( $template );
160 158 return;
161 159 }
@@ -163,19 +161,8 @@
163 161 include FrmAppHelper::plugin_path() . '/classes/views/dashboard/templates/license-management.php';
164 162 }
165 163
166 164 /**
167 - * Get free templates banner template.
168 - *
169 - * @since 6.25
170 - *
171 - * @return void
172 - */
173 - public function get_free_templates_banner() {
174 - include FrmAppHelper::plugin_path() . '/classes/views/shared/get-free-templates-banner.php';
175 - }
176 -
177 - /**
178 165 * Show buttons to in the license key box.
179 166 *
180 167 * @since 6.8
181 168 *
@@ -184,15 +171,14 @@
184 171 *
185 172 * @return void
186 173 */
187 174 public static function show_connect_links( $buttons = array(), $button_classes = '' ) {
188 - if ( ! $buttons ) {
175 + if ( empty( $buttons ) ) {
189 176 $buttons = self::get_license_buttons();
190 177 }
191 178
192 - foreach ( $buttons as $button ) {
179 + foreach ( $buttons as $i => $button ) {
193 180 $add_classes = ! empty( $button['classes'] ) ? ' ' . $button['classes'] : ' frm-button-secondary';
194 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
195 181 ?>
196 182 <a href="<?php echo esc_url( $button['link'] ); ?>" target="_blank"
197 183 class="<?php echo esc_attr( $button_classes . $add_classes ); ?>"
198 184 >
@@ -198,9 +184,8 @@
198 184 >
199 185 <?php echo esc_html( $button['label'] ); ?>
200 186 </a>
201 187 <?php
202 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
203 188 }
204 189 }
205 190
206 191 /**
@@ -210,26 +195,8 @@
210 195 *
211 196 * @return array
212 197 */
213 198 public static function get_license_buttons() {
214 - $cta_text = FrmSalesApi::get_best_sale_value( 'dashboard_license_cta_text' );
215 -
216 - if ( ! $cta_text ) {
217 - $cta_text = __( 'Get Formidable PRO', 'formidable' );
218 - }
219 -
220 - $upgrade_link = FrmSalesApi::get_best_sale_value( 'dashboard_license_cta_link' );
221 - $utm = array(
222 - 'campaign' => 'settings-license',
223 - 'content' => 'dashboard-license-box',
224 - );
225 -
226 - if ( $upgrade_link ) {
227 - $upgrade_link = FrmAppHelper::maybe_add_missing_utm( $upgrade_link, $utm );
228 - } else {
229 - $upgrade_link = FrmAppHelper::admin_upgrade_link( $utm );
230 - }
231 -
232 199 return array(
233 200 array(
234 201 'label' => __( 'Connect Account', 'formidable' ),
235 202 'link' => FrmAddonsController::connect_link(),
@@ -235,10 +202,10 @@
235 202 'link' => FrmAddonsController::connect_link(),
236 203 'classes' => 'frm-button-primary frm-show-unauthorized',
237 204 ),
238 205 array(
239 - 'label' => $cta_text,
240 - 'link' => $upgrade_link,
206 + 'label' => __( 'Get Formidable PRO', 'formidable' ),
207 + 'link' => FrmAppHelper::admin_upgrade_link( 'settings-license' ),
241 208 'classes' => 'frm-button-secondary frm-show-unauthorized',
242 209 ),
243 210 );
244 211 }
@@ -248,9 +215,10 @@
248 215 *
249 216 * @return void
250 217 */
251 218 public function get_inbox() {
252 - $template = $this->view['inbox'];
219 + $template = $this->view['inbox'];
220 +
253 221 $subscribe_inbox_classnames = 'frm-inbox-subscribe frmcenter';
254 222 $subscribe_inbox_classnames .= ! empty( $template['unread'] ) ? ' frm_hidden' : '';
255 223 $subscribe_inbox_classnames .= true === FrmDashboardController::email_is_subscribed( $template['user']->user_email ) ? ' frm-inbox-hide-form' : '';
256 224
@@ -300,13 +268,11 @@
300 268 * @return void
301 269 */
302 270 public function get_youtube_video( $classes ) {
303 271 $template = $this->view['video'];
304 -
305 272 if ( null === $template['id'] ) {
306 273 return;
307 274 }
308 -
309 275 include FrmAppHelper::plugin_path() . '/classes/views/dashboard/templates/youtube-video.php';
310 276 }
311 277
312 278 /**
@@ -364,10 +330,8 @@
364 330 }
365 331
366 332 /**
367 333 * Dashboard - load the entries list template.
368 - *
369 - * @param array $template
370 334 *
371 335 * @return void
372 336 */
373 337 private static function load_entries_list_template( $template ) {