| 1 |
<?php |
| 2 |
/** |
| 3 |
* Selection Lite |
| 4 |
* Carefully selected Elementor addons bundle, for building the most awesome websites |
| 5 |
* |
| 6 |
* @encoding UTF-8 |
| 7 |
* @version 1.12 |
| 8 |
* @copyright (C) 2018-2024 Merkulove ( https://merkulov.design/ ). All rights reserved. |
| 9 |
* @license GPLv3 |
| 10 |
* @contributors merkulove, vladcherviakov, phoenixmkua, podolianochka, viktorialev01 |
| 11 |
* @support help@merkulov.design |
| 12 |
**/ |
| 13 |
|
| 14 |
namespace Merkulove\SelectionLite\Unity; |
| 15 |
|
| 16 |
/** Exit if accessed directly. */ |
| 17 |
if ( ! defined( 'ABSPATH' ) ) { |
| 18 |
header( 'Status: 403 Forbidden' ); |
| 19 |
header( 'HTTP/1.1 403 Forbidden' ); |
| 20 |
exit; |
| 21 |
} |
| 22 |
|
| 23 |
/** |
| 24 |
* SINGLETON: Class used to implement Status Tab on plugin settings page. |
| 25 |
* |
| 26 |
* @since 1.0 |
| 27 |
* |
| 28 |
**/ |
| 29 |
final class TabPro extends Tab { |
| 30 |
|
| 31 |
/** |
| 32 |
* Slug of current tab. |
| 33 |
* |
| 34 |
* @const TAB_SLUG |
| 35 |
**/ |
| 36 |
const TAB_SLUG = 'pro'; |
| 37 |
|
| 38 |
/** |
| 39 |
* The one true StatusTab. |
| 40 |
* |
| 41 |
* @var TabPro |
| 42 |
**/ |
| 43 |
private static $instance; |
| 44 |
|
| 45 |
/** |
| 46 |
* Generate Status Tab. |
| 47 |
* |
| 48 |
* @access public |
| 49 |
* @return void |
| 50 |
**/ |
| 51 |
public function add_settings() { |
| 52 |
|
| 53 |
/** Status Tab. */ |
| 54 |
$this->add_settings_base( self::TAB_SLUG ); |
| 55 |
|
| 56 |
} |
| 57 |
|
| 58 |
/** |
| 59 |
* Render form with all settings fields. |
| 60 |
* |
| 61 |
* @since 1.0 |
| 62 |
* @access public |
| 63 |
* |
| 64 |
* @return void |
| 65 |
**/ |
| 66 |
public function do_settings() { |
| 67 |
|
| 68 |
/** No status tab, nothing to do. */ |
| 69 |
if ( ! $this->is_enabled( self::TAB_SLUG ) ) { return; } |
| 70 |
|
| 71 |
/** Render title. */ |
| 72 |
$this->render_title( self::TAB_SLUG ); |
| 73 |
|
| 74 |
/** Render fields. */ |
| 75 |
$this->do_settings_base( self::TAB_SLUG ); |
| 76 |
|
| 77 |
/** Render GO PRO */ |
| 78 |
$this->render_go_pro(); |
| 79 |
|
| 80 |
} |
| 81 |
|
| 82 |
/** |
| 83 |
* Render Purchase Code field. |
| 84 |
* |
| 85 |
* @since 1.0 |
| 86 |
* @access public |
| 87 |
**/ |
| 88 |
public function render_go_pro() { |
| 89 |
|
| 90 |
$this->render_PRO(); |
| 91 |
$this->render_FAQ(); |
| 92 |
|
| 93 |
} |
| 94 |
|
| 95 |
/** |
| 96 |
* Render GO PRO block. |
| 97 |
* |
| 98 |
* @since 1.0 |
| 99 |
* @access public |
| 100 |
**/ |
| 101 |
private function render_PRO() { |
| 102 |
?> |
| 103 |
|
| 104 |
<div class="mdp-go-pro-box"> |
| 105 |
<h3><?php esc_html_e( 'Unlock additional functionality!', 'selection-lite' ); ?></h3> |
| 106 |
<p> |
| 107 |
<?php esc_html_e( 'Selection Lite includes only few basic widgets. Go ', 'selection-lite' ); ?> |
| 108 |
<a href="https://myselection.io/lite" target="_blank"><?php esc_html_e( 'Selection PRO', 'selection-lite' ); ?></a> |
| 109 |
<?php esc_html_e( ' to get more awesome widgets. Buy a license and gain access to all hidden features.', 'selection-lite' ); ?> |
| 110 |
</p> |
| 111 |
<div class="mdp-pro-features"> |
| 112 |
<ul> |
| 113 |
<li> |
| 114 |
<i class="material-icons">label_important</i> |
| 115 |
<span>No prohibitions or restrictions</span> |
| 116 |
</li> |
| 117 |
<li> |
| 118 |
<i class="material-icons">label_important</i> |
| 119 |
<span>No limitation in widget settings</span> |
| 120 |
</li> |
| 121 |
<li> |
| 122 |
<i class="material-icons">label_important</i> |
| 123 |
<span>Elementor Header & Footer</span> |
| 124 |
</li> |
| 125 |
</ul> |
| 126 |
<ul> |
| 127 |
<li> |
| 128 |
<i class="material-icons">label_important</i> |
| 129 |
<span>50+ awesome Elementor widgets</span> |
| 130 |
</li> |
| 131 |
<li> |
| 132 |
<i class="material-icons">label_important</i> |
| 133 |
<span>200+ Elementor Templates</span> |
| 134 |
</li> |
| 135 |
<li> |
| 136 |
<i class="material-icons">label_important</i> |
| 137 |
<span>Premium Customer Support</span> |
| 138 |
</li> |
| 139 |
</ul> |
| 140 |
</div> |
| 141 |
<div class="mdp-pro-buttons"> |
| 142 |
<a href="https://1.envato.market/selection" target="_blank" class="mdp-button-pro"> |
| 143 |
<?php esc_html_e( 'Upgrade to PRO', 'selection-lite' ); ?> |
| 144 |
</a> |
| 145 |
<a href="https://myselection.io/lite#compare" target="_blank" class="mdp-button-compare"> |
| 146 |
<?php esc_html_e( 'Compare Selection', 'selection-lite' ); ?> |
| 147 |
</a> |
| 148 |
</div> |
| 149 |
|
| 150 |
</div> |
| 151 |
|
| 152 |
<?php |
| 153 |
} |
| 154 |
|
| 155 |
/** |
| 156 |
* Render FAQ block. |
| 157 |
* |
| 158 |
* @since 1.0 |
| 159 |
* @access public |
| 160 |
**/ |
| 161 |
private function render_FAQ() { |
| 162 |
?> |
| 163 |
|
| 164 |
<div class="mdp-activation-faq"> |
| 165 |
|
| 166 |
<div class="mdc-accordion" data-mdc-accordion="showfirst: true"> |
| 167 |
|
| 168 |
<h3><?php esc_html_e( 'FAQ\'S', 'selection-lite' ); ?></h3> |
| 169 |
|
| 170 |
<div class="mdc-accordion-title"> |
| 171 |
<i class="material-icons">help</i> |
| 172 |
<span class="mdc-list-item__text"><?php esc_html_e( 'Why should I go to Pro version?', 'selection-lite' ); ?></span> |
| 173 |
</div> |
| 174 |
<div class="mdc-accordion-content"> |
| 175 |
<p><?php esc_html_e( 'The Selection Pro provides ', 'selection-lite' ); ?> |
| 176 |
<a href="https://myselection.io/lite/#compare" target="_blank"><?php esc_html_e( ' advanced widgets and features', 'selection-lite' );?></a> |
| 177 |
<?php esc_html_e( 'including Elementor Header and Footer, which makes the plugin compatible with most themes and plugins. ', 'selection-lite' ); ?> |
| 178 |
</p> |
| 179 |
</div> |
| 180 |
|
| 181 |
<div class="mdc-accordion-title"> |
| 182 |
<i class="material-icons">help</i> |
| 183 |
<span class="mdc-list-item__text"><?php esc_html_e( 'Can I use one license for multiple sites?', 'selection-lite' ); ?></span> |
| 184 |
</div> |
| 185 |
<div class="mdc-accordion-content"> |
| 186 |
<p> |
| 187 |
<?php esc_html_e( 'According to the Envato rules, all products with a', 'selection-lite' ); ?> |
| 188 |
<a href="https://themeforest.net/licenses/terms/regular" target="_blank"><?php esc_html_e( 'regular license', 'selection-lite' );?></a> |
| 189 |
<?php esc_html_e( 'can be used only for one end product except the situation when several sites are used for one project. Otherwise, a separate license is needed for each site.', 'selection-lite' ); ?> |
| 190 |
</p> |
| 191 |
</div> |
| 192 |
|
| 193 |
<div class="mdc-accordion-title"> |
| 194 |
<i class="material-icons">help</i> |
| 195 |
<span class="mdc-list-item__text"><?php esc_html_e( 'Are there any restrictions in the Pro version?', 'selection-lite' ); ?></span> |
| 196 |
</div> |
| 197 |
<div class="mdc-accordion-content"> |
| 198 |
<p> |
| 199 |
<?php esc_html_e( 'You will have full access to the entire library of widgets and templates. The library is updated with new widgets and templates every month. In addition, you will get access to regular updates and new features.', 'selection-lite' ); ?> |
| 200 |
</p> |
| 201 |
</div> |
| 202 |
|
| 203 |
</div> |
| 204 |
|
| 205 |
</div> |
| 206 |
<?php |
| 207 |
} |
| 208 |
|
| 209 |
/** |
| 210 |
* Main StatusTab Instance. |
| 211 |
* Insures that only one instance of StatusTab exists in memory at any one time. |
| 212 |
* |
| 213 |
* @static |
| 214 |
* @return TabPro |
| 215 |
**/ |
| 216 |
public static function get_instance() { |
| 217 |
|
| 218 |
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof self ) ) { |
| 219 |
|
| 220 |
self::$instance = new self; |
| 221 |
|
| 222 |
} |
| 223 |
|
| 224 |
return self::$instance; |
| 225 |
|
| 226 |
} |
| 227 |
|
| 228 |
} |
| 229 |
|