This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstaCraftPlugin.php
100 lines (90 loc) · 1.83 KB
/
InstaCraftPlugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
namespace Craft;
/**
* InstaCraft
*
* @author Bram Mittendorff <[email protected]>
* @copyright Copyright (c) 2016, Bram Mittendorff
* @license MIT
*
* @link https://github.com/brammittendorff/
*/
class InstaCraftPlugin extends BasePlugin
{
/**
* Get plugin name.
*
* @return string
*/
public function getName()
{
return Craft::t('InstaCraft');
}
/**
* Get plugin description.
*
* @return string
*/
public function getDescription()
{
return Craft::t('An automatically instagram image puller for Craft CMS without OAuth');
}
/**
* Get plugin version.
*
* @return string
*/
public function getVersion()
{
return '1.0.5';
}
/**
* Get plugin developer.
*
* @return string
*/
public function getDeveloper()
{
return 'Bram Mittendorff';
}
/**
* Get plugin developer url.
*
* @return string
*/
public function getDeveloperUrl()
{
return 'https://www.nerds.company';
}
/**
* Get plugin documentation url.
*
* @return string
*/
public function getDocumentationUrl()
{
return 'https://github.com/brammittendorff/instacraft';
}
/**
* Has Control Panel section.
*
* @return bool
*/
public function hasCpSection()
{
return true;
}
protected function defineSettings()
{
return array(
'cronjobUrl' => array(AttributeType::String, 'default' => ''),
'cronjobFolderId' => array(AttributeType::String, 'default' => '')
);
}
public function getSettingsHtml()
{
return craft()->templates->render('instacraft/settings', array(
'settings' => $this->getSettings()
));
}
}