PluginProbe
Passster – Password Protect Pages and Content / 4.3.17
Passster – Password Protect Pages and Content v4.3.17
4.3.17 4.3.16 4.3.15 4.3.14 4.3.12 4.3.13 4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 trunk 3.5.4 3.5.5.2 3.5.5.8 3.5.5.9 4.0 4.1.4 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 All 49 releases
← All changes | inc/freemius/templates/plugin-info/features.php +112 -113 4.2.10 → 4.3.17 View file →
@@ -1,114 +1,113 @@
1 -<?php
2 - /**
3 - * @package Freemius
4 - * @copyright Copyright (c) 2015, Freemius, Inc.
5 - * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
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 - if (!empty($plan->features) && is_array($plan->features)) {
25 - foreach ( $plan->features as $feature ) {
26 - if ( ! isset( $features_plan_map[ $feature->id ] ) ) {
27 - $features_plan_map[ $feature->id ] = array( 'feature' => $feature, 'plans' => array() );
28 - }
29 -
30 - $features_plan_map[ $feature->id ]['plans'][ $plan->id ] = $feature;
31 - }
32 - }
33 -
34 - // Add support as a feature.
35 - if ( ! empty( $plan->support_email ) ||
36 - ! empty( $plan->support_skype ) ||
37 - ! empty( $plan->support_phone ) ||
38 - true === $plan->is_success_manager
39 - ) {
40 - if ( ! isset( $features_plan_map['support'] ) ) {
41 - $support_feature = new stdClass();
42 - $support_feature->id = 'support';
43 - $support_feature->title = fs_text_inline( 'Support', $plugin->slug );
44 - $features_plan_map[ $support_feature->id ] = array( 'feature' => $support_feature, 'plans' => array() );
45 - } else {
46 - $support_feature = $features_plan_map['support']['feature'];
47 - }
48 -
49 - $features_plan_map[ $support_feature->id ]['plans'][ $plan->id ] = $support_feature;
50 - }
51 - }
52 -
53 - // Add updates as a feature for all plans.
54 - $updates_feature = new stdClass();
55 - $updates_feature->id = 'updates';
56 - $updates_feature->title = fs_text_inline( 'Unlimited Updates', 'unlimited-updates', $plugin->slug );
57 - $features_plan_map[ $updates_feature->id ] = array( 'feature' => $updates_feature, 'plans' => array() );
58 - foreach ( $plans as $plan ) {
59 - $features_plan_map[ $updates_feature->id ]['plans'][ $plan->id ] = $updates_feature;
60 - }
61 -?>
62 -<div class="fs-features">
63 - <table>
64 - <thead>
65 - <tr>
66 - <th></th>
67 - <?php foreach ( $plans as $plan ) : ?>
68 - <th>
69 - <?php echo $plan->title ?>
70 - <span class="fs-price"><?php
71 - if ( empty( $plan->pricing ) ) {
72 - fs_esc_html_echo_inline( 'Free', 'free', $plugin->slug );
73 - } else {
74 - foreach ( $plan->pricing as $pricing ) {
75 - /**
76 - * @var FS_Pricing $pricing
77 - */
78 - if ( 1 == $pricing->licenses ) {
79 - if ( $pricing->has_annual() ) {
80 - echo "\${$pricing->annual_price} / " . fs_esc_html_x_inline( 'year', 'as annual period', 'year', $plugin->slug );
81 - } else if ( $pricing->has_monthly() ) {
82 - echo "\${$pricing->monthly_price} / " . fs_esc_html_x_inline( 'mo', 'as monthly period', 'mo', $plugin->slug );
83 - } else {
84 - echo "\${$pricing->lifetime_price}";
85 - }
86 - }
87 - }
88 - }
89 - ?></span>
90 - </th>
91 - <?php endforeach ?>
92 - </tr>
93 - </thead>
94 - <tbody>
95 - <?php $odd = true;
96 - foreach ( $features_plan_map as $feature_id => $data ) : ?>
97 - <tr class="fs-<?php echo $odd ? 'odd' : 'even' ?>">
98 - <td><?php echo esc_html( ucfirst( $data['feature']->title ) ) ?></td>
99 - <?php foreach ( $plans as $plan ) : ?>
100 - <td>
101 - <?php if ( isset( $data['plans'][ $plan->id ] ) ) : ?>
102 - <?php if ( ! empty( $data['plans'][ $plan->id ]->value ) ) : ?>
103 - <b><?php echo esc_html( $data['plans'][ $plan->id ]->value ) ?></b>
104 - <?php else : ?>
105 - <i class="dashicons dashicons-yes"></i>
106 - <?php endif ?>
107 - <?php endif ?>
108 - </td>
109 - <?php endforeach ?>
110 - </tr>
111 - <?php $odd = ! $odd; endforeach ?>
112 - </tbody>
113 - </table>
1 +<?php
2 + /**
3 + * @package Freemius
4 + * @copyright Copyright (c) 2015, Freemius, Inc.
5 + * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
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 + if (!empty($plan->features) && is_array($plan->features)) {
25 + foreach ( $plan->features as $feature ) {
26 + if ( ! isset( $features_plan_map[ $feature->id ] ) ) {
27 + $features_plan_map[ $feature->id ] = array( 'feature' => $feature, 'plans' => array() );
28 + }
29 +
30 + $features_plan_map[ $feature->id ]['plans'][ $plan->id ] = $feature;
31 + }
32 + }
33 +
34 + // Add support as a feature.
35 + if ( ! empty( $plan->support_email ) ||
36 + ! empty( $plan->support_phone ) ||
37 + true === $plan->is_success_manager
38 + ) {
39 + if ( ! isset( $features_plan_map['support'] ) ) {
40 + $support_feature = new stdClass();
41 + $support_feature->id = 'support';
42 + $support_feature->title = fs_text_inline( 'Support', $plugin->slug );
43 + $features_plan_map[ $support_feature->id ] = array( 'feature' => $support_feature, 'plans' => array() );
44 + } else {
45 + $support_feature = $features_plan_map['support']['feature'];
46 + }
47 +
48 + $features_plan_map[ $support_feature->id ]['plans'][ $plan->id ] = $support_feature;
49 + }
50 + }
51 +
52 + // Add updates as a feature for all plans.
53 + $updates_feature = new stdClass();
54 + $updates_feature->id = 'updates';
55 + $updates_feature->title = fs_text_inline( 'Unlimited Updates', 'unlimited-updates', $plugin->slug );
56 + $features_plan_map[ $updates_feature->id ] = array( 'feature' => $updates_feature, 'plans' => array() );
57 + foreach ( $plans as $plan ) {
58 + $features_plan_map[ $updates_feature->id ]['plans'][ $plan->id ] = $updates_feature;
59 + }
60 +?>
61 +<div class="fs-features">
62 + <table>
63 + <thead>
64 + <tr>
65 + <th></th>
66 + <?php foreach ( $plans as $plan ) : ?>
67 + <th>
68 + <?php echo $plan->title ?>
69 + <span class="fs-price"><?php
70 + if ( empty( $plan->pricing ) ) {
71 + fs_esc_html_echo_inline( 'Free', 'free', $plugin->slug );
72 + } else {
73 + foreach ( $plan->pricing as $pricing ) {
74 + /**
75 + * @var FS_Pricing $pricing
76 + */
77 + if ( 1 == $pricing->licenses ) {
78 + if ( $pricing->has_annual() ) {
79 + echo "\${$pricing->annual_price} / " . fs_esc_html_x_inline( 'year', 'as annual period', 'year', $plugin->slug );
80 + } else if ( $pricing->has_monthly() ) {
81 + echo "\${$pricing->monthly_price} / " . fs_esc_html_x_inline( 'mo', 'as monthly period', 'mo', $plugin->slug );
82 + } else {
83 + echo "\${$pricing->lifetime_price}";
84 + }
85 + }
86 + }
87 + }
88 + ?></span>
89 + </th>
90 + <?php endforeach ?>
91 + </tr>
92 + </thead>
93 + <tbody>
94 + <?php $odd = true;
95 + foreach ( $features_plan_map as $feature_id => $data ) : ?>
96 + <tr class="fs-<?php echo $odd ? 'odd' : 'even' ?>">
97 + <td><?php echo esc_html( ucfirst( $data['feature']->title ) ) ?></td>
98 + <?php foreach ( $plans as $plan ) : ?>
99 + <td>
100 + <?php if ( isset( $data['plans'][ $plan->id ] ) ) : ?>
101 + <?php if ( ! empty( $data['plans'][ $plan->id ]->value ) ) : ?>
102 + <b><?php echo esc_html( $data['plans'][ $plan->id ]->value ) ?></b>
103 + <?php else : ?>
104 + <i class="dashicons dashicons-yes"></i>
105 + <?php endif ?>
106 + <?php endif ?>
107 + </td>
108 + <?php endforeach ?>
109 + </tr>
110 + <?php $odd = ! $odd; endforeach ?>
111 + </tbody>
112 + </table>
114 113 </div>