Revision 3874:ab8368569446,
978 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
short notation for array (array() → [])
|
Rev | Line | |
---|
[3428] | 1 | <?php |
---|
[3731] | 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 | |
---|
[3730] | 12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
[3428] | 13 | |
---|
[3730] | 14 | $version = $core->plugins->moduleInfo('pings', 'version'); |
---|
| 15 | if (version_compare($core->getVersion('pings'), $version, '>=')) { |
---|
| 16 | return; |
---|
[3428] | 17 | } |
---|
| 18 | |
---|
| 19 | // Default pings services |
---|
[3874] | 20 | $default_pings_uris = [ |
---|
[3730] | 21 | 'Ping-o-Matic!' => 'http://rpc.pingomatic.com/', |
---|
| 22 | 'Google Blog Search' => 'http://blogsearch.google.com/ping/RPC2' |
---|
[3874] | 23 | ]; |
---|
[3428] | 24 | |
---|
| 25 | $core->blog->settings->addNamespace('pings'); |
---|
[3730] | 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); |
---|
[3428] | 29 | |
---|
[3730] | 30 | $core->setVersion('pings', $version); |
---|
[3428] | 31 | return true; |
---|
Note: See
TracBrowser
for help on using the repository browser.