-
Notifications
You must be signed in to change notification settings - Fork 4
/
content-editpluginpage.php
44 lines (33 loc) · 1.05 KB
/
content-editpluginpage.php
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
36
37
38
39
40
41
42
43
44
<?php
use Sunlight\Extend;
use Sunlight\Message;
use Sunlight\Page\Page;
defined('SL_ROOT') or exit;
// init editscript
$type = Page::PLUGIN;
require SL_ROOT . 'admin/action/modules/include/page-editscript-init.php';
if (!$continue) {
$output .= Message::error(_lang('global.badinput'));
return;
}
// load plugin types
$plugin_types = Page::getPluginTypes();
// check plugin availability
if (!isset($plugin_types[$type_idt])) {
$output .= Message::error(_lang('plugin.error', ['%info%' => sprintf('type_idt=', $type_idt)]), true);
return;
}
$plugin_type = $plugin_types[$type_idt];
// editscript vars
$custom_settings = '';
$custom_save_array = [];
$script = null;
Extend::call('admin.page.plugin.' . $type_idt . '.edit', Extend::args($output, [
'page' => $query,
'new' => $new,
'custom_settings' => &$custom_settings,
'custom_save_array' => &$custom_save_array,
]));
// run editscript
$custom_save_array['type_idt'] = ['type' => 'raw', 'nullable' => false];
require SL_ROOT . 'admin/action/modules/include/page-editscript.php';