New plugin HTML Code
This commit is contained in:
parent
4baa55c7a0
commit
6fb9dcda85
7
bl-plugins/html-code/languages/en.json
Normal file
7
bl-plugins/html-code/languages/en.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"plugin-data":
|
||||
{
|
||||
"name": "HTML Code",
|
||||
"description": "Add HTML, CSS or Javascript code in the header or footer of your site."
|
||||
}
|
||||
}
|
10
bl-plugins/html-code/metadata.json
Normal file
10
bl-plugins/html-code/metadata.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Bludit",
|
||||
"email": "",
|
||||
"website": "https://plugins.bludit.com",
|
||||
"version": "2.1",
|
||||
"releaseDate": "2017-06-15",
|
||||
"license": "MIT",
|
||||
"compatible": "2.1",
|
||||
"notes": ""
|
||||
}
|
37
bl-plugins/html-code/plugin.php
Normal file
37
bl-plugins/html-code/plugin.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
class pluginHTMLCode extends Plugin {
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->dbFields = array(
|
||||
'header'=>'',
|
||||
'footer'=>''
|
||||
);
|
||||
}
|
||||
|
||||
public function form()
|
||||
{
|
||||
$html = '<div>';
|
||||
$html .= '<label>Header</label>';
|
||||
$html .= '<textarea name="header" id="jsheader">'.$this->getValue('header').'</textarea>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= '<div>';
|
||||
$html .= '<label>Footer</label>';
|
||||
$html .= '<textarea name="footer" id="jsfooter">'.$this->getValue('footer').'</textarea>';
|
||||
$html .= '</div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function siteHead()
|
||||
{
|
||||
return html_entity_decode($this->getValue('header'));
|
||||
}
|
||||
|
||||
public function siteBodyEnd()
|
||||
{
|
||||
return html_entity_decode($this->getValue('footer'));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user