Last change
on this file since 28511 was
24624,
checked in by plg, 11 years ago
|
bug fixed: load language at the right time so that the tab is always translated
|
File size:
700 bytes
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Photo Update |
---|
4 | Version: auto |
---|
5 | Description: Update a photo with a new file |
---|
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 | add_event_handler('tabsheet_before_select','photo_update_add_tab', 50, 2); |
---|
17 | function photo_update_add_tab($sheets, $id) |
---|
18 | { |
---|
19 | load_language('plugin.lang', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
20 | |
---|
21 | if ($id == 'photo') |
---|
22 | { |
---|
23 | $sheets['update'] = array( |
---|
24 | 'caption' => l10n('Update'), |
---|
25 | 'url' => get_root_url().'admin.php?page=plugin-photo_update-'.$_GET['image_id'], |
---|
26 | ); |
---|
27 | } |
---|
28 | |
---|
29 | return $sheets; |
---|
30 | } |
---|
31 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.