| 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/Helpers/ |
Upload File : |
<?php
namespace VisualComposer\Helpers;
if (!defined('ABSPATH')) {
header('Status: 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
exit;
}
use VisualComposer\Framework\Illuminate\Support\Helper;
/**
* Helper class for "Page Layout" setting
*
* From the frontend we receive a field as an array:
* ```
* vcv-page-template[type]
* vcv-page-template[value]
* vcv-page-template[stretchedContent]
* ```
*
* Which further stored in a `_postmeta` table with keys:
* ```
* _vcv-page-template
* _vcv-page-template-type
* _vcv-page-template-stretch
* ```
*/
class PageLayout implements Helper
{
/**
* Get a filtered current page layout
*
* @param array $pageTemplate Pre-defined values for page template.
*
* @return array
*/
public function getCurrentPageLayout(array $pageTemplate = [])
{
$defaults = wp_parse_args($pageTemplate, [
'type' => 'vc-custom-layout',
'value' => 'default',
'stretchedContent' => 0,
]);
return vcfilter('vcv:editor:settings:pageTemplatesLayouts:current', $defaults);
}
/**
* Check if current page layout equals to "Default"
*
* @return bool
*/
public function isDefaultPageLayout()
{
$pageLayout = $this->getCurrentPageLayout();
return isset($pageLayout['type'], $pageLayout['value'])
&& $pageLayout['type'] === 'vc-custom-layout'
&& $pageLayout['value'] === 'default';
}
}