PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
← All changes | app/src/Modules/ModulesServiceProvider.php +15 -3 1.5.21.9.2 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 2
3 3 namespace Depicter\Modules;
4 -;
4 +
5 +
5 6 use Depicter\Modules\Elementor\SliderWidget;
6 7 use WPEmerge\ServiceProviders\ServiceProviderInterface;
7 8
8 9 /**
@@ -14,8 +15,15 @@
14 15 */
15 16 public function register( $container ) {
16 17 add_action( 'plugins_loaded', [ $this, 'elementorModulesLoaded' ] );
17 18 $this->modulesLoaded();
19 +
20 + $app = $container[ WPEMERGE_APPLICATION_KEY ];
21 +
22 + $container[ 'depicter.modules.manager' ] = function () {
23 + return new Modules();
24 + };
25 + $app->alias( 'modules', 'depicter.modules.manager' );
18 26 }
19 27
20 28 public function elementorModulesLoaded() {
21 29 if( defined( 'ELEMENTOR_VERSION' ) ){
@@ -33,9 +41,9 @@
33 41
34 42 add_action( 'vc_before_init', [ $this, 'initWPBakeryModule' ] );
35 43 add_action( 'init', [ $this, 'initDiviModule' ] );
36 44
37 - // add_action( 'init', [ $this, 'loadOxygenModule' ] );
45 + add_action( 'init', [ $this, 'loadOxygenModule' ] );
38 46 }
39 47
40 48 /**
41 49 * {@inheritDoc}
@@ -98,9 +106,9 @@
98 106 }
99 107
100 108 // load common assets
101 109 \Depicter::front()->assets()->enqueueStyles();
102 - \Depicter::front()->assets()->enqueueScripts();
110 + \Depicter::front()->assets()->enqueueScripts(['player', 'iframe-resizer']);
103 111
104 112 wp_localize_script( 'wp-block-editor', 'depicterSliders',[
105 113 'list' => $list,
106 114 'ajax_url' => admin_url('admin-ajax.php'),
@@ -171,7 +179,11 @@
171 179
172 180 public function loadOxygenModule() {
173 181 if ( class_exists('\OxyEl') ) {
174 182 require_once 'Oxygen/module.php';
183 + }
184 +
185 + if ( isset( $_GET['ct_builder'] ) ) {
186 + add_action( 'wp_enqueue_scripts', [ $this, 'enqueueEditorScripts' ] );
175 187 }
176 188 }
177 189 }