diff --git a/readme.txt b/readme.txt index 7c5ef1b..944f68c 100644 --- a/readme.txt +++ b/readme.txt @@ -79,6 +79,7 @@ Is this plugin prepared for multisites? Yes. * Added DataTables language support for 'search'. * Added VSCode settings.json for formatOnSave. * Added .gitignore. +* Added security measurement to prevent the public to run the php-script directly. = 4.1.0 = * Compatibility with WordPress version 6.7.1 diff --git a/wp-jquery-datatable.php b/wp-jquery-datatable.php index f465859..9db1812 100644 --- a/wp-jquery-datatable.php +++ b/wp-jquery-datatable.php @@ -9,6 +9,10 @@ * WordPress Tested up to: 7.0.2 */ +if (!defined('ABSPATH')) { + die('Invalid request.'); +} + register_activation_hook(__FILE__, 'wp_jdt_activate_plugin'); function wp_jdt_activate_plugin() {