I’ve got nowhere. I post this in the hope someone might cast some light on it. This is to go either in functions.php or header.php
Page(‘3’) is the contact page. Note that echoing things would show referring urls etc. nicely at the top of the page but stopped the contact form from submitting.
<?php global $filename;
if (is_page('3')) {
if(!isset($HTTP_REFERER))
{$referer = strtolower($_SERVER["HTTP_REFERER"]);
//echo 'TESTING TESTING';
//echo $referer;
$url2 = $referer;
$filename = basename($url2);
//echo $filename;
}
} ?>
Then, in classes.php in the plugin, right before the line
return @wp_mail( $recipient, $subject, $body, $headers, $for_this_mail );
I added this:
$subject = $subject.$filename;
Since that didn’t work, I removed the code from either header.php or functions.php and from classes.php and tried adding this instead :
$filename = wp_get_referer();
$subject = $subject.$filename;
return @wp_mail( $recipient, $subject, $body, $headers, $for_this_mail );
All the time my emails came back with the same damned referrer, whch was the name of the page the contact form was on i.e. contact.php
Is functions.php loaded before plugins?
If so, I can’t see why this didn’t work.