| Server IP : 54.36.91.62 / Your IP : 216.73.216.15 Web Server : Apache System : Linux webm021.cluster127.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : uxhactp ( 169076) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/uxhactp/www/wp-content/plugins/visualcomposer/visualcomposer/Modules/Elements/ |
Upload File : |
<?php
namespace VisualComposer\Modules\Elements;
if (!defined('ABSPATH')) {
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit;
}
use VisualComposer\Framework\Container;
use VisualComposer\Framework\Illuminate\Support\Module;
use VisualComposer\Helpers\Traits\WpFiltersActions;
/**
* Class Controller
* @package VisualComposer\Modules\Elements
*/
class Controller extends Container implements Module
{
use WpFiltersActions;
/**
* Controller constructor.
*/
public function __construct()
{
if (vcvenv('VCV_FT_DEFAULT_ELEMENTS_INSIDE_PLUGIN')) {
/** @see \VisualComposer\Modules\Elements\Controller::addDefaultElements */
$this->wpAddAction('vcv:api', 'addDefaultElements');
}
}
/**
* Add built-in elements into system
*
* @param $api
*/
protected function addDefaultElements($api)
{
$elementsToRegister = vchelper('DefaultElements')->all();
$urlHelper = vchelper('Url');
/** @var \VisualComposer\Modules\Elements\ApiController $elementsApi */
$elementsApi = $api->elements;
foreach ($elementsToRegister as $tag) {
$manifestPath = VCV_PLUGIN_DIR_PATH . 'elements/' . $tag . '/manifest.json';
$elementBaseUrl = $urlHelper->to('elements/' . $tag);
$elementsApi->add($manifestPath, $elementBaseUrl);
}
}
}