Skip to content

Commit

Permalink
chore: rewrite test page
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Jan 29, 2020
1 parent 9ce1ab1 commit c6c222c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 4 additions & 0 deletions elgg-plugin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

use ColdTrick\TargetBlank\Bootstrap;
use Elgg\Router\Middleware\AdminGatekeeper;

return [
'bootstrap' => Bootstrap::class,
Expand All @@ -20,6 +21,9 @@
'target_blank:test' => [
'path' => '/target_blank/test',
'resource' => 'target_blank/test',
'middleware' => [
AdminGatekeeper::class,
],
],
],
];
7 changes: 1 addition & 6 deletions views/default/resources/target_blank/test.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

elgg_admin_gatekeeper();

$body = "<a href='http://www.google.nl'>Google.nl</a><br/>";
$body .= "<a href='http://www.google.nl' style='display: none;'>Google.nl (display: none)</a><br/>";
$body .= "<a href='https://www.google.nl'>Google.nl (HTTPS)</a><br/>";
Expand All @@ -21,9 +19,6 @@
'href' => 'http://google.nl',
]);

$content = elgg_view_layout('one_column', [
'title' => elgg_echo('Test'),
echo elgg_view_page(elgg_echo('Test'), [
'content' => $body,
]);

echo elgg_view_page(elgg_echo('Test'), $content);

0 comments on commit c6c222c

Please sign in to comment.