| 1 |
<?php |
| 2 |
|
| 3 |
namespace VisualComposer\Modules\Vendors\Plugins; |
| 4 |
|
| 5 |
if (!defined('ABSPATH')) { |
| 6 |
header('Status: 403 Forbidden'); |
| 7 |
header('HTTP/1.1 403 Forbidden'); |
| 8 |
exit; |
| 9 |
} |
| 10 |
|
| 11 |
use VisualComposer\Framework\Container; |
| 12 |
use VisualComposer\Framework\Illuminate\Support\Module; |
| 13 |
use VisualComposer\Helpers\Traits\WpFiltersActions; |
| 14 |
|
| 15 |
/** |
| 16 |
* Backward compatibility with "NextGEN Gallery" wordPress plugin. |
| 17 |
* |
| 18 |
* @see https://wordpress.org/plugins/nextgen-gallery/ |
| 19 |
*/ |
| 20 |
class NextGenController extends Container implements Module |
| 21 |
{ |
| 22 |
use WpFiltersActions; |
| 23 |
|
| 24 |
public function __construct() |
| 25 |
{ |
| 26 |
$this->wpAddAction('plugins_loaded', 'initialize'); |
| 27 |
} |
| 28 |
|
| 29 |
protected function initialize() |
| 30 |
{ |
| 31 |
if (defined('NGG_PLUGIN_VERSION') && constant('NGG_PLUGIN_VERSION')) { |
| 32 |
$this->wpAddFilter('run_ngg_resource_manager', '__return_false'); |
| 33 |
} |
| 34 |
} |
| 35 |
} |
| 36 |
|