Skip to content

Commit

Permalink
Fix setup and complete doc
Browse files Browse the repository at this point in the history
  • Loading branch information
herrvigg committed Apr 23, 2022
1 parent 56bdf17 commit a99964a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions modules/qtx_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,38 @@
*/
class QTX_Module {
/**
* Internal id.
*
* @var string
*/
public $id;

/**
* Name for display.
*
* @var string
*/
public $name;

/**
* @type array
* Array of required plugin(s) defined in the WP format (directory/file.php).
* If this list is not empty, the module requires at least one of the plugin(s) to be activated.
*
* @var string[]
*/
public $plugins;

/**
* Incompatible plugin in the WP format, only one or zero supported.
* If not empty, the module cannot be activated is this plugin is active.
*
* @var string|null
*/
public $incompatible;

/**
* A module can have specific admin settings.
*
* @var bool
*/
protected $has_settings;
Expand All @@ -47,7 +59,7 @@ function __construct( $fields ) {
}

/**
* Check if the module specific settings.
* Check if the module has specific settings.
*
* @return bool
*/
Expand All @@ -56,7 +68,7 @@ function has_settings() {
}

/**
* Retrieve the default enabled state for the initial admin settings.
* Retrieve the default settings for the "admin enabled state" (checkbox).
*
* @return bool
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/qtx_module_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected static function get_builtin_setup() {
[
'id' => 'events-made-easy',
'name' => 'Events Made Easy',
'plugin' => [ 'events-made-easy/events-manager.php' ],
'plugins' => [ 'events-made-easy/events-manager.php' ],
'incompatible' => 'events-made-easy-qtranslate-x/events-made-easy-qtranslate-x.php',
],
[
Expand Down

0 comments on commit a99964a

Please sign in to comment.