From e019caa4adc1ea91bf20826bea06e0cf0afc6f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Jerosimi=C4=87?= Date: Fri, 10 Jan 2014 23:20:55 +0100 Subject: [PATCH] Fixed issue in uninstall script When using 'uninstall.php' the plugin should always check for the WP_UNINSTALL_PLUGIN constant, before executing. The WP_UNINSTALL_PLUGIN constant is defined by WordPress at runtime during a plugin uninstall, it will not be present if 'uninstall.php' is requested directly. --- uninstall.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uninstall.php b/uninstall.php index 144627d..bc66239 100644 --- a/uninstall.php +++ b/uninstall.php @@ -3,6 +3,11 @@ * uninstall file for WP-FFPC; uninstall hook does not remove the databse options */ +// exit if uninstall not called from WordPress +if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) { + exit; +} + /* get the worker file */ include_once ( 'wp-ffpc.php' );