PluginProbe
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits / 3.0.1
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits v3.0.1
3.2.1 3.2.0 3.1.9 3.1.8 3.1.7 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.9 trunk 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 All 172 releases
master-addons / master-addons.php

master-addons.php in Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits 3.0.1, at master-addons.php

212 lines 8.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Master Addons for Elementor
5 * Description: Master Addons is easy and must have Elementor Addons for WordPress Page Builder. Clean, Modern, Hand crafted designed Addons blocks.
6 * Plugin URI: https://master-addons.com/all-widgets/
7 * Author: Jewel Theme
8 * Author URI: https://master-addons.com
9 * Text Domain: master-addons
10 * Domain Path: /languages
11 * Version: 3.0.1
12 * Elementor tested up to: 3.35.6
13 * Elementor Pro tested up to: 3.35.1
14 * Wordfence Vendor Key: qgxtflvqaabgarz4gu9nozmceloswzrg
15 *
16 */
17 // No, Direct access Sir !!!
18 if ( !defined( 'ABSPATH' ) ) {
19 exit;
20 }
21 $jltma_plugin_data = get_file_data( __FILE__, array(
22 'Version' => 'Version',
23 'Plugin Name' => 'Plugin Name',
24 'Author' => 'Author',
25 'Description' => 'Description',
26 'Plugin URI' => 'Plugin URI',
27 ), false );
28 if ( !function_exists( 'jltma_menu_params__premium_only' ) ) {
29 }
30 if ( function_exists( 'ma_el_fs' ) ) {
31 ma_el_fs()->set_basename( false, __FILE__ );
32 } elseif ( !function_exists( 'ma_el_fs' ) ) {
33 // Create a helper function for easy SDK access.
34 function ma_el_fs() {
35 global $ma_el_fs;
36 if ( !isset( $ma_el_fs ) ) {
37 // Activate multisite network integration.
38 if ( !defined( 'WP_FS__PRODUCT_4015_MULTISITE' ) ) {
39 define( 'WP_FS__PRODUCT_4015_MULTISITE', true );
40 }
41 // Include Freemius SDK.
42 require_once __DIR__ . '/lib/freemius/start.php';
43 $jltma_el_menu = array(
44 'slug' => 'master-addons-settings',
45 'first-path' => 'admin.php?page=master-addons-settings',
46 'account' => false,
47 'network' => false,
48 'support' => false,
49 'contact' => false,
50 'affiliation' => false,
51 'pricing' => true,
52 'addons' => false,
53 );
54 $ma_el_fs = fs_dynamic_init( array(
55 'id' => '4015',
56 'slug' => 'master-addons',
57 'premium_slug' => 'master-addons-pro',
58 'type' => 'plugin',
59 'public_key' => 'pk_3c9b5b4e47a06288e3500c7bf812e',
60 'premium_suffix' => 'Premium',
61 'has_affiliation' => 'selected',
62 'has_addons' => false,
63 'has_paid_plans' => true,
64 'is_org_compliant' => true,
65 'menu' => ( function_exists( 'jltma_menu_params__premium_only' ) ? jltma_menu_params__premium_only() : $jltma_el_menu ),
66 'trial' => false,
67 'is_live' => true,
68 'parallel_activation' => array(
69 'enabled' => true,
70 'premium_version_basename' => 'master-addons-pro/master-addons.php',
71 ),
72 'is_premium' => false,
73 ) );
74 }
75 return $ma_el_fs;
76 }
77
78 // Init Freemius.
79 ma_el_fs();
80 // Disable automatic plugin deactivation on activation
81 ma_el_fs()->add_filter( 'deactivate_on_activation', '__return_false' );
82 // After Freemius consent (connect or skip), go to settings page.
83 // Setup wizard runs first via admin_init redirect; by the time
84 // Freemius consent shows, the wizard is already complete.
85 ma_el_fs()->add_filter( 'after_connect_url', function ( $url ) {
86 return admin_url( 'admin.php?page=master-addons-settings' );
87 } );
88 ma_el_fs()->add_filter( 'after_skip_url', function ( $url ) {
89 return admin_url( 'admin.php?page=master-addons-settings' );
90 } );
91 // Signal that SDK was initiated.
92 do_action( 'ma_el_fs_loaded' );
93 }
94 if ( !defined( 'JLTMA' ) ) {
95 define( 'JLTMA', $jltma_plugin_data['Plugin Name'] );
96 }
97 if ( !defined( 'JLTMA_PLUGIN_AUTHOR' ) ) {
98 define( 'JLTMA_PLUGIN_AUTHOR', $jltma_plugin_data['Author'] );
99 }
100 if ( !defined( 'JLTMA_PLUGIN_DESC' ) ) {
101 define( 'JLTMA_PLUGIN_DESC', $jltma_plugin_data['Description'] );
102 }
103 if ( !defined( 'JLTMA_PLUGIN_URI' ) ) {
104 define( 'JLTMA_PLUGIN_URI', $jltma_plugin_data['Plugin URI'] );
105 }
106 if ( !defined( 'JLTMA_VER' ) ) {
107 define( 'JLTMA_VER', $jltma_plugin_data['Version'] );
108 }
109 if ( !defined( 'JLTMA_BASE' ) ) {
110 define( 'JLTMA_BASE', plugin_basename( __FILE__ ) );
111 }
112 if ( !defined( 'JLTMA_SLUG' ) ) {
113 define( 'JLTMA_SLUG', dirname( plugin_basename( __FILE__ ) ) );
114 }
115 if ( !defined( 'JLTMA_FILE' ) ) {
116 define( 'JLTMA_FILE', __FILE__ );
117 }
118 if ( !defined( 'JLTMA_PATH' ) ) {
119 define( 'JLTMA_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) );
120 }
121 if ( !defined( 'JLTMA_PLUGIN_PATH' ) ) {
122 define( 'JLTMA_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) . 'inc/admin/theme-builder' ) );
123 }
124 //Defined Constants
125 if ( !defined( 'JLTMA_BADGE' ) ) {
126 define( 'JLTMA_BADGE', '<span class="jltma-badge"></span>' );
127 }
128 if ( !defined( 'JLTMA_EXTENSION_BADGE' ) ) {
129 define( 'JLTMA_EXTENSION_BADGE', '<span class="jltma-icon-ma"></span>' );
130 }
131 if ( !defined( 'JLTMA_PRO_RESTRICTED_CLASS' ) ) {
132 define( 'JLTMA_PRO_RESTRICTED_CLASS', '<span class="jltma-pro-disabled"></span>' );
133 }
134 if ( !defined( 'JLTMA_NEW_FEATURE' ) ) {
135 define( 'JLTMA_NEW_FEATURE', '<span class="jltma-new-feature"></span>' );
136 }
137 if ( !defined( 'JLTMA_SCRIPT_SUFFIX' ) ) {
138 define( 'JLTMA_SCRIPT_SUFFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min' ) );
139 }
140 if ( !defined( 'JLTMA_URL' ) ) {
141 define( 'JLTMA_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
142 }
143 if ( !defined( 'JLTMA_IMAGE_DIR' ) ) {
144 define( 'JLTMA_IMAGE_DIR', trailingslashit( JLTMA_URL ) . 'assets/images/' );
145 }
146 if ( !defined( 'JLTMA_ASSETS' ) ) {
147 define( 'JLTMA_ASSETS', trailingslashit( JLTMA_URL ) . 'assets/' );
148 }
149 if ( !defined( 'JLTMA_ADMIN_ASSETS' ) ) {
150 define( 'JLTMA_ADMIN_ASSETS', JLTMA_URL . '/inc/admin/assets/' );
151 }
152 if ( !defined( 'JLTMA_ADDONS' ) ) {
153 define( 'JLTMA_ADDONS', plugin_dir_path( __FILE__ ) . 'addons/' );
154 }
155 if ( !defined( 'JLTMA_PRO_EXTENSIONS' ) ) {
156 define( 'JLTMA_PRO_EXTENSIONS', plugin_dir_path( __FILE__ ) . 'premium/modules/' );
157 }
158 if ( !defined( 'JLTMA_TEMPLATES' ) ) {
159 define( 'JLTMA_TEMPLATES', plugin_dir_path( __FILE__ ) . 'inc/template-parts/' );
160 }
161 if ( !defined( 'JLTMA_NF' ) ) {
162 define( 'JLTMA_NF', '<span class="jltma-new-control"></span>' );
163 }
164 if ( !defined( 'JLTMA_NETWORK_ACTIVATED' ) ) {
165 if ( !function_exists( 'is_plugin_active_for_network' ) ) {
166 require_once ABSPATH . '/wp-admin/includes/plugin.php';
167 }
168 if ( is_plugin_active_for_network( 'master-addons/master-addons.php' ) || is_plugin_active_for_network( 'master-addons-pro/master-addons.php' ) ) {
169 define( "JLTMA_NETWORK_ACTIVATED", true );
170 } else {
171 define( "JLTMA_NETWORK_ACTIVATED", false );
172 }
173 }
174 // Load the main class (autoloader is embedded within)
175 if ( !class_exists( '\\MasterAddons\\Master_Elementor_Addons' ) ) {
176 require_once __DIR__ . '/class-master-elementor-addons.php';
177 }
178 // Activation and Deactivation hooks
179 if ( class_exists( '\\MasterAddons\\Master_Elementor_Addons' ) ) {
180 register_activation_hook( __FILE__, array('\\MasterAddons\\Master_Elementor_Addons', 'jltma_plugin_activation_hook') );
181 register_deactivation_hook( __FILE__, array('\\MasterAddons\\Master_Elementor_Addons', 'jltma_plugin_deactivation_hook') );
182 // Initialize the plugin
183 \MasterAddons\Master_Elementor_Addons::get_instance();
184 }
185 // Global helper for chainable settings access
186 // Usage: jltma_settings()->addons->get('key')
187 if ( !function_exists( 'jltma_settings' ) ) {
188 function jltma_settings() {
189 return \MasterAddons\Inc\Admin\Settings\Settings::instance();
190 }
191
192 }
193 // Backward-compat: old Pro plugins (< 3.0.0) call jltma_get_options()
194 // which was removed in the v3.0.0 refactor. This wrapper prevents fatal
195 // errors when free v3.0.0+ runs alongside an outdated pro plugin.
196 if ( !function_exists( 'jltma_get_options' ) ) {
197 function jltma_get_options( $key, $network_override = true ) {
198 if ( class_exists( '\\MasterAddons\\Inc\\Classes\\Utils' ) ) {
199 return \MasterAddons\Inc\Classes\Utils::get_options( $key, $network_override );
200 }
201 return get_option( $key );
202 }
203
204 }
205 // Backward-compat: old Pro plugins (< 3.0.0) call jltma_check_options()
206 // which was renamed to jltma_settings() in v3.0.0.
207 if ( !function_exists( 'jltma_check_options' ) ) {
208 function jltma_check_options() {
209 return jltma_settings();
210 }
211
212 }