WP for Wordpress

How To Prevent WordPress Plugin Files from Direct Access?



When creating WordPress plugins, it is always advisable to follow maximum security measures. This makes your plugin more stable and acceptable by other users.

 One such security check is to prevent direct access of plugin files by a user. For that add the following code to the top of main plugin php file.

 if(!defined('ABSPATH'))
die('Direct access of plugin file not allowed');


Responses

0 Respones to "How To Prevent WordPress Plugin Files from Direct Access? "

Post a Comment

AddThis

 

Recent Comments

Return to top of page Copyright © 2014