-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplugin.php
More file actions
35 lines (30 loc) · 1018 Bytes
/
Copy pathplugin.php
File metadata and controls
35 lines (30 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* EGFGames plugin metadata
*/
$plugin_info = [
'title' => 'EGFGames',
'comment' => 'Import and play Educational Game Format (.egf) packages in a course.',
'version' => '1.0.0',
'author' => 'Hervé Yvis',
'plugin_class' => 'EGFGamesPlugin',
];
if ( is_file(__DIR__.'/EGFGamesPlugin.php') )
{
require_once __DIR__.'/EGFGamesPlugin.php';
if ( class_exists('EGFGamesPlugin') )
{
try
{
$plugin = EGFGamesPlugin::create();
$plugin_info = array_merge($plugin_info, $plugin->get_info());
$plugin_info['title'] = $plugin->getToolTitle();
$plugin_info['comment'] = $plugin->get_lang('plugin_comment');
$plugin_info['plugin_class'] = 'EGFGamesPlugin';
}
catch (Throwable $e)
{
// Fallback: static $plugin_info is enough for the admin plugins screen.
}
}
}