| 1 |
<?php // phpcs:ignore Squiz.Commenting.FileComment.Missing -- File doc comment exists |
| 2 |
/** |
| 3 |
* Analytify Settings Promo Trait |
| 4 |
* |
| 5 |
* This trait handles promotional content and pro feature displays in the settings. |
| 6 |
* It was created to separate promotional logic from the main settings class, |
| 7 |
* making it easier to manage and update promotional content. |
| 8 |
* |
| 9 |
* PURPOSE: |
| 10 |
* - Displays pro feature promotions |
| 11 |
* - Manages upgrade messaging |
| 12 |
* - Handles feature comparison displays |
| 13 |
* - Provides promotional content rendering |
| 14 |
* |
| 15 |
* @package WP_Analytify |
| 16 |
* @subpackage Settings |
| 17 |
* @since 8.0.0 |
| 18 |
*/ |
| 19 |
|
| 20 |
trait Analytify_Settings_Promo { |
| 21 |
/** |
| 22 |
* Get pro features HTML. |
| 23 |
* |
| 24 |
* @return string |
| 25 |
*/ |
| 26 |
public function pro_features() { |
| 27 |
$html = ' <div class="pro-feature-wrapper" >'; |
| 28 |
ob_start(); |
| 29 |
?> |
| 30 |
|
| 31 |
<p > Tweet us <a href="https://twitter.com/analytify" style="text-decoration:none;"> @analytify </a> and Like us <a href="https://fb.com/analytify" style="text-decoration:none;">@analytify</a> </p> |
| 32 |
<table class="wa_feature_table"> |
| 33 |
<tbody> |
| 34 |
<tr> |
| 35 |
<th>Features</th> |
| 36 |
<th>Free</th> |
| 37 |
<th>Pro</th> |
| 38 |
</tr> |
| 39 |
<tr> |
| 40 |
<td><strong>Support</strong></td> |
| 41 |
<td>No</td> |
| 42 |
<td>Yes</td> |
| 43 |
</tr> |
| 44 |
<tr> |
| 45 |
<td><strong>Dashboard</strong></td> |
| 46 |
<td>Yes (limited)</td> |
| 47 |
<td>Yes (Advanced)</td> |
| 48 |
</tr> |
| 49 |
<tr> |
| 50 |
<td><strong>Live Stats</strong></td> |
| 51 |
<td>No</td> |
| 52 |
<td>Yes</td> |
| 53 |
</tr> |
| 54 |
<tr> |
| 55 |
<td><strong>Comparison Stats</strong></td> |
| 56 |
<td>No</td> |
| 57 |
<td>Yes</td> |
| 58 |
</tr> |
| 59 |
<tr> |
| 60 |
<td><strong>ShortCodes</strong></td> |
| 61 |
<td>No</td> |
| 62 |
<td>Yes</td> |
| 63 |
</tr> |
| 64 |
|
| 65 |
<tr> |
| 66 |
<td><strong>Extensions</strong></td> |
| 67 |
<td>No</td> |
| 68 |
<td>Yes</td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<td><strong>Analytics under Posts (admin)</strong></td> |
| 72 |
<td>Yes (limited)</td> |
| 73 |
<td>Yes (Advanced)</td> |
| 74 |
</tr> |
| 75 |
<tr> |
| 76 |
<td><strong>Analytics under Pages (admin)</strong></td> |
| 77 |
<td>Yes (limited)</td> |
| 78 |
<td>Yes (Advanced)</td> |
| 79 |
</tr> |
| 80 |
<tr> |
| 81 |
<td><strong>Analytics under Custom Post Types (front/admin)</strong></td> |
| 82 |
<td>No</td> |
| 83 |
<td>Yes</td> |
| 84 |
</tr> |
| 85 |
</tbody> |
| 86 |
</table> |
| 87 |
<div class="postbox-container side"> |
| 88 |
<div class="metabox-holder"> |
| 89 |
|
| 90 |
<div class="grids_auto_size wpa_side_box" style="width: 100%;"> |
| 91 |
<div class="grid_title cen"> UPGRADE to PRO </div> |
| 92 |
|
| 93 |
<div class="grid_footer cen" style="background-color:white;"> |
| 94 |
<a href="https://analytify.io/upgrade-from-free" title="Analytify Support">Buy Now</a> the PRO version of Analytify and get tons of benefits including premium features, support and updates. |
| 95 |
</div> |
| 96 |
</div> |
| 97 |
<div class="grids_auto_size wpa_side_box" style=" width: 100%;"> |
| 98 |
<div class="grid_footer cen"> |
| 99 |
made with ♥ by <a href="https://wpbrigade.com" title="WPBrigade | A Brigade of WordPress Developers." />WPBrigade</a> |
| 100 |
</div> |
| 101 |
</div> |
| 102 |
</div> |
| 103 |
</div> |
| 104 |
|
| 105 |
<?php |
| 106 |
$inner_html = ob_get_clean(); |
| 107 |
$html .= apply_filters( 'free-pro-features', $inner_html ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores -- Hook name maintained for backwards compatibility |
| 108 |
echo '</div>'; |
| 109 |
return $html; |
| 110 |
} |
| 111 |
} |
| 112 |
|
| 113 |
|
| 114 |
|