Creating new barebones plugin imgcache.
Eventually this will download and cache external images. Starting work on #27.
This commit is contained in:
32
www/plugins/jasonwilliams/imgcache/Plugin.php
Normal file
32
www/plugins/jasonwilliams/imgcache/Plugin.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace JasonWilliams\ImgCache;
|
||||
|
||||
/**
|
||||
* The plugin.php file (called the plugin initialization script) defines the plugin information class.
|
||||
*/
|
||||
|
||||
use System\Classes\PluginBase;
|
||||
|
||||
class Plugin extends PluginBase
|
||||
{
|
||||
|
||||
public function pluginDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'Image Cache',
|
||||
'description' => 'Saves external images locally and presents them via a twig filter.',
|
||||
'author' => 'Jason Williams',
|
||||
'icon' => 'oc-icon-cloud'
|
||||
];
|
||||
}
|
||||
|
||||
public function registerMarkupTags()
|
||||
{
|
||||
return [
|
||||
'filters' => [
|
||||
'imgcache' => function($imgurl) {
|
||||
return $imgurl;
|
||||
}
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user