This repository has been archived by the owner on Dec 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsignature-template.php
executable file
·73 lines (67 loc) · 2.16 KB
/
signature-template.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
64
65
66
67
68
69
70
71
72
73
<?php
/**
* template functions for signatures
* @package activists-lobbies
*/
/**
* Retrieve the surname of the signatory.
*
* @param int $comment_ID The ID of the comment for which to get the signatory's surname
* @return string
*/
function get_signature_surname ($comment_ID=0) {
$comment = get_comment($comment_ID);
$ret = apply_filters('get_comment_author_name', $comment->surname);
return apply_filters('get_comment_author_surname', $ret);
}
/**
* Displays the surname of the current comment author
*
* @param int $comment_ID The ID of the comment for which to print the surname
*/
function signature_surname ($comment_ID=0) {
$name = apply_filters('comment_author', get_signature_surname($comment_ID));
$name = apply_filters('author_surname', $name);
echo $name;
}
/**
* Retrieve the given name of the signatory.
*
* @param int $comment_ID The ID of the comment for which to get the signatory's given name
* @return string
*/
function get_signature_given_name ($comment_ID=0) {
$comment = get_comment($comment_ID);
$ret = apply_filters('get_comment_author_name', $comment->given_name);
return apply_filters('get_comment_author_given_name', $ret);
}
/**
* Displays the given name of the current comment author
*
* @param int $comment_ID The ID of the comment for which to print the given name
*/
function signature_given_name ($comment_ID=0) {
$name = apply_filters('comment_author', get_signature_given_name($comment_ID));
$name = apply_filters('author_given_name', $name);
echo $name;
}
/**
* Retrieve the postcode of the signatory.
*
* @param int $comment_ID The ID of the comment for which to get the signatory's postcode
* @return string
*/
function get_signature_postcode ($comment_ID=0) {
$comment = get_comment($comment_ID);
return apply_filters('get_comment_author_postcode', $comment->postcode);
}
/**
* Displays the surname of the current comment author
*
* @param int $comment_ID The ID of the comment for which to print the author
*/
function signature_postcode ($comment_ID=0) {
$postcode = apply_filters('comment_author', get_signature_postcode($comment_ID));
$postcode = apply_filters('author_surname', $postcode);
echo $postcode;
}