-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfunctions.php
48 lines (40 loc) · 1.43 KB
/
functions.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
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
$themecolors = array(
'bg' => 'fff',
'border' => '777',
'text' => '1c1c1c',
'link' => '004276',
);
function tj_comment_class( $classname='' ) {
global $comment, $post;
$c = array();
if ($classname)
$c[] = $classname;
// Collects the comment type (comment, trackback),
$c[] = $comment->comment_type;
// If the comment author has an id (registered), then print the log in name
if ( $comment->user_id > 0 ) {
$user = get_userdata($comment->user_id);
// For all registered users, 'byuser'; to specificy the registered user, 'commentauthor+[log in name]'
$c[] = "byuser comment-author-" . sanitize_title_with_dashes(strtolower($user->user_login));
// For comment authors who are the author of the post
if ( $comment->user_id === $post->post_author )
$c[] = 'bypostauthor';
}
// Separates classes with a single space, collates classes for comment LI
return join(' ', apply_filters('comment_class', $c));
}
// Some plugins, like Tumblr Crosspostr, use this to determine what
// kind of action to take. We don't need to do anything fancy other
// than register our support for this to make it all work. So, do it.
add_theme_support( 'post-formats', array(
'link', 'image', 'quote', 'video', 'audio', 'chat'
) );
?>