final class ITSEC_Storage { private $option = 'itsec-storage'; private static $instance = false; private $changed = false; private $cache; private $shutdown_done = false; private function __construct() { $this->load(); register_shutdown_function( array( $this, 'shutdown' ) ); add_action( 'shutdown', array( $this, 'shutdown' ), -10 ); add_action( 'itsec-lib-clear-caches', array( $this, 'save' ), -20 ); add_action( 'itsec-lib-clear-caches', array( $this, 'load' ), -10 ); } private static function get_instance() { if ( false === self::$instance ) { self::$instance = new self(); } return self::$instance; } public static function get( $name ) { $data = self::get_instance(); if ( isset( $data->cache[$name] ) ) { return $data->cache[$name]; } return null; } public static function get_all() { $data = self::get_instance(); return $data->cache; } public static function set( $name, $value ) { $data = self::get_instance(); $data->cache[$name] = $value; $data->changed = true; if ( $data->shutdown_done ) { self::save(); } } public static function set_all( $value ) { $data = self::get_instance(); $data->cache = $value; $data->changed = true; if ( $data->shutdown_done ) { self::save(); } } public static function save() { $data = self::get_instance(); if ( ! $data->changed ) { return true; } $data->changed = false; if ( is_multisite() ) { return update_site_option( $data->option, $data->cache ); } else { return update_option( $data->option, $data->cache ); } } public static function reload() { $data = self::get_instance(); $data->load(); } public function load() { $this->cache = get_site_option( $this->option ); if ( ! is_array( $this->cache ) ) { $this->cache = array(); } } public function shutdown() { self::save(); $this->shutdown_done = true; } } final class ITSEC_Lib_User_Activity { private static $instance; private $user_id = false; private function __construct() { if ( did_action( 'init' ) ) { $this->identify_user(); } else { add_action( 'init', array( $this, 'identify_user' ) ); } } public static function get_instance() { if ( ! self::$instance ) { self::$instance = new self; } return self::$instance; } public function get_last_seen( $user_id = false ) { if ( false === $user_id ) { $user_id = get_current_user_id(); } if ( 0 === $user_id ) { return false; } return get_user_meta( $user_id, 'itsec_user_activity_last_seen', true ); } public function identify_user() { $this->user_id = get_current_user_id(); if ( 0 !== $this->user_id ) { add_action( 'shutdown', array( $this, 'update_last_seen' ), 0 ); } } public function update_last_seen() { $last_seen = $this->get_last_seen( $this->user_id ); if ( $last_seen < time() - HOUR_IN_SECONDS ) { update_user_meta( $this->user_id, 'itsec_user_activity_last_seen', time() ); delete_user_meta( $this->user_id, 'itsec_user_activity_last_seen_notification_sent' ); } } } ITSEC_Lib_User_Activity::get_instance();
Fatal error: Class 'ITSEC_Storage' not found in /home/mitrok/domains/wynajem-autolaweta.pl/public_html/wp-content/plugins/better-wp-security/core/lib/settings.php on line 84