PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 3.06.06
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v3.06.06
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/views/addons/list.php +28 -73 6.5.33.06.06 View file →
@@ -1,96 +1,51 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - die( 'You are not allowed to call this page directly.' );
4 -}
5 -?>
6 1 <div class="frm_wrap" id="frm-addons-page">
7 - <?php
8 - FrmAppHelper::get_admin_header(
9 - array(
10 - 'label' => __( 'Formidable Add-Ons', 'formidable' ),
11 - )
12 - );
13 - ?>
14 - <div class="wrap">
2 +<div class="wrap">
3 + <h1><?php esc_html_e( 'Formidable Add-Ons', 'formidable' ); ?></h1>
15 4
16 - <?php
17 - include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' );
5 + <?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
18 6
19 - FrmAppHelper::show_search_box(
20 - array(
21 - 'input_id' => 'addon',
22 - 'placeholder' => __( 'Search Add-ons', 'formidable' ),
23 - 'tosearch' => 'frm-card',
24 - )
25 - );
26 -
27 - if ( FrmAppHelper::pro_is_connected() ) {
28 - ?>
29 - <p class="alignleft">
30 - <?php esc_html_e( 'Missing add-ons?', 'formidable' ); ?>
31 - <a href="#" id="frm_reconnect_link" class="frm-show-authorized" data-refresh="1">
32 - <?php esc_html_e( 'Check now for a recent upgrade or renewal', 'formidable' ); ?>
33 - </a>
34 - </p>
35 - <?php
36 - } else {
37 - FrmSettingsController::license_box();
38 - }
39 - ?>
40 - <div class="clear"></div>
41 -
42 7 <div id="the-list" class="frm-addons">
43 8 <?php foreach ( $addons as $slug => $addon ) { ?>
44 9 <div class="frm-card plugin-card-<?php echo esc_attr( $slug ); ?> frm-no-thumb frm-addon-<?php echo esc_attr( $addon['status']['type'] ); ?>">
45 10 <div class="plugin-card-top">
11 + <?php if ( strtotime( $addon['released'] ) > strtotime( '-90 days' ) ) { ?>
12 + <div class="frm_ribbon">
13 + <span>New</span>
14 + </div>
15 + <?php } ?>
46 16 <h2>
47 - <?php
48 - echo esc_html( $addon['title'] );
49 -
50 - if ( ! empty( $addon['is_new'] ) ) {
51 - FrmAppHelper::show_pill_text();
52 - }
53 - ?>
17 + <?php echo esc_html( $addon['title'] ) ?>
54 18 </h2>
55 - <p>
56 - <?php
57 - echo FrmAppHelper::kses( $addon['excerpt'], array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
58 -
59 - $show_docs = isset( $addon['docs'] ) && ! empty( $addon['docs'] ) && $addon['installed'];
60 - ?>
61 - <?php if ( $show_docs ) { ?>
62 - <br/><a href="<?php echo esc_url( $addon['docs'] ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'View Docs', 'formidable' ); ?>">
63 - <?php esc_html_e( 'View Docs', 'formidable' ); ?>
64 - </a>
65 - <?php } ?>
66 - </p>
67 - <?php
68 - $plan_required = FrmFormsHelper::get_plan_required( $addon );
69 - if ( ! $show_docs ) {
70 - FrmFormsHelper::show_plan_required( $plan_required, $pricing . '&utm_content=' . $addon['slug'] );
71 - }
72 - ?>
19 + <p><?php echo esc_html( $addon['excerpt'] ); ?></p>
20 + <?php if ( isset( $addon['docs'] ) && ! empty( $addon['docs'] ) && $addon['installed'] ) { ?>
21 + <a href="<?php echo esc_url( $addon['docs'] ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'View Docs', 'formidable' ); ?>">
22 + <?php esc_html_e( 'View Docs', 'formidable' ); ?>
23 + </a>
24 + <?php } ?>
73 25 </div>
74 26 <div class="plugin-card-bottom">
75 27 <span class="addon-status">
76 28 <?php
77 29 printf(
78 - /* translators: %s: Status name */
79 30 esc_html__( 'Status: %s', 'formidable' ),
80 31 '<span class="addon-status-label">' . esc_html( $addon['status']['label'] ) . '</span>'
81 32 );
82 33 ?>
83 34 </span>
84 - <?php
85 - $passing = array(
86 - 'addon' => $addon,
87 - 'license_type' => ! empty( $license_type ) ? $license_type : false,
88 - 'plan_required' => 'plan_required',
89 - 'upgrade_link' => $pricing,
90 - );
91 - FrmAddonsController::show_conditional_action_button( $passing );
92 - ?>
35 + <?php if ( $addon['status']['type'] === 'installed' ) { ?>
36 + <a rel="<?php echo esc_attr( $addon['plugin'] ) ?>" class="button button-primary frm-button-primary frm-activate-addon <?php echo esc_attr( empty( $addon['activate_url'] ) ? 'frm_hidden' : '' ); ?>">
37 + <?php esc_html_e( 'Activate', 'formidable' ); ?>
38 + </a>
39 + <?php } elseif ( isset( $addon['url'] ) && ! empty( $addon['url'] ) ) { ?>
40 + <a class="frm-install-addon button button-primary frm-button-primary" rel="<?php echo esc_attr( $addon['url'] ); ?>" aria-label="<?php esc_attr_e( 'Install', 'formidable' ); ?>">
41 + <?php esc_html_e( 'Install', 'formidable' ); ?>
42 + </a>
43 + <?php } else { ?>
44 + <a class="install-now button button-primary frm-button-primary" href="<?php echo esc_url( $pricing . '&utm_content=' . $addon['slug'] ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'Upgrade Now', 'formidable' ); ?>">
45 + <?php esc_html_e( 'Upgrade Now', 'formidable' ); ?>
46 + </a>
47 + <?php } ?>
93 48 </div>
94 49 </div>
95 50 <?php } ?>
96 51 </div>