settings = Settings::get_instance(); $this->init(); } /** * Initialize the module. * * Do not use __construct in modules, instead use init(). * * @since 3.0 */ protected function init() {} /** * Return true if the module is activated. * * @return boolean */ public function is_active() { if ( $this->slug ) { if ( ! $this->is_pro ) { return (bool) $this->settings->get( $this->slug ); } else { return WP_Smush::is_pro() && $this->settings->get( $this->slug ); } } return true; } /** * Return module slug. * * @return string. */ public function get_slug() { return $this->slug; } }