| Server IP : 167.235.67.158 / Your IP : 216.73.216.95 Web Server : Apache System : Linux ubuntu-8gb-nbg1-1 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : upstairsbar.co.uk ( 982) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/pawsandpatience.co.uk/wp-content/plugins/wp-smushit/core/modules/ |
Upload File : |
<?php
/**
* Abstract module class: Abstract_Module
*
* @since 3.0
* @package Smush\Core\Modules
*/
namespace Smush\Core\Modules;
use Smush\Core\Membership\Membership;
use Smush\Core\Settings;
use WP_Smush;
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Class Abstract_Module
*
* @since 3.0
*/
abstract class Abstract_Module {
/**
* Module slug.
*
* @var string
*/
protected $slug;
/**
* Whether module is pro or not.
*
* @var string
*/
protected $is_pro = false;
/**
* Settings instance.
*
* @since 3.0
* @var Settings
*/
protected $settings;
private $membership;
/**
* Abstract_Module constructor.
*
* @since 3.0
*/
public function __construct() {
$this->settings = Settings::get_instance();
$this->membership = Membership::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 ) {
return $this->settings->is_module_active( $this->slug );
}
return true;
}
/**
* Return module slug.
*
* @return string.
*/
public function get_slug() {
return $this->slug;
}
}