WordPress.org

Make WordPress Core

Ticket #11850: test_uninstall_hook.php

File test_uninstall_hook.php, 473 bytes (added by cyberhobo, 5 years ago)

A test plugin that registers an uninstall hook.

Line 
1<?php
2/*
3Plugin Name: Test Uninstall Hook
4Plugin URI: http://wordpress.org/#
5Description: A plugin with an uninstall hook (that will prevent it from being uninstalled).
6Author: Dylan Kuhn
7Version: 1.0
8Author URI: http://www.cyberhobo.net/
9*/
10
11function 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
16register_uninstall_hook( __FILE__, 'test_plugin_uninstall');
17
18?>