Initial commit
This commit is contained in:
51
app/plugins/redirects/plugin.php
Normal file
51
app/plugins/redirects/plugin.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* app/plugins/feedback/plugin.php
|
||||
*
|
||||
* This houses all of the main plugin info and functionality.
|
||||
*
|
||||
* @package TP Feedback
|
||||
* @version 3.0
|
||||
* @author Joey Kimsey <Joey@thetempusproject.com>
|
||||
* @link https://TheTempusProject.com
|
||||
* @license https://opensource.org/licenses/MIT [MIT LICENSE]
|
||||
*/
|
||||
namespace TheTempusProject\Plugins;
|
||||
|
||||
use ReflectionClass;
|
||||
use TheTempusProject\Classes\Installer;
|
||||
use TheTempusProject\Houdini\Classes\Navigation;
|
||||
use TheTempusProject\Classes\Plugin;
|
||||
use TheTempusProject\TheTempusProject as App;
|
||||
|
||||
class Redirects extends Plugin {
|
||||
public $pluginName = 'TP Redirects';
|
||||
public $pluginAuthor = 'JoeyK';
|
||||
public $pluginWebsite = 'https://TheTempusProject.com';
|
||||
public $modelVersion = '1.0';
|
||||
public $pluginVersion = '3.0';
|
||||
public $pluginDescription = 'A simple plugin which adds redirects.';
|
||||
public $permissionMatrix = [
|
||||
'redirects' => [
|
||||
'pretty' => 'Can modify redirects',
|
||||
'default' => false,
|
||||
],
|
||||
];
|
||||
public $admin_links = [
|
||||
[
|
||||
'text' => '<i class="fa fa-fw fa-external-link"></i> Redirects',
|
||||
'url' => '{ROOT_URL}admin/routes',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
// as long as this is in the plugin constructor, it should happen before the controller and method loading
|
||||
// $routes = new RoutesModel;
|
||||
// $route = $routes->findByOriginalUrl( $url );
|
||||
// if ( false !== $route ) {
|
||||
// if ( 'internal' === $route->redirect_type ) {
|
||||
// $this->setUrl( $route->forwarded_url );
|
||||
// } else {
|
||||
// Redirect::external( $route->forwarded_url );
|
||||
// }
|
||||
// }
|
Reference in New Issue
Block a user