Skip to content
Snippets Groups Projects
Commit 19a4c365 authored by root's avatar root Committed by lechuck
Browse files

Add theme zenlite

parent ceec8a93
No related branches found
No related tags found
No related merge requests found
Showing
with 941 additions and 0 deletions
<?php ob_start(); ?>
<?php header("HTTP/1.1 404 Not Found"); ?>
<?php header("Status: 404 Not Found"); ?>
<?php get_header(); ?>
<div id="content">
<div <?php post_class('page'); ?>>
<h2 class="post-title"><?php _e('Page Not Found', 'zenlite');?></h2>
<p><?php _e("Uh oh! I can't seem to find the file you asked for.", 'zenlite');?></p>
<p><?php _e('Perhaps you:', 'zenlite');?></p>
<ul>
<li><?php _e('tried to access a post or archive that has been removed', 'zenlite');?></li>
<li><?php _e('followed a bad link', 'zenlite');?></li>
<li><?php _e('mis-typed something', 'zenlite');?></li>
</ul>
<p><?php _e("Try using the Search option to find what you're looking for.", 'zenlite');?></p>
<?php get_search_form();?>
</div>
<?php get_footer();
\ No newline at end of file
<?php
get_header();
get_template_part( 'loop', 'archive' );
get_footer();
\ No newline at end of file
<?php
/*
Template Name: Archive Lists
*/
?>
<?php get_header(); ?>
<div id="content">
<h2><?php _e('Archives by Month:', 'zenlite');?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h2><?php _e('Archives by Subject:', 'zenlite');?></h2>
<ul>
<?php wp_list_categories(); ?>
</ul>
<?php get_footer(); ?>
\ No newline at end of file
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
<h2><?php the_title(); ?></h2>
<ul class="meta">
<li><?php edit_post_link(__('Edit', 'zenlite') ); ?></li>
</ul>
<div class="postcontent">
<p class="download-link"><img class="download-icon alignleft" src="<?php echo wp_mime_type_icon(); ?>" width="46" height="60" alt="" /> <?php printf( __('Download the <a href="%1$s" rel="attachment">%2$s</a> file.', 'zenlite'), wp_get_attachment_url(), get_the_title() );?><br />
<?php printf( __('Published on %1$s at %2$s', 'zenlite' ), get_the_time(__('F j, Y', 'zenlite')), get_the_time() );
if( get_the_modified_time() != get_the_time() ) {
echo '<br />';
printf( __('Updated on %1$s at %2$s', 'zenlite' ), get_the_modified_time(__('F j, Y', 'zenlite')), get_the_modified_time() );
}?></p>
<?php if ( !empty( $post->post_excerpt ) ) :?>
<div class="attachment-caption">
<?php the_excerpt(); ?>
</div>
<?php endif;?>
<?php if ( !empty( $post->post_content ) ) :?>
<div class="attachment-content">
<?php the_content(); ?>
</div>
<?php endif;?>
</div>
<p class="posted-under"><?php _e('Posted under', 'zenlite');?> <a href="<?php echo get_permalink($post->post_parent); ?>" title="<?php _e('Return to parent page', 'zenlite');?>"><?php echo get_the_title($post->post_parent); ?></a></p>
<?php endwhile; ?><?php endif; ?>
</div>
<?php get_footer();
\ No newline at end of file
<?php get_header(); ?>
<div id="content">
<?php if(isset($_GET['author_name'])) $curauth = get_userdatabylogin($author_name);
else $curauth = get_userdata(intval($author));?>
<div <?php post_class(); ?>>
<h2 class="post-title"><?php _e('About', 'zenlite');?> <?php echo $curauth->display_name; ?></h2>
<dl class="author-details">
<?php if( $curauth->user_description !='' ) :?>
<dt class="bio"><?php _e('Bio', 'zenlite');?>:</dt>
<dd class="bio"><?php echo $curauth->user_description; ?></dd>
<?php endif;?>
<?php if( $curauth->user_url !='' ) :?>
<dt class="website"><?php _e('Website', 'zenlite');?>:</dt>
<dd class="website"><a href="<?php echo $curauth->user_url;?>"><?php echo $curauth->user_url;?></a></dd>
<?php endif;?>
<?php if(function_exists('get_the_author_meta')) :?>
<?php if( get_the_author_meta('jabber', $curauth->ID) != '') :?>
<dt class="jabber"><?php _e('Jabber / Google Talk', 'zenlite');?>:</dt>
<dd class="jabber"><?php the_author_meta('jabber', $curauth->ID);?></dd>
<?php endif;?>
<?php if( get_the_author_meta('aim', $curauth->ID) != '') :?>
<dt class="aim"><abbr title="<?php _e('AOL Instant Messenger', 'zenlite');?>"><?php _e('AIM');?></abbr>:</dt>
<dd class="aim"><?php the_author_meta('aim', $curauth->ID);?></dd>
<?php endif;?>
<?php if( get_the_author_meta('yim', $curauth->ID) != '') :?>
<dt class="yim"><?php _e('Yahoo');?> <abbr title="<?php _e('Instant Messenger', 'zenlite');?>"><?php _e('IM');?></abbr>:</dt>
<dd class="yim"><?php the_author_meta('yim', $curauth->ID);?></dd>
<?php endif;?>
<?php endif;?>
</dl>
<h2 class="posts-by"><?php _e('Posts by', 'zenlite');?> <?php echo $curauth->display_name; ?>:</h2>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h3 class="post-title" id="post-<?php the_ID();?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Post', 'zenlite');?> <?php the_ID(); ?> - <?php _e('permanent link', 'zenlite');?>"><?php the_title(); ?></a></h3>
<ul class="meta">
<li><?php the_time(__('F j, Y', 'zenlite')); ?> <?php the_time(); ?></li>
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
<div class="postcontent">
<?php if( has_post_thumbnail() ) {
the_post_thumbnail();
the_excerpt();
}
else the_content();?>
</div>
<ul class="meta postfoot">
<li class="more-link"><a href="<?php the_permalink();?>"><?php _e('Continue reading ', 'zenlite') . the_title();?></a> &raquo;</li>
<?php if('open' == $post->comment_status) : ?><li class="comment_link"><?php comments_popup_link(__('Comment on ', 'zenlite') .$post->post_title, __('1 Comment on ', 'zenlite') .$post->post_title, __('% Comments on ', 'zenlite') .$post->post_title,'postcomment',__('Comments are off for ', 'zenlite') .$post->post_title); ?> &raquo;</li><?php endif;?>
<li class="cats"><?php _e('Filed under:', 'zenlite');?> <ul><li><?php the_category(',</li> <li>') ?></li></ul></li>
<?php if(get_the_tag_list()) :?>
<li class="tags"><?php _e('Tags:', 'zenlite');?> <?php the_tags('<ul><li>',',</li> <li>','</li></ul>');?></li>
<?php endif;?>
</ul>
<?php endwhile; ?>
<ul class="prevnext">
<li><?php next_posts_link(__('&laquo; Older Posts', 'zenlite') ); ?></li>
<li><?php previous_posts_link(__('Newer Posts &raquo;', 'zenlite') );?></li>
</ul>
<?php endif; ?>
</div>
<?php get_footer(); ?>
\ No newline at end of file
<?php
/*
Template Name: List Authors
*/
?>
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
<h2 class="post-title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent Link:', 'zenlite');?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<ul class="meta">
<li><?php edit_post_link(__('Edit', 'zenlite') ); ?></li>
</ul>
<div class="postcontent">
<?php the_content(); ?>
</div>
<ul class="authors">
<?php wp_list_authors('exclude_admin=0&optioncount=1'); ?>
</ul>
<?php wp_link_pages('before=<div class="pagelist">' . __('Pages:', 'zenlite') .'&after=</div>&link_before=&link_after=&pagelink=%');?>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php get_footer(); ?>
\ No newline at end of file
<?php
get_header();
get_template_part( 'loop', 'category' );
get_footer();
\ No newline at end of file
/*ZenLite
Author:Mel P.
http://quirm.net/
*/
body {
color:#606060;
}
h1,h2,h3,h4,h5,h6 {
}
blockquote {
border-left:2px solid #DEE2E9;;
}
acronym, abbr {
border-bottom:1px dashed #ddd;
}
pre,ins {
background:#F3F3FB;
color:#606060;
}
pre {
border:1px solid #D5CDD5;
}
fieldset {
background:#DEE2E9;
}
fieldset fieldset {
background:#F3F3FB;
}
legend {
background:#B1B4BE;
color:#000;
}
input, textarea {
background:#F0F3F5;
color:#404040;
border:1px solid #ddd;
}
input:focus,input.focus,textarea:focus,textarea.focus {
background:#fff;
color:#606060;
border-color:#407096;
}
input.submit,input.button,input[type=submit] {
background:#505050;
color:#fff;
}
input.checkbox {
border:none;
}
ins {
text-decoration:none;
}
table,th,td {
border:1px solid #C6CCD4;
}
th {
background:#DEE2E9;
}
tr {
background:#fff;
color:#606060;
}
tr.alt {
background:#F3F3FB;
}
a {
color:#407096;
}
a:visited {
color:#5F487E;
}
a:hover {
color:#407096;
}
a:active,a:focus {
background-color:#f93;
color:#000;
}
a img {
border:1px solid #fff;
}
a:hover img {
border-color:#DEE2E9;
}
a:active img, a:focus img {
border-color:#f93;
}
/* WRAPPER */
#wrapper {
background:#fff;
color:#606060;
}
.jumplinks a:active,.jumplinks a:focus {
background:#f93;
color:#000;
}
/* HEADER */
#header h1,#header h1 a {
color:#606060;
}
#header h1 {
border-bottom:3px double #aaa;
}
#header h1 a:hover {
color:#407096;
}
#header h1 a:focus,#header h1 a:active {
background-color:#f93;
color:#000;
}
#header h1 small {
color:#707070;
}
/* MENU */
.sidebar {
border-top:3px double #aaa;
border-bottom:3px double #aaa;
}
.sidebar a {
background:#fff;
color:#606060;
}
.sidebar .current_page_item a,.sidebar .current-cat a,
.sidebar .current-menu-item a {
background:#505050;
color:#fff;
}
.sidebar .current_page_item li a,.sidebar .current-cat li a {
background:#fff;
color:#606060;
}
.sidebar a:hover {
background:#DEE2E9;
color:#404040;
}
.sidebar a:active,.sidebar a:focus {
background:#f93;
color:#404040;
}
/* CONTENT */
#content {
background:#fff;
color:#606060;
}
.postfoot {
border-bottom:3px double #aaa;
}
.author .posts-by {
border-top:3px double #aaa;
}
.single {
border:none;
}
#content ul li {
list-style-image:url(images/bullet.jpg);
}
#content ul li ul li {
list-style-image:url(images/bullet2.jpg);
}
#content ul li ul li ul li {
list-style-image:none;
}
#content .prevnext li,#content .meta li {
list-style-image:none;
list-style:none;
}
/* no bullets */
#content #commentlist li,#content .comment-links li,
#content .result-list li,#content .page-tree ul li {
list-style-image:none;
list-style:none;
}
/* pagination */
.page-numbers a,.pagelist a {
background-color:#F3F3FB;
border:1px solid #DEE2E9;
}
.page-numbers a:hover,.pagelist a:hover {
background-color:#fff;
}
.page-numbers a:active,.page-numbers a:focus,
.pagelist a:active,.pagelist a:focus {
background-color:#f93;
color:#000;
border-color:#f93;
}
/* page tree */
.page-tree {
background-color:#F3F3FB;
border:1px solid #DEE2E9;
}
/* COMMENTS */
#commentlist .even {
background-color:#F3F3FB;
}
#commentlist .odd {
background:#fff;
}
#commentlist .even,#commentlist .odd {
border:1px solid #DEE2E9;
-moz-border-radius:3px;
-khtml-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
}
#commentlist li .meta li {
background:transparent;
border:none;
}
/* gallery & captions */
.wp-caption img,#content .gallery img {
border:10px solid #F3F3FB;
-moz-border-radius:3px;
-khtml-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
}
.wp-caption a:hover img,#content .gallery a:hover img {
border-color:#DEE2E9;
}
.wp-caption a:active img,.wp-caption a:focus img,
#content .gallery a:active img,#content .gallery a:focus img {
border-color:#f93;
}
/* wp-calendar */
#wp-calendar tbody td a {
background:#E9ECF1;
}
#wp-calendar td a:hover {
background:#407096;
color:#fff;
}
#wp-calendar tbody td a:active,#wp-calendar tbody td a:focus {
background:#f93;
color:#000;
}
#wp-calendar #today,#wp-calendar #today a {
background:#F5E6F5;
}
\ No newline at end of file
<?php
if ( post_password_required() ) : ?>
<p class="comments-nopassword"><?php _e( "This post and it's comments are password protected. Enter the password into the form above to view any comments.", 'zenlite' ); ?></p>
<?php
// Stop the rest of comments.php from being processed,
return;
endif;
?>
<?php if(have_comments()) : ?>
<h2 id="comments" class="total-comments">
<?php
$args = array(
'zero' => __('No comments', 'zenlite'),
'one' => __('1 Comment', 'zenlite'),
'more' => __('% Comments', 'zenlite')
);
comments_number($args ); ?> <?php _e('on', 'zenlite');?> <?php the_title(); ?></h2>
<?php endif;?>
<?php if ('open' == $post->comment_status) : ?>
<ul class="comment-links">
<?php if ('open' == $post->comment_status) : ?><li><a href="#respond"><?php _e('Add your comment', 'zen');?></a></li><?php endif;?>
<?php if (have_comments()) : ?><li><a href="<?php echo get_post_comments_feed_link();?>"><?php _e('Comments feed for this post', 'zenlite'); ?></a></li><?php endif;?>
<?php if(pings_open()) : ?><li><a href="<?php trackback_url();?>" rel="trackback"><?php _e('TrackBack', 'zenlite');?> <abbr title="<?php _e('Uniform Resource Identifier', 'zenlite');?>"><?php _e('URI', 'zenlite');?></abbr></a></li><?php endif;?>
</ul><?php endif; ?>
<?php if(have_comments()) : ?>
<?php paginate_comments_links('type=list'); ?>
<ol id="commentlist">
<?php wp_list_comments(); ?>
</ol>
<?php paginate_comments_links('type=list'); ?>
<?php endif;
comment_form( zenlite_comment_form_args($user_identity, $post->ID, $req) );
\ No newline at end of file
<!-- end content -->
</div>
<div id="footer">
<ul>
<li class="top"><a href="#top" title="Jump to the top of this page">Top</a></li>
<li class="loginout"><?php wp_loginout(); ?></li>
<?php wp_register(); ?>
<li class="rss"><a href="<?php bloginfo('rss2_url'); ?>" title="RSS Feed"><img src="<?php bloginfo('template_directory'); ?>/images/rss.png" width="14" height="14" alt="RSS" /></a></li>
</ul>
<?php $zenlite_data = get_theme_data(get_stylesheet_directory() . '/style.css');?>
<p><?php printf( __('Powered by the %1$s Theme %2$s', 'zenlite'), '<a href="' . $zenlite_data['URI'] . '">' . get_current_theme(), '</a>');?></p>
</div>
<!-- end wrapper -->
</div>
<?php wp_footer(); ?>
</body>
</html>
\ No newline at end of file
<?php
if ( ! function_exists( 'zenlite_setup' ) ):
function zenlite_setup() {
// Load language files
load_theme_textdomain( 'zenlite', TEMPLATEPATH . '/langs' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/langs/$locale.php";
if ( is_readable( $locale_file ) ) require_once( $locale_file );
// set content width
if ( ! isset( $content_width ) ) $content_width = 900;
// remove WP version number - security by obscurity
remove_action ('wp_head', 'wp_generator');
// Add post thumbnail & feed link support
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );
// Get the post thumbnail dimensions from Settings/Media
define('THUMB_WIDTH', get_option('thumbnail_size_w'));
define('THUMB_HEIGHT', get_option('thumbnail_size_h'));
set_post_thumbnail_size( THUMB_WIDTH, THUMB_HEIGHT ); // box (proportional) resize mode
// Add support for custom background
if( function_exists ('add_custom_background') ) add_custom_background();
// Header & Background customisation/
define('HEADER_IMAGE_WIDTH', apply_filters( 'zenlite_header_image_width',1000 ) );
define('HEADER_IMAGE_HEIGHT', apply_filters( 'zenlite_header_image_height', 150 ) );
define('HEADER_IMAGE', get_bloginfo('stylesheet_directory') . '/images/banner.jpg');
define('HEADER_TEXTCOLOR', apply_filters( 'zenlite_header_color', '606060' ) );
define ('BACKGROUND_COLOR', apply_filters( 'zenlite_background_color', 'fff' ) );
define ('BACKGROUND_IMAGE', apply_filters( 'zenlite_background_image', '' ) );
}
endif;
add_action( 'after_setup_theme', 'zenlite_setup' );
// Load custom theme options
require_once(get_template_directory() . '/library/theme-options.php');
$zenlite_options = get_option('zenlite_theme_options');
// Register sidebar
if ( !function_exists( 'zenlite_widgets_init' )) :
function zenlite_widgets_init() {
register_sidebar(array(
'name'=> __('Main menu', 'zenlite'),
'id' => 'main-menu',
'description' => __('Main menu','zenlite'),
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));
}
endif;
add_action( 'widgets_init', 'zenlite_widgets_init' );
// add custom menu support
if ( function_exists( 'register_nav_menu' ) && !function_exists( 'register_theme_menus' )) :
function register_zenlite_menus() {
register_nav_menu( 'primary', __( 'Primary', 'zenlite' ) );
}
endif;
add_action( 'init', 'register_zenlite_menus' );
// Add thickbox to public-facing attachment pages only
if ( !function_exists( 'zenlite_thickbox_init' ) ) :
function zenlite_thickbox_init() {
if (is_attachment() ) {
add_thickbox();
}
}
endif;
add_action('template_redirect', 'zenlite_thickbox_init');
// Set up a proper &hellip;for post extracts
if( !function_exists ('zenlite_proper_hellip') ) :
function zenlite_proper_hellip($more) {
return '&hellip;';
}
endif;
add_filter('excerpt_more', 'zenlite_proper_hellip');
// Remove gallery css
if( !function_exists ('zenlite_remove_gallery_css') ) :
function zenlite_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
endif;
add_filter( 'gallery_style', 'zenlite_remove_gallery_css' );
// Correct image path issue in thickbox
if( !function_exists ('zenlite_load_tb_fix') ) :
function zenlite_load_tb_fix() {
if( is_attachment() ) ?><script type="text/javascript">tb_pathToImage = "'<?php bloginfo('url');?>/wp-includes/js/thickbox/loadingAnimation.gif";tb_closeImage = "<?php bloginfo('url');?>/wp-includes/js/thickbox/tb-close.png";</script>
<?php
}
endif;
add_action('wp_footer', 'zenlite_load_tb_fix');
// Amend post password form
if( !function_exists ('zenlite_password_form') ) :
function zenlite_password_form() {
global $post;
$label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
$output = '<div class="password-form">
<p class="protected-text">' . __('This post is password protected. To view it, please enter your password below:', 'zenlite') . '</p>
<form action="' . get_option('siteurl') . '/wp-pass.php" method="post">
<p><label for="' . $label . '">' . __('Password:', 'zenlite') . ' </label> <input name="post_password" id="' . $label . '" type="password" size="20" /> <input type="submit" name="Submit" value="' . esc_attr__('Submit', 'zenlite') . '" /></p></form></div>';
return $output;
}
endif;
add_filter('the_password_form','zenlite_password_form');
// Amend password protected standard excerpt
if( !function_exists ('zenlite_password_excerpt') ) :
function zenlite_password_excerpt($output) {
global $post;
if ( post_password_required($post) ) $output = '<p class="pwd-protected">' . __('This is a password protected post.', 'zenlite') . '</p>';
return $output;
}
endif;
add_filter('the_excerpt','zenlite_password_excerpt');
// Make sure we always have a visible post/page title
if ( !function_exists( 'zenlite_correct_missing_title' ) ) :
function zenlite_correct_missing_title( $title ) {
if ( $title == '' ) $title = __('No Title', 'zenlite');
return $title;
}
endif;
add_filter( 'the_title', 'zenlite_correct_missing_title' );
// Disable home link in wp_page_menu
if ( !function_exists( 'zenlite_show_home' ) ) :
function zenlite_show_home( $args ) {
$args['show_home'] = true;
return $args;
}
endif;
add_filter( 'wp_page_menu_args', 'zenlite_show_home' );
// Customise menu class in wp_page_menu
if ( !function_exists( 'zenlite_primary_menu_class' ) ) :
function zenlite_primary_menu_class( $args ) {
$args['menu_class'] = 'top-menu';
return $args;
}
endif;
add_filter( 'wp_page_menu_args', 'zenlite_primary_menu_class' );
// Called in sidebar.php for Categories if no custom menu is defined
if ( !function_exists( 'zenlite_callback_cats' ) ) :
function zenlite_callback_cats() {
?>
<ul>
<li<?php if(is_front_page() || is_home()) echo ' class="current_page_item"';?>><a href="<?php bloginfo('url'); ?>"><?php _e('Home', 'zenlite');?></a></li>
<?php wp_list_categories('title_li=');?>
</ul>
<?php
}
endif;
// Amend comment form fields
if ( !function_exists( 'zenlite_comment_fields' ) ) :
function zenlite_comment_fields($fields) {
$commenter = wp_get_current_commenter();
$req = get_option('require_name_email');
if( $req ) $reqd = '<span class="required">' . __('*', 'zenlite') . '</span>';
$fields['author'] = '<p class="comment-form-author"><label class="text" for="author">' . __( 'Name', 'zenlite' ) . $reqd . '</label><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" /></p>';
$fields['email'] = '<p class="comment-form-email"><label class="text" for="email">' . __( 'Email', 'zenlite' ) . $reqd . '</label><input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" />' . '</p>';
$fields['url'] = '<p class="comment-form-url"><label class="text" for="url">' . __( 'Website', 'zenlite') . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>';
return $fields;
}
endif;
add_filter('comment_form_default_fields','zenlite_comment_fields');
// Amend comment form arguments
if ( ! function_exists( 'zenlite_comment_form_args' ) ) :
function zenlite_comment_form_args($user_identity, $post_id, $req) {
global $zenlite_options;
$args = array(
'comment_notes_before' => '<p class="comment-notes"><label for="author">' . ( $req ? __( ' Required fields are marked ', 'zenlite') . '<span class="required">' . __('*', 'zenlite') . '</span><br />' : '' ) . __( 'Your email address will <em>never</em> be published or shared.' ) . '</label></p>',
'logged_in_as' => '<p class="logged-in-as"><label for="comment">' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></label></p>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ),
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8"></textarea></p>',
'label_submit'=>'Submit Reply',
'comment_notes_after' => '<p class="form-allowed-tags"><label for="comment">' . __( 'You may use these <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> tags and attributes:', 'zenlite' ) . ' <code>' . allowed_tags() . '</code></label></p>'
);
if( $zenlite_options['kses_display'] && $zenlite_options['kses_display'] == 'no' ) $args['comment_notes_after'] = '';
return $args;
}
endif;
// Return page tree
if ( !function_exists( 'zenlite_page_tree' ) ) :
function zenlite_page_tree($this_page) {
$pagelist = '';
if( !$this_page->post_parent ) {
$children = wp_list_pages('title_li=&child_of='.$this_page->ID.'&echo=0');
if( $children ) {
$pagelist .= '<li class="current_page_item"><a href="'. get_page_link($this_page->ID) .'">' . $this_page->post_title . '</a>';
$pagelist .= '<ul>' . $children . '</ul>';
$pagelist .= '</li>';
}
}
elseif( $this_page->ancestors ) {
// get the top ID of this page. Page ids DESC so top level ID is the last one
$ancestor = end($this_page->ancestors);
$pagelist .= wp_list_pages('title_li=&include='.$ancestor.'&echo=0');
$pagelist = str_replace('</li>', '', $pagelist);
$pagelist .= '<ul>' . wp_list_pages('title_li=&child_of='.$ancestor.'&echo=0') .'</ul></li>';
}
return $pagelist;
}
endif;
// output custom header image & text CSS
if ( !function_exists( 'zenlite_custom_header_style' ) ) :
function zenlite_custom_header_style() {
echo '<style type="text/css" media="screen,print">'."\n";
if( get_header_image() != '' ) echo '#header-image {background-image:url(' . get_header_image() . ');}';
if( get_header_textcolor() == 'blank' ) echo '#header h1,#header h1 a {position:absolute;top:-5000px;left:-5000px;}';
else echo '#header h1,#header h1 a {color:#' . get_header_textcolor() . ';}';
echo "\n</style>\n\n";
}
endif;
// Style header customisation in the Admin area
if ( !function_exists( 'zenlite_admin_header_style' ) ) :
function zenlite_admin_header_style() {
?>
<style type="text/css">
#headimg {
height:150px;
padding:0;
margin:70px 0 0;
background-image:url(images/banner.jpg);
background-repeat:no-repeat;
background-position:top left;
border-top:3px double #aaa;
border-bottom:3px double #aaa;
}
#headimg h1,#headimg #desc {
text-align:center;
font-weight:normal;
letter-spacing:.02em;
position:relative;
top:-70px;
}
#headimg h1 {
margin:0;
padding:0 15px;
font-size:30px;
line-height:1.2em;
color:#606060;
}
#headimg #desc {
display:block;
margin:0;
padding:0 0 13px;
font-size:20px;
color:#707070;
}
#headimg a {
text-decoration:none;
}
#headimg a:hover {
text-decoration:underline;
}
</style>
<?php
}
endif;
add_custom_image_header('', 'zenlite_admin_header_style');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/1">
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo('charset'); ?>" />
<meta name="designer" content="esmi@quirm.net" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" media="print" />
<!--[if IE]>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie.css" media="screen" type="text/css" />
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/ie7.css" media="screen" type="text/css" />
<script src="<?php bloginfo('template_directory'); ?>/library/focus.js" type="text/javascript"></script>
<![endif]-->
<?php if ( function_exists( 'zenlite_custom_header_style' ) ) zenlite_custom_header_style();?>
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_get_archives('type=monthly&format=link'); ?>
<title><?php if(is_search()) {
if(trim(get_search_query()) != '') {_e(' Search Results for &#39;', 'zenlite'); echo trim(get_search_query());_e('&#39; on ', 'zenlite');bloginfo('name');}
else {bloginfo('name');_e(' - No search query entered!', 'zenlite');}
}
elseif (is_category() || is_author()) {wp_title(':',true,'right'); bloginfo('name');}
elseif(is_tag()) {_e('Entries tagged with ', 'zenlite'); wp_title('',true);_e(' on '); bloginfo('name');}
elseif(is_archive() ) {_e('Archives for ', 'zenlite');wp_title('',true,'right') ;_e(' on '); bloginfo('name');}
elseif(is_404()) {bloginfo('name'); _e(' - Page not found!', 'zenlite');}
elseif (have_posts()) {wp_title(':',true,'right'); bloginfo('name');}
else {bloginfo('name');}?>
</title>
<?php if(is_singular()) wp_enqueue_script( 'comment-reply' );?>
<?php wp_head(); ?>
</head>
<body id="top" <?php body_class(); ?>>
<div id="wrapper">
<ul class="jumplinks">
<li><a href="#content"><?php _e('Jump to Main Content', 'zenlite');?></a></li>
<li><a href="#footer"><?php _e('Jump to Footer', 'zenlite');?></a></li>
</ul>
<div id="header">
<h1><a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>
<small><?php bloginfo('description'); ?></small></h1>
</div>
<div id="header-image"></div>
<?php get_sidebar(); ?>
/*ZenLite
Author: Mel P.
http://quirm.net/
*/
/* fixes HasLayout issue in IE */
#content,#left_sidebar,#right_sidebar,#footer {
height:50%;
}
/*ZenLite
Author: Mel P.
http://quirm.net/
*/
.jumplinks a:active,.jumplinks a:focus {
top:9010px;
left:9000px;
}
#header h1 small {
text-indent:1em;
}
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class('img-attachment'); ?>>
<h2><?php the_title(); ?></h2>
<ul class="meta">
<li><?php edit_post_link(__('Edit', 'zenlite') ); ?></li>
</ul>
<div class="main-img"><a class="thickbox" title="<?php the_title(); ?> <?php _e('(press ESC to close)','zenlite');?>" href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></div>
<div class="postcontent">
<?php the_excerpt(); ?>
</div>
<?php
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'numberposts' => -1,
'post_status' => null,
'post_parent' => $post->ID
);
$images = get_posts($args);
if( $images > 1 ) : ?>
<h3 class="more-images"><?php _e('More images posted under', 'zenlite');?> <a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a></h3>
<ul class="prevnext image-nav">
<li class="prev_img"><?php previous_image_link(); ?></li>
<li class="next_img"><?php next_image_link();?></li>
</ul>
<?php else :?>
<p class="posted-under"><?php _e('Posted under', 'zenlite');?> <a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a></p>
<?php endif;?>
</div>
<?php endwhile; endif; ?>
<?php get_footer(); ?>
\ No newline at end of file
wp-content/themes/zenlite/images/banner.jpg

22.6 KiB

wp-content/themes/zenlite/images/bullet.jpg

807 B

wp-content/themes/zenlite/images/bullet2.jpg

782 B

wp-content/themes/zenlite/images/rss.png

508 B

wp-content/themes/zenlite/images/sample-header.jpg

19.3 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment