File "ActionScheduler_OptionLock.php"

Full path: /home/kosmetik/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_OptionLock.php
File size: 453 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<?php

class ActionScheduler_OptionLock extends ActionScheduler_Lock
{
    public function set($lock_type)
    {
        return update_option($this->get_key($lock_type), time() + $this->get_duration($lock_type));
    }
    public function get_expiration($lock_type)
    {
        return get_option($this->get_key($lock_type));
    }
    protected function get_key($lock_type)
    {
        return sprintf('action_scheduler_lock_%s', $lock_type);
    }
}