PluginProbe
Elementor Website Builder – more than just a page builder / 4.0.0-beta1
Elementor Website Builder – more than just a page builder v4.0.0-beta1
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 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 All 457 releases
← All changes | vendor/elementor/wp-one-package/src/Connect/Facade.php +4 -40 4.2.0-dev2 → 4.0.0-beta1 View file →
@@ -3,9 +3,8 @@
3 3 namespace ElementorOne\Connect;
4 4
5 5 use ElementorOne\Connect\Classes\Data;
6 6 use ElementorOne\Connect\Classes\Utils;
7 -use ElementorOne\Connect\Classes\HomeUrl;
8 7 use ElementorOne\Connect\Classes\Service;
9 8 use ElementorOne\Logger;
10 9
11 10 if ( ! defined( 'ABSPATH' ) ) {
@@ -45,13 +44,8 @@
45 44 */
46 45 private Service $service;
47 46
48 47 /**
49 - * @var HomeUrl HomeUrl instance
50 - */
51 - private HomeUrl $home_url;
52 -
53 - /**
54 48 * @var Logger Logger instance
55 49 */
56 50 private Logger $logger;
57 51
@@ -157,25 +151,8 @@
157 151 return apply_filters( 'elementor_one/get_connect_instance', $instance, $plugin_slug, self::$instances );
158 152 }
159 153
160 154 /**
161 - * Get a Facade instance by admin page
162 - *
163 - * @param string $plugin_page The admin page slug
164 - * @return Facade|null The facade instance or null if not found
165 - */
166 - public static function get_by_plugin_page( string $plugin_page ): ?Facade {
167 - foreach ( self::$instances as $instance ) {
168 - $admin_page = $instance->get_config( 'admin_page' );
169 - $normalized_plugin_page = explode( 'page=', $admin_page, 2 )[1] ?? $admin_page;
170 - if ( $normalized_plugin_page === $plugin_page ) {
171 - return $instance;
172 - }
173 - }
174 - return null;
175 - }
176 -
177 - /**
178 155 * Get a Facade instance by plugin_slug or throw exception if not found
179 156 *
180 157 * @param string $plugin_slug The plugin slug
181 158 * @return Facade The facade instance
@@ -239,17 +216,14 @@
239 216
240 217 // Create Service instance
241 218 $this->service = new Service( $this );
242 219
243 - // Create HomeUrl instance
244 - $this->home_url = new HomeUrl( $this );
245 -
246 220 // Create Logger instance with app name
247 221 $this->logger = new Logger( $this->config['app_name'] );
248 222 }
249 223
250 224 /**
251 - * Initialize routes and components
225 + * Initialize routes and handlers
252 226 * Called automatically by constructor
253 227 *
254 228 * @return void
255 229 */
@@ -254,9 +228,9 @@
254 228 * @return void
255 229 */
256 230 private function init(): void {
257 231 $this->init_routes();
258 - $this->init_components();
232 + $this->init_handler();
259 233 }
260 234
261 235 /**
262 236 * Get Data instance
@@ -285,17 +259,8 @@
285 259 return $this->service;
286 260 }
287 261
288 262 /**
289 - * Get HomeUrl instance
290 - *
291 - * @return HomeUrl
292 - */
293 - public function home_url(): HomeUrl {
294 - return $this->home_url;
295 - }
296 -
297 - /**
298 263 * Get Logger instance
299 264 *
300 265 * @return Logger
301 266 */
@@ -333,13 +298,12 @@
333 298 new \ElementorOne\Connect\Controllers\Authorization( $this );
334 299 }
335 300
336 301 /**
337 - * Initialize components
302 + * Initialize auth handler
338 303 *
339 304 * @return void
340 305 */
341 - private function init_components(): void {
306 + private function init_handler(): void {
342 307 new \ElementorOne\Connect\Components\Handler( $this );
343 - new \ElementorOne\Connect\Components\License( $this );
344 308 }
345 309 }