PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.0.3
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.0.3
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
buttonizer-multifunctional-button / freemius / templates / plugin-info / features.php

features.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.0.3, at freemius/templates/plugin-info/features.php

99 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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_text( '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_text( '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>