PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.3.5
Pods – Custom Content Types and Fields v3.3.5
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 / src / Pods / Admin / Service_Provider.php
pods / src / Pods / Admin Last commit date
Config 4 months ago Service_Provider.php 4 months ago Settings.php 4 months ago
Service_Provider.php
44 lines
1 <?php
2
3 namespace Pods\Admin;
4
5 // Don't load directly.
6 if ( ! defined( 'ABSPATH' ) ) {
7 die( '-1' );
8 }
9
10 use Pods\Admin\Config\Pod;
11 use Pods\Admin\Config\Group;
12 use Pods\Admin\Config\Field;
13
14 /**
15 * Class Service_Provider.
16 *
17 * @since 2.8.0
18 */
19 class Service_Provider extends \Pods\Service_Provider_Base {
20
21 /**
22 * Registers the classes and functionality needed for Admin configs.
23 *
24 * @since 2.8.0
25 */
26 public function register() {
27 $this->container->singleton( Pod::class, Pod::class );
28 $this->container->singleton( Group::class, Group::class );
29 $this->container->singleton( Field::class, Field::class );
30 $this->container->singleton( Settings::class, Settings::class );
31
32 $this->hooks();
33 }
34
35 /**
36 * Hooks all the methods and actions the class needs.
37 *
38 * @since 2.8.0
39 */
40 protected function hooks() {
41 add_action( 'pods_admin_settings_init', $this->container->callback( Settings::class, 'hook' ) );
42 }
43 }
44