Revision 3874:ab8368569446,
978 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
short notation for array (array() → [])
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * @brief pings, a plugin for Dotclear 2 |
---|
4 | * |
---|
5 | * @package Dotclear |
---|
6 | * @subpackage Plugins |
---|
7 | * |
---|
8 | * @copyright Olivier Meunier & Association Dotclear |
---|
9 | * @copyright GPL-2.0-only |
---|
10 | */ |
---|
11 | |
---|
12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
13 | |
---|
14 | $version = $core->plugins->moduleInfo('pings', 'version'); |
---|
15 | if (version_compare($core->getVersion('pings'), $version, '>=')) { |
---|
16 | return; |
---|
17 | } |
---|
18 | |
---|
19 | // Default pings services |
---|
20 | $default_pings_uris = [ |
---|
21 | 'Ping-o-Matic!' => 'http://rpc.pingomatic.com/', |
---|
22 | 'Google Blog Search' => 'http://blogsearch.google.com/ping/RPC2' |
---|
23 | ]; |
---|
24 | |
---|
25 | $core->blog->settings->addNamespace('pings'); |
---|
26 | $core->blog->settings->pings->put('pings_active', 1, 'boolean', 'Activate pings plugin', false, true); |
---|
27 | $core->blog->settings->pings->put('pings_auto', 0, 'boolean', 'Auto pings on 1st publication', false, true); |
---|
28 | $core->blog->settings->pings->put('pings_uris', $default_pings_uris, 'array', 'Pings services URIs', false, true); |
---|
29 | |
---|
30 | $core->setVersion('pings', $version); |
---|
31 | return true; |
---|
Note: See
TracBrowser
for help on using the repository browser.