PluginProbe
STAGGS – Product Configurator Toolkit / 3.0.1
STAGGS – Product Configurator Toolkit v3.0.1
2.9.0 3.0.0 3.0.1 trunk 1.10.0 1.11.0 1.12.0 1.12.1 1.12.2 1.12.3 1.12.4 2.0.0 2.1.0 2.10.0 2.10.1 2.11.0 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.16.0 2.2.0 2.3.0 2.4.0 All 33 releases
staggs / staggs.php

staggs.php in STAGGS – Product Configurator Toolkit 3.0.1, at staggs.php

137 lines 5.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all of the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link https://staggs.app/
12 * @since 1.0.0
13 * @package Staggs
14 *
15 * @wordpress-plugin
16 * Plugin Name: STAGGS - Product Configurator Toolkit
17 * Plugin URI: https://wordpress.org/plugins/staggs/
18 * Description: A complete toolkit to build stunning product configurators in WordPress and WooCommerce. Boost sales and increase user engagement.
19 * Version: 3.0.1
20 * Author: STAGGS
21 * Author URI: https://staggs.app/
22 * License: GPL-2.0+
23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24 * Text Domain: staggs
25 * Domain Path: /languages
26 *
27 */
28 // If this file is called directly, abort.
29 if ( !defined( 'WPINC' ) ) {
30 die;
31 }
32 if ( function_exists( 'sgg_fs' ) ) {
33 sgg_fs()->set_basename( false, __FILE__ );
34 } else {
35 if ( !function_exists( 'sgg_fs' ) ) {
36 // Create a helper function for easy SDK access.
37 function sgg_fs() {
38 global $sgg_fs;
39 if ( !isset( $sgg_fs ) ) {
40 // Include Freemius SDK.
41 require_once dirname( __FILE__ ) . '/freemius/start.php';
42 $sgg_fs = fs_dynamic_init( array(
43 'id' => '11184',
44 'slug' => 'staggs',
45 'premium_slug' => 'staggs-pro',
46 'type' => 'plugin',
47 'public_key' => 'pk_e909215d9579f064c2f55a91cbfe4',
48 'is_premium' => false,
49 'premium_suffix' => '(PRO)',
50 'has_addons' => false,
51 'has_paid_plans' => true,
52 'trial' => array(
53 'days' => 14,
54 'is_require_payment' => false,
55 ),
56 'menu' => array(
57 'slug' => 'edit.php?post_type=sgg_attribute',
58 'first-path' => 'edit.php?post_type=sgg_attribute&page=about',
59 'contact' => false,
60 'support' => false,
61 ),
62 'is_live' => true,
63 'is_org_compliant' => true,
64 ) );
65 }
66 return $sgg_fs;
67 }
68
69 // Init Freemius.
70 sgg_fs();
71 // Signal that SDK was initiated.
72 do_action( 'sgg_fs_loaded' );
73 }
74 /**
75 * Currently plugin version.
76 * Start at version 1.0.0 and use SemVer - https://semver.org
77 * Rename this for your plugin and update it as you release new versions.
78 */
79 define( 'STAGGS_VERSION', '3.0.1' );
80 define( 'STAGGS_BASE', plugin_dir_path( __FILE__ ) );
81 define( 'STAGGS_BASE_URL', plugin_dir_url( __FILE__ ) );
82 if ( 'active' == get_option( 'sgg_acf_pro_active' ) ) {
83 define( 'STAGGS_ACF', 'active' );
84 } else {
85 $staggs_cb_url = apply_filters( 'staggs_carbon_fields_url', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'vendor/htmlburger/carbon-fields/' );
86 define( 'Carbon_Fields\\URL', $staggs_cb_url );
87 }
88 /**
89 * The code that runs during plugin activation.
90 * This action is documented in includes/class-staggs-activator.php
91 */
92 function activate_staggs() {
93 require_once plugin_dir_path( __FILE__ ) . 'includes/class-staggs-activator.php';
94 Staggs_Activator::activate();
95 }
96
97 /**
98 * The code that runs during plugin deactivation.
99 * This action is documented in includes/class-staggs-deactivator.php
100 */
101 function deactivate_staggs() {
102 require_once plugin_dir_path( __FILE__ ) . 'includes/class-staggs-deactivator.php';
103 Staggs_Deactivator::deactivate();
104 }
105
106 register_activation_hook( __FILE__, 'activate_staggs' );
107 register_deactivation_hook( __FILE__, 'deactivate_staggs' );
108 /**
109 * The core plugin class that is used to define internationalization,
110 * admin-specific hooks, and public-facing site hooks.
111 */
112 require plugin_dir_path( __FILE__ ) . 'includes/class-staggs.php';
113 if ( sgg_fs()->is_plan_or_trial( 'professional' ) ) {
114 if ( file_exists( plugin_dir_path( __FILE__ ) . 'pro/includes/class-staggs-pro.php' ) ) {
115 require plugin_dir_path( __FILE__ ) . 'pro/includes/class-staggs-pro.php';
116 }
117 }
118 /**
119 * Begins execution of the plugin.
120 *
121 * Since everything within the plugin is registered via hooks,
122 * then kicking off the plugin from this point in the file does
123 * not affect the page life cycle.
124 *
125 * @since 1.0.0
126 */
127 function run_staggs() {
128 $plugin = new Staggs();
129 $plugin->run();
130 if ( sgg_fs()->is_plan_or_trial( 'professional' ) && class_exists( 'Staggs_PRO' ) ) {
131 $plugin_pro = new Staggs_PRO();
132 $plugin_pro->run();
133 }
134 }
135
136 run_staggs();
137 }