| 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;
/**
* Class Wp
* @package VisualComposer\Helpers
*/
class Wp implements Helper
{
private static $isMetaInput;
public function isMetaInput()
{
if (is_null(self::$isMetaInput)) {
self::$isMetaInput = version_compare('4.4', $GLOBALS['wp_version'], '<=');
}
return self::$isMetaInput;
}
public function getAllUserSettings($userId)
{
$settings = (string)get_user_option('user-settings', $userId);
if (isset($_COOKIE[ 'wp-settings-' . $userId ])) {
$cookie = preg_replace('/[^A-Za-z0-9=&_]/', '', $_COOKIE[ 'wp-settings-' . $userId ]);
// No change or both empty
if ($cookie == $settings) {
return $settings;
}
$lastSaved = (int)get_user_option('user-settings-time', $userId);
$current = isset($_COOKIE[ 'wp-settings-time-' . $userId ]) ? preg_replace(
'/[^0-9]/',
'',
$_COOKIE[ 'wp-settings-time-' . $userId ]
) : 0;
// The cookie is newer than the saved value. Update the user_option and leave the cookie as-is
if ($current > $lastSaved) {
return $cookie;
}
}
return $settings;
}
public function getUserSetting($userId, $key, $default = false)
{
$all = $this->getAllUserSettings($userId);
parse_str($all, $parsed);
return isset($parsed[ $key ]) ? $parsed[ $key ] : $default;
}
public function getUpdateVersionFromWordpressOrg()
{
require_once ABSPATH . 'wp-admin/includes/update.php';
$updatePlugins = get_plugin_updates();
return isset($updatePlugins[ VCV_PLUGIN_BASE_NAME ]) ? $updatePlugins[ VCV_PLUGIN_BASE_NAME ]->update->new_version : 0;
}
/**
* Checking version differences
* @return bool
*/
public function isUpdateNeeded()
{
return ((int)$this->getUpdateVersionFromWordpressOrg() - (int)VCV_VERSION) >= 4;
}
}