Ticket #12754: example-plugin.php
File example-plugin.php, 457 bytes (added by , 14 years ago) |
---|
Line | |
---|---|
1 | <?php |
2 | // Plugin Name: Example |
3 | |
4 | function example_install() { |
5 | add_option('example_option_a', 'foo'); |
6 | add_option('example_option_b', 'bar'); |
7 | } |
8 | register_activation_hook(__FILE__, 'example_install'); |
9 | |
10 | function example_uninstall_a() { |
11 | delete_option('example_option_a'); |
12 | } |
13 | register_uninstall_hook(__FILE__, 'example_uninstall_a'); |
14 | |
15 | function example_uninstall_b() { |
16 | delete_option('example_option_b'); |
17 | } |
18 | register_uninstall_hook(__FILE__, 'example_uninstall_b'); |