Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
wp-content
/
plugins
/
woocommerce
/
packages
/
action-scheduler
/
classes
/
abstracts
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php abstract class ActionScheduler_Lock { private static $locker = NULL; protected static $lock_duration = MINUTE_IN_SECONDS; public function is_locked($lock_type) { return $this->get_expiration($lock_type) >= time(); } public abstract function set($lock_type); public abstract function get_expiration($lock_type); protected function get_duration($lock_type) { return apply_filters('action_scheduler_lock_duration', self::$lock_duration, $lock_type); } public static function instance() { if (empty(self::$locker)) { $class = apply_filters('action_scheduler_lock_class', 'ActionScheduler_OptionLock'); self::$locker = new $class(); } return self::$locker; } }