Skip to content

Instantly share code, notes, and snippets.

@antoniofrignani
Created June 4, 2012 09:39
Show Gist options
  • Save antoniofrignani/2867480 to your computer and use it in GitHub Desktop.
Save antoniofrignani/2867480 to your computer and use it in GitHub Desktop.
[WP] - Prevent direct file access to functions.php
// Prevent direct file access to functions.php
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'functions.php' == basename($_SERVER['SCRIPT_FILENAME']))
{
die ('No access!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment