forked from bryanveloso/chaoticsoul
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
82 lines (70 loc) · 2.48 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
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
75
76
77
78
79
80
81
82
<?php
function chaoticsoul_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
<?php comment_text() ?>
<p class="commentmetadata">
<?php echo get_avatar( $comment, 32 ); ?>
<small>
<cite><?php comment_author_link() ?></cite> <?php _e('said this on', 'chaoticsoul'); ?>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('Your comment is awaiting moderation.', 'chaoticsoul'); ?></em>
<?php endif; ?>
<a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date(get_option('date_format')) ?> <?php _e('at', 'chaoticsoul');?> <?php comment_time(get_option('time_format')) ?></a><?php echo comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ')) ?> <?php edit_comment_link(__('edit', 'chaoticsoul'),'(',')'); ?>
</small>
</p>
</li>
<?php }
$themecolors = array(
'bg' => '161410',
'text' => '999999',
'link' => 'd8d7d3',
'border' => '161410'
);
$content_width = 497;
// Widgets FTW!
function widget_chaoticsoul_links() {
wp_list_bookmarks(array(
'title_before' => '<h3>',
'title_after' => '</h3>',
));
}
function widget_chaoticsoul_search() {
?>
<form method="get" id="searchform" action="/index.php">
<div><input type="text" value="<?php _e('Search', 'chaoticsoul'); ?>" onblur="this.value=(this.value=='') ? '<?php _e('Search', 'chaoticsoul'); ?>' : this.value;" onfocus="this.value=(this.value=='<?php _e('Search', 'chaoticsoul'); ?>') ? '' : this.value;" name="s" id="s" /></div>
</form>
<?php
}
function chaoticsoul_widget_init() {
register_sidebar(array(
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
register_sidebar_widget(__('Links', 'widgets'), 'widget_chaoticsoul_links', null, 'links');
register_sidebar_widget(__('Search', 'widgets'), 'widget_chaoticsoul_search', null, 'search');
}
add_action('widgets_init', 'chaoticsoul_widget_init');
// Custom Header FTW!
define('HEADER_TEXTCOLOR', '');
define('HEADER_IMAGE', '%s/images/headerimage.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 760);
define('HEADER_IMAGE_HEIGHT', 151);
define('NO_HEADER_TEXT', true );
function admin_header_style() {
?>
<style type="text/css">
#headimg {
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
}
#headimg h1, #headimg #desc {
display: none;
}
</style>
<?php }
add_custom_image_header('', 'admin_header_style');
?>