File Manager / wp-content Search Upload New Item Settings File "db5.php" Full path: /home1/epichome/public_html/wp-content/db5.php File size: 60.67 B (60.67 KB bytes) MIME-type: text/x-php Charset: utf-8 Download Open Edit Advanced Editor Back
<?php
class SwpmMessages {
private $messages;
private $session_key;
public function __construct() {
$this->messages = get_option('swpm-messages');
$this->session_key = $_COOKIE['swpm_session'];
}
public function get($key) {
$combined_key = $this->session_key . '_' . $key;
if (isset($this->messages[$combined_key])) {
$m = $this->messages[$combined_key];
unset($this->messages[$combined_key]);
update_option('swpm-messages', $this->messages);
return $m;
}
return '';
}
public function set($key, $value) {
$combined_key = $this->session_key . '_' . $key;
$this->messages[$combined_key] = $value;
update_option('swpm-messages', $this->messages);
}
}
