: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
namespace PriyoMukul\WPNotice\Utils;
public function is_installed( $plugin ) {
if ( ! function_exists( 'get_plugins' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
$plugins = get_plugins();
return isset( $plugins[ $plugin ] ) ? $plugins[ $plugin ] : false;
return intval( current_time( 'timestamp' ) );
* Make timestamp for a number
public function strtotime( $time = '+7 day' ) {
return intval( strtotime( date( 'r', $this->time() ) . " $time" ) );
public function date( $time ) {
return date( 'd-m-Y h:i:s', $time );
private function error( $message ) {
throw new Exception( $message );