PluginProbe
Elementor Website Builder – more than just a page builder / 3.9.2
Elementor Website Builder – more than just a page builder v3.9.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/common/modules/connect/module.php +20 -47 4.2.13.9.2 View file →
@@ -4,17 +4,15 @@
4 4 use Elementor\Core\Base\Module as BaseModule;
5 5 use Elementor\Core\Common\Modules\Connect\Apps\Base_App;
6 6 use Elementor\Core\Common\Modules\Connect\Apps\Common_App;
7 7 use Elementor\Core\Common\Modules\Connect\Apps\Connect;
8 -use Elementor\Core\Common\Modules\Connect\Apps\Feedback;
9 8 use Elementor\Core\Common\Modules\Connect\Apps\Library;
10 9 use Elementor\Plugin;
11 10 use Elementor\Utils;
12 11 use WP_User_Query;
13 -use Elementor\Core\Common\Modules\Connect\Rest\Rest_Api;
14 12
15 13 if ( ! defined( 'ABSPATH' ) ) {
16 - exit; // Exit if accessed directly.
14 + exit; // Exit if accessed directly
17 15 }
18 16
19 17 class Module extends BaseModule {
20 18 const ACCESS_LEVEL_CORE = 0;
@@ -20,16 +18,8 @@
20 18 const ACCESS_LEVEL_CORE = 0;
21 19 const ACCESS_LEVEL_PRO = 1;
22 20 const ACCESS_LEVEL_EXPERT = 20;
23 21
24 - const ACCESS_TIER_FREE = 'free';
25 - const ACCESS_TIER_ESSENTIAL = 'essential';
26 - const ACCESS_TIER_ESSENTIAL_OCT_2023 = 'essential-oct2023';
27 - const ACCESS_TIER_ADVANCED = 'advanced';
28 - const ACCESS_TIER_EXPERT = 'expert';
29 - const ACCESS_TIER_AGENCY = 'agency';
30 - const ACCESS_TIER_PRO_LEGACY = 'pro';
31 -
32 22 /**
33 23 * @since 2.3.0
34 24 * @access public
35 25 */
@@ -75,9 +65,8 @@
75 65 public function __construct() {
76 66 $this->registered_apps = [
77 67 'connect' => Connect::get_class_name(),
78 68 'library' => Library::get_class_name(),
79 - 'feedback' => Feedback::get_class_name(),
80 69 ];
81 70
82 71 // When using REST API the parent module is construct after the action 'elementor/init'
83 72 // so this part of code make sure to register the module "apps".
@@ -87,10 +76,8 @@
87 76 // Note: The priority 11 is for allowing plugins to add their register callback on elementor init.
88 77 add_action( 'elementor/init', [ $this, 'init' ], 11 );
89 78 }
90 79
91 - add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
92 -
93 80 add_filter( 'elementor/tracker/send_tracking_data_params', function ( $params ) {
94 81 return $this->add_tracking_data( $params );
95 82 } );
96 83 }
@@ -124,8 +111,17 @@
124 111 }
125 112 }
126 113
127 114 /**
115 + * @deprecated 3.1.0
116 + */
117 + public function localize_settings() {
118 + Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.1.0' );
119 +
120 + return [];
121 + }
122 +
123 + /**
128 124 * Register app.
129 125 *
130 126 * Registers an app.
131 127 *
@@ -131,15 +127,15 @@
131 127 *
132 128 * @since 2.3.0
133 129 * @access public
134 130 *
135 - * @param string $slug App slug.
136 - * @param string $class_name App full class name.
131 + * @param string $slug App slug.
132 + * @param string $class App full class name.
137 133 *
138 134 * @return self The updated apps manager instance.
139 135 */
140 - public function register_app( $slug, $class_name ) {
141 - $this->registered_apps[ $slug ] = $class_name;
136 + public function register_app( $slug, $class ) {
137 + $this->registered_apps[ $slug ] = $class;
142 138
143 139 return $this;
144 140 }
145 141
@@ -194,42 +190,24 @@
194 190 *
195 191 * @return array
196 192 */
197 193 public function get_subscription_plans( $context = '' ) {
198 - $base_url = Utils::has_pro() ? 'https://my.elementor.com/upgrade-subscription' : 'https://elementor.com/pro';
199 - $promotion_url = $base_url . '/?utm_source=' . $context . '&utm_medium=wp-dash&utm_campaign=gopro';
200 -
201 194 return [
202 - static::ACCESS_TIER_FREE => [
195 + static::ACCESS_LEVEL_CORE => [
203 196 'label' => null,
204 197 'promotion_url' => null,
205 198 'color' => null,
206 199 ],
207 - static::ACCESS_TIER_ESSENTIAL => [
200 + static::ACCESS_LEVEL_PRO => [
208 201 'label' => 'Pro',
209 - 'promotion_url' => $promotion_url,
202 + 'promotion_url' => 'https://elementor.com/pro/?utm_source=' . $context . '&utm_medium=wp-dash&utm_campaign=gopro',
210 203 'color' => '#92003B',
211 204 ],
212 - static::ACCESS_TIER_ESSENTIAL_OCT_2023 => [
213 - 'label' => 'Advanced', // Should be the same label as "Advanced".
214 - 'promotion_url' => $promotion_url,
215 - 'color' => '#92003B',
216 - ],
217 - static::ACCESS_TIER_ADVANCED => [
218 - 'label' => 'Advanced',
219 - 'promotion_url' => $promotion_url,
220 - 'color' => '#92003B',
221 - ],
222 - static::ACCESS_TIER_EXPERT => [
205 + static::ACCESS_LEVEL_EXPERT => [
223 206 'label' => 'Expert',
224 - 'promotion_url' => $promotion_url,
225 - 'color' => '#92003B',
207 + 'promotion_url' => 'https://elementor.com/pro/?utm_source=' . $context . '&utm_medium=wp-dash&utm_campaign=goexpert',
208 + 'color' => '#010051',
226 209 ],
227 - static::ACCESS_TIER_AGENCY => [
228 - 'label' => 'Agency',
229 - 'promotion_url' => $promotion_url,
230 - 'color' => '#92003B',
231 - ],
232 210 ];
233 211 }
234 212
235 213 private function add_tracking_data( $params ) {
@@ -261,11 +239,6 @@
261 239 'users' => $users,
262 240 ];
263 241
264 242 return $params;
265 - }
266 -
267 - public function register_rest_routes() {
268 - $rest_api = new Rest_Api();
269 - $rest_api->register_routes();
270 243 }
271 244 }