1 | <?php |
||
23 | final class Compatibility { |
||
24 | |||
25 | /** |
||
26 | * The single instance of the plugin class |
||
27 | * |
||
28 | * @var object |
||
29 | * @since 2.0.0 |
||
30 | */ |
||
31 | protected static $_instance = null; |
||
32 | |||
33 | /** |
||
34 | * Array of compatibility modules class instances |
||
35 | * |
||
36 | * @var array |
||
37 | * @since 2.4.0 |
||
38 | */ |
||
39 | protected static $modules = null; |
||
40 | |||
41 | /** |
||
42 | * Class constructor |
||
43 | * |
||
44 | * @global object $wp_embed |
||
45 | * @since 2.0.0 |
||
46 | */ |
||
47 | protected function __construct() { |
||
51 | |||
52 | /** |
||
53 | * Prevent the class from being cloned |
||
54 | * |
||
55 | * @return void |
||
56 | * @since 2.0.0 |
||
57 | */ |
||
58 | protected function __clone() { |
||
61 | |||
62 | /** |
||
63 | * Return the single class instance |
||
64 | * |
||
65 | * @return object |
||
66 | * @since 2.0.0 |
||
67 | */ |
||
68 | public static function instance() { |
||
74 | |||
75 | /** |
||
76 | * Return the instance of a compatibility class module, given its slug |
||
77 | * |
||
78 | * @param string $slug Slug of instance. |
||
79 | * @return object |
||
80 | * @since 3.0.0 |
||
81 | */ |
||
82 | public static function module( $slug ) { |
||
85 | |||
86 | /** |
||
87 | * Load compatibility code for other plugins |
||
88 | * |
||
89 | * @uses apply_filters() |
||
90 | * @uses plugin_dir_path() |
||
91 | * |
||
92 | * @return void |
||
93 | * @since 2.0.0 |
||
94 | */ |
||
95 | public function load_plugins() { |
||
111 | |||
112 | /** |
||
113 | * Load compatibility code for previous WordPress versions |
||
114 | * |
||
115 | * @uses get_bloginfo() |
||
116 | * @uses plugin_dir_path() |
||
117 | * |
||
118 | * @return void |
||
119 | * @since 2.0.0 |
||
120 | */ |
||
121 | public function load_wordpress() { |
||
129 | |||
130 | /** |
||
131 | * Get path for compatibility code files |
||
132 | * |
||
133 | * @uses plugin_dir_path() |
||
134 | * |
||
135 | * @param string $folder Folder containing the file to be loaded. |
||
136 | * @return string |
||
137 | * @since 3.0.0 |
||
138 | */ |
||
139 | public static function get_path( $folder = '' ) { |
||
146 | |||
147 | /** |
||
148 | * Get instance of a compatibility module |
||
149 | * |
||
150 | * @param string $folder Folder containing the file to be loaded. |
||
151 | * @param string $slug Slug of the file to be loaded. |
||
152 | * @since 3.0.0 |
||
153 | */ |
||
154 | public static function create_module_instance( $folder, $slug ) { |
||
158 | |||
159 | } // END class |
||
160 | |||
162 |