PluginProbe
Polylang / 3.4.2
Polylang v3.4.2
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 / integrations / integrations.php

integrations.php in Polylang 3.4.2, at integrations/integrations.php

51 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;
21
22 /**
23 * Constructor.
24 *
25 * @since 1.0
26 */
27 protected function __construct() {
28 // Loads external integrations.
29 foreach ( glob( __DIR__ . '/*/load.php', GLOB_NOSORT ) as $load_script ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
30 require_once $load_script; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
31 }
32 }
33
34 /**
35 * Access to the single instance of the class.
36 *
37 * @since 1.7
38 *
39 * @return PLL_Integrations
40 */
41 public static function instance() {
42 if ( empty( self::$instance ) ) {
43 self::$instance = new self();
44 }
45
46 return self::$instance;
47 }
48 }
49
50 class_alias( 'PLL_Integrations', 'PLL_Plugins_Compat' ); // For Backward compatibility.
51