: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* @copyright Copyright (c) 2015, Freemius, Inc.
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
if ( ! defined( 'ABSPATH' ) ) {
define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
private static $_instance;
public static function instance() {
if ( ! isset( self::$_instance ) ) {
self::$_instance = new FS_Security();
self::$_logger = FS_Logger::get_logger(
private function __construct() {
* @param \FS_Scope_Entity $entity
function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
* @param \FS_Scope_Entity $entity
* @param int|bool $timestamp
function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
if ( false === $timestamp ) {
's_ctx_type' => $entity->get_type(),
's_ctx_id' => $entity->id,
's_ctx_ts' => $timestamp,
's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),