PluginProbe ʕ •ᴥ•ʔ
Products Compare for WooCommerce / 3.6.2.6
Products Compare for WooCommerce v3.6.2.6
3.6.2.8 3.6.2.7 trunk 1.0.1 1.0.10 1.0.10.1 1.0.11 1.0.11.1 1.0.12 1.0.13 1.0.13.1 1.0.2 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 3.5 3.5.0.1 3.5.0.2 3.5.1 3.5.1.1 3.5.1.2 3.5.1.3 3.5.1.4 3.5.1.5 3.5.1.6 3.5.1.7 3.5.2 3.5.2.1 3.5.2.2 3.5.2.3 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.7.1 3.5.7.2 3.5.7.3 3.5.7.4 3.5.7.5 3.5.7.6 3.5.7.7 3.5.7.8 3.5.7.9 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.6.2.1 3.6.2.2 3.6.2.3 3.6.2.4 3.6.2.5 3.6.2.6
products-compare-for-woocommerce / berocket / libraries / feature_tab.php
products-compare-for-woocommerce / berocket / libraries Last commit date
addons 2 months ago templates 2 months ago check_init.php 2 months ago feature_tab.php 2 months ago popup.php 2 months ago tippy.php 2 months ago tutorial.php 2 months ago wpml_compatibility.php 2 months ago
feature_tab.php
52 lines
1 <?php
2 if( ! class_exists('BeRocket_framework_feature_tab') ) {
3 class BeRocket_framework_feature_tab {
4 public $info;
5 public $values;
6 public $options;
7 public $hook_name;
8 public $FILE;
9 function __construct($info, $values, $options) {
10 $this->info = $info;
11 $this->values = $values;
12 $this->options = $options;
13 if( ! empty($info['feature_template']) ) {
14 $this->FILE = $info['feature_template'];
15 } else {
16 $this->FILE = $info['plugin_dir'] . "/templates/features.php";
17 }
18 if( file_exists($this->FILE) ) {
19 add_action( 'admin_menu', array( $this, 'admin_menu' ) );
20 add_filter ( 'BeRocket_updater_menu_order_custom_post', array($this, 'menu_order_custom_post'), 5 );
21 }
22 }
23 public function admin_menu() {
24 register_setting($this->values[ 'option_page' ].'_upgrade', $this->values[ 'settings_name' ].'_upgrade');
25 if ( method_exists( 'BeRocket_updater', 'get_plugin_count' ) ) {
26 add_submenu_page(
27 'berocket_account',
28 __( 'Upgrade to Premium ', 'BeRocket_domain' ) . ' ' . $this->info[ 'norm_name' ] ,
29 __( 'Upgrade', 'BeRocket_domain' ),
30 'manage_berocket',
31 $this->values[ 'option_page' ].'_upgrade',
32 array( $this, 'option_form' )
33 );
34
35 return false;
36 }
37
38 return true;
39 }
40 public function option_form() {
41 echo '<div class="wrap">';
42 echo '<h3>' . __( 'Premium', 'BeRocket_domain' ) . ' ' . $this->info[ 'norm_name' ] . ' ' . __( 'Features', 'BeRocket_domain' ).'</h3>';
43 include $this->FILE;
44 echo '</div>';
45 }
46 public function menu_order_custom_post($compatibility) {
47 $compatibility[$this->values[ 'option_page' ].'_upgrade'] = $this->values[ 'option_page' ];
48 return $compatibility;
49 }
50 }
51 }
52