forked from franck-paul/googleTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_install.php
executable file
·30 lines (25 loc) · 923 Bytes
/
_install.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
<?php
/**
* @brief googleTools, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugins
*
* @author xave and contributors
*
* @copyright xave
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return;
}
$this_version = (string) dcCore::app()->plugins->moduleInfo('googlestuff', 'version');
$installed_version = (string) dcCore::app()->getVersion('googlestuff');
if (version_compare($installed_version, $this_version, '>=')) {
return;
}
dcCore::app()->blog->settings->addNamespace('googlestuff');
dcCore::app()->blog->settings->googlestuff->put('googlestuff_uacct', '', 'string', 'Google Analytics PageTracker ID', true, true);
dcCore::app()->blog->settings->googlestuff->put('googlestuff_verify', '', 'string', 'Google Webmaster Tools Verify code', true, true);
dcCore::app()->setVersion('googlestuff', $this_version);
return true;