| 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 Plugin.
*/
class Plugin implements Helper
{
/**
* Check if plugin is used certain amount of days.
*
* @param int $days
*
* @return bool
*/
public function isActivelyUsed($days = 5)
{
$optionsHelper = vchelper('Options');
$pluginActivationDate = $optionsHelper->get('plugin-activation');
if (!empty($pluginActivationDate) && ((int)$pluginActivationDate + ($days * DAY_IN_SECONDS)) < time()) {
// More than 1 month used current license-type
return true;
}
return false;
}
/**
* Check if user has certain amount of posts.
*
* @param $posts
*
* @return bool
*/
public function isHasCertainPostsNumber($posts = 3)
{
$vcvPosts = new \WP_Query(
[
'post_type' => 'any',
'post_status' => ['publish', 'pending', 'draft', 'auto-draft', 'future', 'private'],
'posts_per_page' => $posts,
'meta_key' => VCV_PREFIX . 'pageContent',
'suppress_filters' => true,
]
);
// @codingStandardsIgnoreLine
return (int)$vcvPosts->found_posts >= $posts;
}
}