PluginProbe ʕ •ᴥ•ʔ
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more / 1.7.3
EmbedPress – PDF Embedder, Embed PDF viewer, YouTube Videos, 3D FlipBook, Social feeds & more v1.7.3
4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.10 3.9.11 3.9.12 3.9.13 3.9.14 3.9.15 3.9.16 3.9.17 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9 4.0.0 4.0.1 4.0.10 4.0.11 4.0.12 4.0.13 4.0.14 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.0 4.1.1 4.1.10 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.10 4.4.11 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5.0 4.5.1
embedpress / freemius / templates / plugin-info / features.php
embedpress / freemius / templates / plugin-info Last commit date
description.php 9 years ago features.php 9 years ago index.php 9 years ago screenshots.php 9 years ago
features.php
99 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6 * @since 1.0.6
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * @var array $VARS
15 *
16 * @var FS_Plugin $plugin
17 */
18 $plugin = $VARS['plugin'];
19
20 $plans = $VARS['plans'];
21
22 $features_plan_map = array();
23 foreach ( $plans as $plan ) {
24 foreach ( $plan->features as $feature ) {
25 if ( ! isset( $features_plan_map[ $feature->id ] ) ) {
26 $features_plan_map[ $feature->id ] = array( 'feature' => $feature, 'plans' => array() );
27 }
28
29 $features_plan_map[ $feature->id ]['plans'][ $plan->id ] = $feature;
30 }
31
32 // Add support as a feature.
33 if ( ! empty( $plan->support_email ) ||
34 ! empty( $plan->support_skype ) ||
35 ! empty( $plan->support_phone ) ||
36 true === $plan->is_success_manager
37 ) {
38 if ( ! isset( $features_plan_map['support'] ) ) {
39 $support_feature = new stdClass();
40 $support_feature->id = 'support';
41 $support_feature->title = __fs( 'Support', $plugin->slug );
42 $features_plan_map[ $support_feature->id ] = array( 'feature' => $support_feature, 'plans' => array() );
43 } else {
44 $support_feature = $features_plan_map['support'];
45 }
46
47 $features_plan_map[ $support_feature->id ]['plans'][ $plan->id ] = $support_feature;
48 }
49 }
50
51 // Add updates as a feature for all plans.
52 $updates_feature = new stdClass();
53 $updates_feature->id = 'updates';
54 $updates_feature->title = __fs( 'unlimited-updates', $plugin->slug );
55 $features_plan_map[ $updates_feature->id ] = array( 'feature' => $updates_feature, 'plans' => array() );
56 foreach ( $plans as $plan ) {
57 $features_plan_map[ $updates_feature->id ]['plans'][ $plan->id ] = $updates_feature;
58 }
59 ?>
60 <div class="fs-features">
61 <table>
62 <thead>
63 <tr>
64 <th></th>
65 <?php foreach ( $plans as $plan ) : ?>
66 <th>
67 <?php echo $plan->title ?>
68 <span class="fs-price">
69 <?php foreach ( $plan->pricing as $pricing ) : ?>
70 <?php if ( 1 == $pricing->licenses ) : ?>
71 $<?php echo $pricing->annual_price ?> / year
72 <?php endif ?>
73 <?php endforeach ?>
74 </span>
75 </th>
76 <?php endforeach ?>
77 </tr>
78 </thead>
79 <tbody>
80 <?php $odd = true;
81 foreach ( $features_plan_map as $feature_id => $data ) : ?>
82 <tr class="fs-<?php echo $odd ? 'odd' : 'even' ?>">
83 <td><?php echo ucfirst( $data['feature']->title ) ?></td>
84 <?php foreach ( $plans as $plan ) : ?>
85 <td>
86 <?php if ( isset( $data['plans'][ $plan->id ] ) ) : ?>
87 <?php if ( ! empty( $data['plans'][ $plan->id ]->value ) ) : ?>
88 <b><?php echo $data['plans'][ $plan->id ]->value ?></b>
89 <?php else : ?>
90 <i class="dashicons dashicons-yes"></i>
91 <?php endif ?>
92 <?php endif ?>
93 </td>
94 <?php endforeach ?>
95 </tr>
96 <?php $odd = ! $odd; endforeach ?>
97 </tbody>
98 </table>
99 </div>