PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 2.8.23.4
Pods – Custom Content Types and Fields v2.8.23.4
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / tribe-common / src / Tribe / Editor / Provider.php
pods / tribe-common / src / Tribe / Editor Last commit date
Blocks 2 weeks ago Assets.php 2 weeks ago Configuration.php 2 weeks ago Configuration_Interface.php 2 weeks ago Meta.php 2 weeks ago Meta_Interface.php 2 weeks ago Provider.php 2 weeks ago Utils.php 2 weeks ago
Provider.php
68 lines
1 <?php
2
3 class Tribe__Editor__Provider extends tad_DI52_ServiceProvider {
4
5 /**
6 * Binds and sets up implementations.
7 *
8 * @since 4.8
9 *
10 */
11 public function register() {
12 // Setup to check if gutenberg is active
13 $this->container->singleton( 'editor', 'Tribe__Editor' );
14 $this->container->singleton( 'editor.utils', 'Tribe__Editor__Utils' );
15 $this->container->singleton( 'common.editor.configuration', 'Tribe__Editor__Configuration' );
16
17 if ( ! tribe( 'editor' )->should_load_blocks() ) {
18 return;
19 }
20
21 $this->container->singleton( 'editor.assets', 'Tribe__Editor__Assets', [ 'hook' ] );
22
23 $this->hook();
24
25 // Initialize the correct Singletons
26 tribe( 'editor.assets' );
27 }
28
29 /**
30 * Any hooking any class needs happen here.
31 *
32 * In place of delegating the hooking responsibility to the single classes they are all hooked here.
33 *
34 * @since 4.8
35 *
36 */
37 protected function hook() {
38 // Setup the registration of Blocks
39 add_action( 'init', [ $this, 'register_blocks' ], 20 );
40 }
41
42 /**
43 * Prevents us from using `init` to register our own blocks, allows us to move
44 * it when the proper place shows up
45 *
46 * @since 4.8.2
47 *
48 * @return void
49 */
50 public function register_blocks() {
51 /**
52 * Internal Action used to register blocks for Events
53 *
54 * @since 4.8.2
55 */
56 do_action( 'tribe_editor_register_blocks' );
57 }
58
59 /**
60 * Binds and sets up implementations at boot time.
61 *
62 * @since 4.8
63 */
64 public function boot() {
65 // no ops
66 }
67 }
68