| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
?> |
| 6 |
<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"> |
| 15 |
|
| 16 |
<?php |
| 17 |
include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); |
| 18 |
|
| 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 |
<div id="the-list" class="frm-addons"> |
| 43 |
<?php foreach ( $addons as $slug => $addon ) { ?> |
| 44 |
<div class="frm-card plugin-card-<?php echo esc_attr( $slug ); ?> frm-no-thumb frm-addon-<?php echo esc_attr( $addon['status']['type'] ); ?>"> |
| 45 |
<div class="plugin-card-top"> |
| 46 |
<?php if ( strtotime( $addon['released'] ) > strtotime( '-90 days' ) ) { ?> |
| 47 |
<div class="frm_ribbon"> |
| 48 |
<span>New</span> |
| 49 |
</div> |
| 50 |
<?php } ?> |
| 51 |
<h2> |
| 52 |
<?php echo esc_html( $addon['title'] ); ?> |
| 53 |
</h2> |
| 54 |
<p> |
| 55 |
<?php |
| 56 |
echo FrmAppHelper::kses( $addon['excerpt'], array( 'a' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 57 |
|
| 58 |
$show_docs = isset( $addon['docs'] ) && ! empty( $addon['docs'] ) && $addon['installed']; |
| 59 |
?> |
| 60 |
<?php if ( $show_docs ) { ?> |
| 61 |
<br/><a href="<?php echo esc_url( $addon['docs'] ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'View Docs', 'formidable' ); ?>"> |
| 62 |
<?php esc_html_e( 'View Docs', 'formidable' ); ?> |
| 63 |
</a> |
| 64 |
<?php } ?> |
| 65 |
</p> |
| 66 |
<?php |
| 67 |
$plan_required = FrmFormsHelper::get_plan_required( $addon ); |
| 68 |
if ( ! $show_docs ) { |
| 69 |
FrmFormsHelper::show_plan_required( $plan_required, $pricing . '&utm_content=' . $addon['slug'] ); |
| 70 |
} |
| 71 |
?> |
| 72 |
</div> |
| 73 |
<div class="plugin-card-bottom"> |
| 74 |
<span class="addon-status"> |
| 75 |
<?php |
| 76 |
printf( |
| 77 |
/* translators: %s: Status name */ |
| 78 |
esc_html__( 'Status: %s', 'formidable' ), |
| 79 |
'<span class="addon-status-label">' . esc_html( $addon['status']['label'] ) . '</span>' |
| 80 |
); |
| 81 |
?> |
| 82 |
</span> |
| 83 |
<?php |
| 84 |
$passing = array( |
| 85 |
'addon' => $addon, |
| 86 |
'license_type' => ! empty( $license_type ) ? $license_type : false, |
| 87 |
'plan_required' => 'plan_required', |
| 88 |
'upgrade_link' => $pricing, |
| 89 |
); |
| 90 |
FrmAddonsController::show_conditional_action_button( $passing ); |
| 91 |
?> |
| 92 |
</div> |
| 93 |
</div> |
| 94 |
<?php } ?> |
| 95 |
</div> |
| 96 |
</div> |
| 97 |
</div> |
| 98 |
|