All pastes #2073944 Raw Edit

Stuff

public text v1 · immutable
#2073944 ·published 2011-06-03 02:02 UTC
rendered paste body
<?php
/**
 * @package WordPress
 * @subpackage Summ
 */
 add_theme_support( 'automatic-feed-links' );
 
 if ( ! isset( $content_width ) ) $content_width = 900;
 	/** -----------------------------------------------
		 * custom background
	*/ 
 add_custom_background();
 	define('HEADER_TEXTCOLOR', '111111');
	define('HEADER_IMAGE', '%s/images/default_header.jpg'); // %s is the template dir uri
	define('HEADER_IMAGE_WIDTH', 1000); // use width and height appropriate for your theme
	define('HEADER_IMAGE_HEIGHT', 138);
 	/** -----------------------------------------------
		 * gets included in the site header
	*/ 
function header_style() {
    ?><style type="text/css">
        #header {
            background: url(<?php header_image(); ?>);
        }
		.siteName a,.description{color:#<?php header_textcolor() ?>}
    </style><?php
}
	/** -----------------------------------------------
		 * gets included in the admin header
	*/ 
function admin_header_style() {
    ?><style type="text/css">
        #headimg {
            width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
            height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
        }
    </style><?php
}
add_custom_image_header('header_style', 'admin_header_style');
if ( function_exists('register_sidebar') )
    register_sidebar( array(
		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</li>',
		'before_title' => '<span class="widget-title">',
		'after_title' => '</span>',
	));
	/** -----------------------------------------------
		 * Theme uses wp_nav_menu() in one location. Chack if function exist
	*/ 
if( function_exists('register_nav_menus') )
register_nav_menus( array(
		'primary' => __( 'Primary Navigation', 'Summ' ),
) );

    /**
     * Return older post
     *
     * @return mixed If not NULL
     */
function older_post_exists()
    {
        static $older;
        if (empty($older)) {
            if (is_attachment()) {
                global $post;
                $older = &get_post($post -> post_parent);
            } else {
                $older = &get_previous_post();
            }
        }
        return $older;
    }
    /**
     * Return newer post
     *
     * @return mixed If not NULL
     */
function newer_post_exists()
    {
        static $newer;
        if (empty($newer)) $newer = &get_next_post();
        return $newer;
    }

	/** -----------------------------------------------
	 * custom comments
	*/
if (function_exists('wp_list_comments')) {
function custom_comments($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
	<div id="comment-<?php comment_ID(); ?>">
<span class="avatarx"><?php echo get_avatar($comment,$size='40',$default='<path_to_url>' ); ?></span>
<div class="message_head">
<span class="name"><?php comment_author_link() ?></span>
<span class="reply"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?></span>
<br/>
<span class="date"><?php printf( __( '%1$s at %2$s', 'Summ' ), get_comment_date(),  get_comment_time() ); ?></span>
<div class="cmt_text"><?php comment_text(); ?></div>
	</div>
</div>	
<?php }}

?>