-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathemail-popup.php
41 lines (38 loc) · 1.6 KB
/
email-popup.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
<?php
### Session Start
@session_start();
### Filters
add_filter('wp_title', 'email_pagetitle');
add_filter('the_title', 'email_title');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="robots" content="noindex, nofollow" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » <?php _e('Blog Archive', 'wp-email'); ?> <?php } ?> <?php wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript">
/* <![CDATA[*/
function repositionPopup() {
var content = document.getElementById("wp-email-popup");
var newWidth = content.offsetWidth + 30;
var newHeight = content.offsetHeight + 50;
if (/Firefox/.test(navigator.userAgent)) // Firefox doesn't hide location & status bars
newHeight += 50;
window.resizeTo(newWidth, newHeight);
window.moveTo((screen.width-newWidth) / 2, (screen.height-newHeight) / 2);
}
/* ]]> */
</script>
<?php wp_head(); ?>
</head>
<body onload="repositionPopup();">
<div id="wp-email-popup">
<?php email_form(true); ?>
<p style="text-align: center; padding-top: 20px;"><a href="#" onclick="window.close();"><?php _e('Close This Window', 'wp-email'); ?></a></p>
<?php wp_footer(); ?>
</div>
</body>
</html>