Ticket #11850: test_uninstall_hook.php
| File test_uninstall_hook.php, 473 bytes (added by , 16 years ago) |
|---|
| Line | |
|---|---|
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: Test Uninstall Hook |
| 4 | Plugin URI: http://wordpress.org/# |
| 5 | Description: A plugin with an uninstall hook (that will prevent it from being uninstalled). |
| 6 | Author: Dylan Kuhn |
| 7 | Version: 1.0 |
| 8 | Author URI: http://www.cyberhobo.net/ |
| 9 | */ |
| 10 | |
| 11 | function test_plugin_uninstall() { |
| 12 | die( "NO! Don't do it!" ); |
| 13 | } |
| 14 | |
| 15 | // Now we set that function up to execute when the admin_footer action is called |
| 16 | register_uninstall_hook( __FILE__, 'test_plugin_uninstall'); |
| 17 | |
| 18 | ?> |