PluginProbe
Polylang / 3.8.5
Polylang v3.8.5
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / src / integrations / integrations.php

integrations.php in Polylang 3.8.5, at src/integrations/integrations.php

62 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Polylang
4 */
5
6 /**
7 * Container for 3rd party plugins ( and themes ) integrations.
8 * This class is available as soon as the plugin is loaded.
9 *
10 * @since 1.0
11 * @since 2.8 Renamed from PLL_Plugins_Compat to PLL_Integrations.
12 */
13 #[AllowDynamicProperties]
14 class PLL_Integrations {
15 /**
16 * Singleton instance.
17 *
18 * @var PLL_Integrations|null
19 */
20 protected static $instance = null;
21
22 /**
23 * Constructor.
24 *
25 * @since 1.0
26 */
27 protected function __construct() {}
28
29 /**
30 * Returns the single instance of the class.
31 *
32 * @since 1.7
33 *
34 * @return self
35 */
36 public static function instance(): self {
37 if ( null === self::$instance ) {
38 self::$instance = new self();
39 self::$instance->init();
40 }
41
42 return self::$instance;
43 }
44
45 /**
46 * Requires integrations.
47 *
48 * @since 3.7
49 *
50 * @return void
51 */
52 protected function init(): void {
53 $load_scripts = require __DIR__ . '/integration-build.php';
54
55 foreach ( $load_scripts as $load_script ) {
56 require_once __DIR__ . "/{$load_script}/load.php";
57 }
58 }
59 }
60
61 class_alias( 'PLL_Integrations', 'PLL_Plugins_Compat' ); // For Backward compatibility.
62