-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
74 lines (65 loc) · 4.27 KB
/
Copy pathfunctions.php
File metadata and controls
74 lines (65 loc) · 4.27 KB
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
64
65
66
67
68
69
70
71
72
73
74
<?php
add_filter( 'the_content', 'sign_up' );
function sign_up ( $content ) {
if ( is_front_page() || get_the_title()==="Take Action" || get_the_title()==="Membership Levels" || get_the_title()==="Membership Checkout"
) return $content;
return $content .
"<div class='sign_up'>" .
"<h3>Sign up to support helmet law reform</h3>" .
fs_theme_sign() .
"</div>" .
"<div>" .
"<a href='/confirm/'>Update your email preferences</a>" .
"</div>";
}
function my_pmpro_default_country($default)
{
return "AU";
}
add_filter("pmpro_default_country", "my_pmpro_default_country");
function xyz_filter_wp_mail_from($email){
return "info@freestylecyclists.org";
}
add_filter("wp_mail_from", "xyz_filter_wp_mail_from");
function fs_theme_sign () {
global $add_signature_register_script;
$add_signature_register_script = true;
$narrow = true;
ob_start() ?>
<form name="register">
<table border="0">
<tbody>
<tr><td class="leftcol">name:</td><td class="rightcol"><input<?=($narrow || $popup) ? " class='smallinput'" : "";?> type="text" name="title" id="name<?=($popup ? "_popup" : "");?>"></td></tr>
<tr valign="top"><td class="leftcol"><input name="fs_signature_public" class="inputc" value="y" checked="checked" id="public<?=($popup ? "_popup" : "");?>" type="checkbox"></td><td>Show my name on this website</td></tr>
<tr valign="top"><td class="leftcol">email:</td><td class="rightcol"><input type="email"<?=($narrow || $popup) ? " class='smallinput'" : "";?> name="fs_signature_email" id="email<?=($popup ? "_popup" : "");?>" title="email address"><br>
<div class="smallfont">An email will be sent to you to confirm this address, to ensure the integrity of your registration.</div></td></tr>
<tr valign="top"><td class="leftcol"><input name="fs_signature_newsletter" class="inputc" value="y" checked="checked" id="newsletter" type="checkbox"></td><td class="medfont">Send me an occasional email if something really important is happening.</td></tr>
<tr><td class="leftcol">Country:</td>
<td class="rightcol"><select id="country<?=($popup ? "_popup" : "");?>"<?=($narrow || $popup) ? " class='smallinput'" : "";?> name="fs_signature_country">
<option value="" selected="selected">Please select</option>
<?php
$fs_country = fs_country();
foreach( $fs_country as $ab => $title ) { ?>
<option value="<?=$ab;?>"><?php echo $title;?></option>
<?php } ?>
</select></td></tr>
<tr><td class="state<?=($popup ? "_popup" : "");?> leftcol removed">State:</td>
<td class="rightcol state<?=($popup ? "_popup" : "");?> removed">
<select name="fs_signature_state"<?=($narrow || $popup) ? " class='smallinput'" : "";?>>
<?php
$fs_states = fs_states();
foreach( $fs_states as $ab => $title ) { ?>
<option value="<?=$ab;?>"><?php echo $title;?></option>
<?php } ?>
</select></td></tr>
<tr><td class="leftcol">2+3=</td><td class="rightcol"><input<?=($narrow || $popup) ? " class='smallinput'" : "";?> type="text" name="arithmetic" id="name<?=($popup ? "_popup" : "");?>"></td></tr>
<tr><td class="leftcol">Comment:</td><td class="rightcol"><textarea name="excerpt" class="inputc"></textarea><br><div class="smallfont">Comments are subject to moderation</div></td></tr>
<tr><td colspan="2"><button type="button" id="saveButton<?=($popup ? "_popup" : "");?>">Save</button></td></tr>
<tr><td colspan="2"><div id="ajax-loading<?=($popup ? "_popup" : "");?>" class="farleft"><img src="<?php echo get_site_url();?>/wp-includes/js/thickbox/loadingAnimation.gif"></div></td></tr>
<tr><td colspan="2"><div id="returnMessage<?=($popup ? "_popup" : "");?>"></div></td></tr>
</tbody></table>
<input name="action" value="newSignature" type="hidden">
<?php wp_nonce_field( "fs_new_sig", "fs_nonce");?>
</form>
<?php return ob_get_clean();
}