I have a custom page template which reveals php files for someone studying the page source. What code can I put at the start of this file to prevent someone trying to run the script outside Wordpress ?
For example in an Ajax script I have the line
if ( empty( $_REQUEST['action'] ) )
die( '0' );
Someone trying to run this code directly just see a 0.
Thanks.