PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.16.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.16.1
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 +11 -40 6.336.16.1 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,15 @@
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',
199 + $upgrade_link = FrmAppHelper::admin_upgrade_link(
200 + array(
201 + 'medium' => 'settings-license',
202 + 'content' => 'dashboard-license-box',
203 + )
224 204 );
225 205
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 206 return array(
233 207 array(
234 208 'label' => __( 'Connect Account', 'formidable' ),
235 209 'link' => FrmAddonsController::connect_link(),
@@ -235,9 +209,9 @@
235 209 'link' => FrmAddonsController::connect_link(),
236 210 'classes' => 'frm-button-primary frm-show-unauthorized',
237 211 ),
238 212 array(
239 - 'label' => $cta_text,
213 + 'label' => __( 'Get Formidable PRO', 'formidable' ),
240 214 'link' => $upgrade_link,
241 215 'classes' => 'frm-button-secondary frm-show-unauthorized',
242 216 ),
243 217 );
@@ -248,9 +222,10 @@
248 222 *
249 223 * @return void
250 224 */
251 225 public function get_inbox() {
252 - $template = $this->view['inbox'];
226 + $template = $this->view['inbox'];
227 +
253 228 $subscribe_inbox_classnames = 'frm-inbox-subscribe frmcenter';
254 229 $subscribe_inbox_classnames .= ! empty( $template['unread'] ) ? ' frm_hidden' : '';
255 230 $subscribe_inbox_classnames .= true === FrmDashboardController::email_is_subscribed( $template['user']->user_email ) ? ' frm-inbox-hide-form' : '';
256 231
@@ -300,13 +275,11 @@
300 275 * @return void
301 276 */
302 277 public function get_youtube_video( $classes ) {
303 278 $template = $this->view['video'];
304 -
305 279 if ( null === $template['id'] ) {
306 280 return;
307 281 }
308 -
309 282 include FrmAppHelper::plugin_path() . '/classes/views/dashboard/templates/youtube-video.php';
310 283 }
311 284
312 285 /**
@@ -364,10 +337,8 @@
364 337 }
365 338
366 339 /**
367 340 * Dashboard - load the entries list template.
368 - *
369 - * @param array $template
370 341 *
371 342 * @return void
372 343 */
373 344 private static function load_entries_list_template( $template ) {