This repository was archived by the owner on Sep 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathfunctions.php
82 lines (70 loc) · 2.84 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
if ( function_exists( 'add_theme_support' )) {
add_theme_support('post-thumbnails');
set_post_thumbnail_size( 59, 59, true );
add_custom_background();
add_theme_support( 'automatic-feed-links' );
add_editor_style();
define('HEADER_TEXTCOLOR', '000000');
define('HEADER_IMAGE', '%s/images/default_header.jpg'); // %s is the template dir uri
define('HEADER_IMAGE_WIDTH', 160); // use width and height appropriate for your theme
define('HEADER_IMAGE_HEIGHT', 120);
function oulipo_header_style() { ?>
<style type="text/css">
span.header_image { background: url(<?php header_image(); ?>) no-repeat;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
display: block;
margin-bottom: 30px;
}
#main_nav h1.masthead a { color:#<?php header_textcolor();?>; }
</style><?php }
function oulipo_admin_header_style() { ?>
<style type="text/css">
#headimg {
}
</style><?php }
function oulipo_admin_header_image() { ?>
<div id="headimg">
<style type="text/css">
h1.masthead, p.description { font-family: "Hoefler Text","Cambria",Georgia,"Times New Roman",Times,serif; width: 160px; }
p.description { color: #666666; font-size: 13px; }
h1.masthead a { font-size: 24px; font-weight: normal; font-variant: small-caps; text-decoration: none; }
h1.masthead { margin: 30px 0 0 0;}
</style>
<?php
if ( 'blank' == get_theme_mod( 'header_textcolor',
HEADER_TEXTCOLOR ) || '' == get_theme_mod( 'header_textcolor',
HEADER_TEXTCOLOR ) )
$style = ' style="display:none;"';
else
$style = ' style="color:#' . get_theme_mod(
'header_textcolor', HEADER_TEXTCOLOR ) . ';"';
?>
<img src="<?php esc_url ( header_image() ); ?>" alt="" />
<h1 class="masthead"><a <?php echo $style; ?> onclick="return false;"
href="<?php bloginfo( 'url' ); ?>"><?php bloginfo( 'name' );
?></a></h1>
<p class="description"><?php bloginfo(
'description' ); ?></div>
</div>
<?php }
add_custom_image_header('oulipo_header_style','oulipo_admin_header_style', 'oulipo_admin_header_image');
add_action( 'init', 'register_oulipo_menus' );
function register_oulipo_menus() {
register_nav_menus(
array(
'main-menu' => __( 'Main Navigation Menu' )
));
}
}
if ( function_exists('register_sidebar') )
register_sidebar();
$content_width = 470;
add_filter( 'comments_template', 'legacy_comments' );
function legacy_comments( $file ) {
if ( !function_exists('wp_list_comments') )
$file = TEMPLATEPATH . '/legacy.comments.php';
return $file;
}
?>