PluginProbe ʕ •ᴥ•ʔ
Image Widget / 4.2
Image Widget v4.2
trunk 1.0 2.0 2.1 2.2 2.2.1 2.2.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.10 3.2.11 3.2.2 3.2.3 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1 4.1.1 4.1.2 4.2 4.2.1 4.2.2 4.3 4.3.1 4.4 4.4.1 4.4.11 4.4.12 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9
image-widget / freemius / templates / plugin-info / features.php
image-widget / freemius / templates / plugin-info Last commit date
description.php 10 years ago features.php 10 years ago screenshots.php 10 years ago
features.php
81 lines
1 <?php
2 $plans = $VARS['plans'];
3
4 $features_plan_map = array();
5 foreach ( $plans as $plan ) {
6 foreach ( $plan->features as $feature ) {
7 if ( ! isset( $features_plan_map[ $feature->id ] ) ) {
8 $features_plan_map[ $feature->id ] = array( 'feature' => $feature, 'plans' => array() );
9 }
10
11 $features_plan_map[ $feature->id ]['plans'][ $plan->id ] = $feature;
12 }
13
14 // Add support as a feature.
15 if ( ! empty( $plan->support_email ) ||
16 ! empty( $plan->support_skype ) ||
17 ! empty( $plan->support_phone ) ||
18 true === $plan->is_success_manager
19 ) {
20 if ( ! isset( $features_plan_map['support'] ) ) {
21 $support_feature = new stdClass();
22 $support_feature->id = 'support';
23 $support_feature->title = __fs( 'Support' );
24 $features_plan_map[ $support_feature->id ] = array( 'feature' => $support_feature, 'plans' => array() );
25 } else {
26 $support_feature = $features_plan_map['support'];
27 }
28
29 $features_plan_map[ $support_feature->id ]['plans'][ $plan->id ] = $support_feature;
30 }
31 }
32
33 // Add updates as a feature for all plans.
34 $updates_feature = new stdClass();
35 $updates_feature->id = 'updates';
36 $updates_feature->title = __fs( 'unlimited-updates' );
37 $features_plan_map[ $updates_feature->id ] = array( 'feature' => $updates_feature, 'plans' => array() );
38 foreach ( $plans as $plan ) {
39 $features_plan_map[ $updates_feature->id ]['plans'][ $plan->id ] = $updates_feature;
40 }
41 ?>
42 <div class="fs-features">
43 <table>
44 <thead>
45 <tr>
46 <th></th>
47 <?php foreach ( $plans as $plan ) : ?>
48 <th>
49 <?php echo $plan->title ?>
50 <span class="fs-price">
51 <?php foreach ( $plan->pricing as $pricing ) : ?>
52 <?php if ( 1 == $pricing->licenses ) : ?>
53 $<?php echo $pricing->annual_price ?> / year
54 <?php endif ?>
55 <?php endforeach ?>
56 </span>
57 </th>
58 <?php endforeach ?>
59 </tr>
60 </thead>
61 <tbody>
62 <?php $odd = true;
63 foreach ( $features_plan_map as $feature_id => $data ) : ?>
64 <tr class="fs-<?php echo $odd ? 'odd' : 'even' ?>">
65 <td><?php echo ucfirst( $data['feature']->title ) ?></td>
66 <?php foreach ( $plans as $plan ) : ?>
67 <td>
68 <?php if ( isset( $data['plans'][ $plan->id ] ) ) : ?>
69 <?php if ( ! empty( $data['plans'][ $plan->id ]->value ) ) : ?>
70 <b><?php echo $data['plans'][ $plan->id ]->value ?></b>
71 <?php else : ?>
72 <i class="dashicons dashicons-yes"></i>
73 <?php endif ?>
74 <?php endif ?>
75 </td>
76 <?php endforeach ?>
77 </tr>
78 <?php $odd = ! $odd; endforeach ?>
79 </tbody>
80 </table>
81 </div>