mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 21:37:00 +02:00
Optimizations
This commit is contained in:
@@ -851,7 +851,7 @@ class AdminPlugin extends Plugin
|
||||
{
|
||||
$type = $e['type'] ?? null;
|
||||
if ($type === 'tools/scheduler') {
|
||||
$e['data_type'] = 'config/scheduler';
|
||||
$e['type'] = 'config/scheduler';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -600,11 +600,11 @@ class Admin
|
||||
|
||||
// Check to see if a data type is plugin-provided, before looking into core ones
|
||||
$event = $this->grav->fireEvent('onAdminData', new Event(['type' => &$type]));
|
||||
if ($event && isset($event['data_type'])) {
|
||||
if (is_string($event['data_type'])) {
|
||||
$type = $event['data_type'];
|
||||
} else {
|
||||
if ($event) {
|
||||
if (isset($event['data_type'])) {
|
||||
return $event['data_type'];
|
||||
} elseif (is_string($event['type'])) {
|
||||
$type = $event['type'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user