Scrollreveal+cat+datenews

This commit is contained in:
2019-01-07 11:43:39 +01:00
parent e4cac3d01e
commit 762a1ad170
3158 changed files with 140699 additions and 73915 deletions
+15 -2
View File
@@ -360,7 +360,10 @@ class AdminPlugin extends Plugin
}
// Make local copy of POST.
$post = !empty($_POST) ? $_POST : [];
$post = $this->grav['uri']->post();
// Initialize Page Types
Pages::types();
// Handle tasks.
$this->admin->task = $task = !empty($post['task']) ? $post['task'] : $this->uri->param('task');
@@ -384,7 +387,17 @@ class AdminPlugin extends Plugin
$page = new Page;
$page->expires(0);
// First look in the pages provided by the Admin plugin itself
if ($this->grav['user']->authorize('admin.login')) {
$event = new Event(['page' => $page]);
$event = $this->grav->fireEvent('onAdminPage', $event);
$page = $event['page'];
if ($page->slug()) {
return $page;
}
}
// Look in the pages provided by the Admin plugin itself
if (file_exists(__DIR__ . "/pages/admin/{$self->template}.md")) {
$page->init(new \SplFileInfo(__DIR__ . "/pages/admin/{$self->template}.md"));
$page->slug(basename($self->template));