| 1 |
<?php |
| 2 |
|
| 3 |
namespace FileBird\Support; |
| 4 |
|
| 5 |
defined( 'ABSPATH' ) || exit; |
| 6 |
|
| 7 |
final class SupportController { |
| 8 |
public function __construct() { |
| 9 |
$this->init(); |
| 10 |
} |
| 11 |
|
| 12 |
public function get_plugin_support() { |
| 13 |
$plugins = apply_filters( |
| 14 |
'fbv_support', |
| 15 |
array( |
| 16 |
'WPML', |
| 17 |
'Polylang', |
| 18 |
'DocumentGallery', |
| 19 |
'ACF', |
| 20 |
'PageBuilders', |
| 21 |
) |
| 22 |
); |
| 23 |
|
| 24 |
return $plugins; |
| 25 |
} |
| 26 |
|
| 27 |
public function init() { |
| 28 |
$plugins = $this->get_plugin_support(); |
| 29 |
|
| 30 |
foreach ( $plugins as $plugin ) { |
| 31 |
$plugin_class = __NAMESPACE__ . "\\{$plugin}"; |
| 32 |
new $plugin_class(); |
| 33 |
} |
| 34 |
} |
| 35 |
} |