This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.php
executable file
·63 lines (36 loc) · 1.92 KB
/
404.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="wrap clearfix">
<div id="main" class="first clearfix" role="main">
<div id="page-header" class="clearfix">
<div id="img-error" class="page-header-image clearfix"></div>
<div class="page-header-text clearfix">
<h1><span><?php _e("404 ERROR", "bonestheme"); ?></span></h1>
<article id="post-not-found" class="hentry clearfix">
<section>
<p class="hyphenate"><?php _e("There is nobody home at the address you entered.", "bonestheme"); ?>
<?php
if (isset($_SERVER['HTTP_REFERER'])) {
$website = get_bloginfo('url');
$adminemail = get_option('admin_email');
$subject = "Bad Link To " . $_SERVER['REQUEST_URI'];
$headers = "From: " . get_bloginfo('name') . " <noreply@$website>"."\r\n"."X-Mailer: PHP/".phpversion()."\r\n"."X-Priority: 2 (Normal)";
$msg = "A user tried to go to $website" . $_SERVER['REQUEST_URI'] . " and received a 404 (page not found) error. They came from " . $_SERVER['HTTP_REFERER'] . ".";
mail($adminemail, $subject, $msg, $headers);
echo '<br>'; _e("A message that it needs fixing has been sent to the administrator.", "bonestheme");
}
?>
</p><p class="hyphenate"><?php _e("All roads lead to Rome, so think of this page as a rest stop.", "bonestheme"); ?></p>
</section>
<section>
<?php get_search_form(); ?>
</section> <!-- end search section -->
</article> <!-- end article -->
</div>
</div>
</div> <!-- end #main -->
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<div id="footer-pad"></div> <!-- to position footer at bottom of page -->
</div> <!-- #page-wrapper end -->
<?php get_footer(); ?>