Last change
on this file since 17483 was
11762,
checked in by plg, 13 years ago
|
make the plugin compatible with Piwigo 2.1
|
File size:
767 bytes
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Showcase Register |
---|
4 | Version: auto |
---|
5 | Description: Register on Piwigo Showcase (piwigo.org/showcase) |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid= |
---|
7 | Author: plg |
---|
8 | Author URI: http://piwigo.wordpress.com |
---|
9 | */ |
---|
10 | |
---|
11 | if (!defined('PHPWG_ROOT_PATH')) |
---|
12 | { |
---|
13 | die('Hacking attempt!'); |
---|
14 | } |
---|
15 | |
---|
16 | /* Plugin admin */ |
---|
17 | add_event_handler('get_admin_plugin_menu_links', 'showcase_subscribe_menu'); |
---|
18 | function showcase_subscribe_menu($menu) |
---|
19 | { |
---|
20 | if (preg_match('/^2.1/', PHPWG_VERSION)) |
---|
21 | { |
---|
22 | $url = get_admin_plugin_menu_link(dirname(__FILE__).'/admin.php'); |
---|
23 | } |
---|
24 | else |
---|
25 | { |
---|
26 | $url = get_root_url().'admin.php?page=plugin-showcase_subscribe'; |
---|
27 | } |
---|
28 | |
---|
29 | array_push( |
---|
30 | $menu, |
---|
31 | array( |
---|
32 | 'NAME' => 'Showcase', |
---|
33 | 'URL' => $url, |
---|
34 | ) |
---|
35 | ); |
---|
36 | |
---|
37 | return $menu; |
---|
38 | } |
---|
39 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.