C:\xampp\htdocs\landing\wp-content\plugins\totalpoll\src\Limitations\Quota.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

namespace TotalPoll\Limitations;
defined'ABSPATH' ) && exit();



use 
TotalPollVendors\TotalCore\Limitations\Limitation;

/**
 * Quota Limitation
 * @package TotalPoll\Limitations
 */
class Quota extends Limitation {
    
/**
     * Limitation check logic.
     *
     * @return bool|\WP_Error
     */
    
public function check() {
        
        
$quota        = isset( $this->args['value'] ) ? (int) $this->args['value'] : false;
        
$currentValue = isset( $this->args['currentValue'] ) ? (int) $this->args['currentValue'] : false;
        if ( 
$quota && $quota && $quota <= $currentValue ):
            return new \
WP_Error'quota'__'This poll has ended (votes quota has been exceeded).''totalpoll' ) );
        endif;
        

        return 
true;
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586