: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Abstract module class: Abstract_Module
* @package Smush\Core\Modules
namespace Smush\Core\Modules;
if ( ! defined( 'WPINC' ) ) {
abstract class Abstract_Module {
* Whether module is pro or not.
protected $is_pro = false;
* Abstract_Module constructor.
public function __construct() {
$this->settings = Settings::get_instance();
* Do not use __construct in modules, instead use init().
protected function init() {}
* Return true if the module is activated.
public function is_active() {
return (bool) $this->settings->get( $this->slug );
return WP_Smush::is_pro() && $this->settings->get( $this->slug );
public function get_slug() {