Commit ea6fb6ed authored by lucha's avatar lucha Committed by lechuck

Updated Zenlite theme 4.6

parent b6691b17
......@@ -4,7 +4,7 @@ http://quirm.net/
*/
body {
color:#606060;
color:#fff;
}
blockquote {
background:url(images/quotes.png) no-repeat left top;
......
......@@ -14,8 +14,7 @@ if( is_active_sidebar( 'widget-footer' ) ) :?></div><?php endif;?>
<li class="rss"><a href="<?php bloginfo('rss2_url'); ?>" title="RSS Feed"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/rss.png" width="14" height="14" alt="RSS" /></a></li>
</ul>
<?php $zenlite_data = get_theme_data(get_stylesheet_directory() . '/style.css');?>
<p class="credits"><?php printf( __('Powered by the %1$s Theme %2$s', 'zenlite'), '<a href="' . $zenlite_data['URI'] . '">' . get_current_theme(), '</a>');?></p>
<p class="credits"><?php printf( __('Powered by the %1$s Theme', 'zenlite'), wp_get_theme() );?></p>
</div>
<!-- end wrapper -->
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() ) ); ?></li>
</ul>
<?php endif;?>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
......@@ -15,7 +15,7 @@
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'image',
'numberposts' => -1,
'posts_per_page' => -1,
'post_status' => null,
'post_parent' => $post->ID
);
......
......@@ -11,7 +11,7 @@ foreach( $link_bits as $bit ) {
<h2 class="post-title"><a href="<?php echo $link_url;?>" title="<?php _e('External link', 'zenlite');?>"><?php echo $link_text;?></a></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li class="post-date"><?php the_time(get_option('date_format')); ?> <?php the_time(get_option('time_format'));?></li>
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() ) ); ?></li>
</ul>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<?php if( !is_search() ) :?>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() ) ); ?></li>
</ul>
<?php endif;?>
......
<h2 class="post-title"><?php if( !is_single() ) :?><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( array('before' => __('Permalink to ', 'zenlite'), 'after' => '') ); ?>"><?php endif;?><?php the_title();?><?php if( !is_single() ) :?></a><?php endif;?></h2>
<ul class="meta">
<ul class="meta posthead">
<li><?php edit_post_link(sprintf( __('Edit %1$s', 'zenlite'), get_the_title() )
); ?></li>
</ul>
......
......@@ -4,9 +4,9 @@ if ( ! function_exists( 'zenlite_setup' ) ):
function zenlite_setup() {
// Load language files
load_theme_textdomain( 'zenlite', TEMPLATEPATH . '/langs' );
load_theme_textdomain( 'zenlite', get_template_directory() . '/langs' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/langs/$locale.php";
$locale_file = get_template_directory() . "/langs/$locale.php";
if ( is_readable( $locale_file ) ) require_once( $locale_file );
// set content width
......@@ -25,23 +25,41 @@ function zenlite_setup() {
add_editor_style();
// 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
add_custom_background();
set_post_thumbnail_size( get_option('thumbnail_size_w'), get_option('thumbnail_size_h') ); // box (proportional) resize mode
// Remove inline gallery css
add_filter( 'use_default_gallery_style', '__return_false' );
// 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_stylesheet_directory_uri() . '/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', '' ) );
// Header & background customisation
$zenlite_header = array(
'default-text-color' => apply_filters( 'zenlite_header_color', '606060'),
'width' => apply_filters( 'zenlite_header_image_width', 1000 ),
'height' => apply_filters( 'zenlite_header_image_height', 150 ),
'default-image' => get_stylesheet_directory_uri() . '/images/banner.jpg',
'wp-head-callback' => 'zenlite_custom_header_style',
'admin-head-callback' => 'zenlite_admin_header_style',
'admin-preview-callback' => '',
);
add_theme_support( 'custom-header', $zenlite_header );
$zenlite_background = array(
'default-color' => apply_filters( 'zenlite_background_color', '606060' ),
'default-image' => apply_filters( 'zenlite_background_image', '' )
);
add_theme_support( 'custom-background', $zenlite_background );
// Temp support for < WP 3.4
if ( ! function_exists( 'get_custom_header' ) ) {
define('HEADER_IMAGE_WIDTH', $zenlite_header['width'] );
define('HEADER_IMAGE_HEIGHT', $zenlite_header['height'] );
define('HEADER_IMAGE', $zenlite_header['default_image']);
define('HEADER_TEXTCOLOR', $zenlite_header['default-text-color'] );
add_custom_image_header( $zenlite_header['wp-head-callback'], $zenlite_header['admin-head-callback'], $zenlite_header['admin-preview-callback'] );
define ('BACKGROUND_COLOR',$zenlite_background['default-color'] );
define ('BACKGROUND_IMAGE', $zenlite_background['default-image'] );
add_custom_background();
}
// Load banner selection images into UI
register_default_headers( array(
......@@ -367,4 +385,3 @@ function zenlite_admin_header_style() {
<?php
}
endif;
add_custom_image_header('zenlite_custom_header_style', 'zenlite_admin_header_style');
......@@ -275,7 +275,7 @@ ul.jumplinks,.jumplinks {
min-height:400px;
line-height:1.5em;
margin:20px 0 0;
padding:0 10px;
padding:0 30px;
font-size:.9em;
}
/* clear all floats */
......@@ -322,6 +322,9 @@ ul.jumplinks,.jumplinks {
.meta ul {
display:inline;
}
.meta.posthead li {
display:inline;
}
.meta li li {
display:inline;
padding-right:.1em;
......@@ -345,10 +348,14 @@ ul.jumplinks,.jumplinks {
}
div.more-link {
font-size:.9em;
text-align:right;
}
div.more-link .wp-post-image {
float:none;
}
.post-edit-link {
clear:both;
display:block;
display:inline-block;
}
/* Post formats */
......
......@@ -30,19 +30,12 @@ function add_zenlite_contextual_help() {
) );
}
// Load theme options stylesheet(s)
function add_theme_options_style() {
wp_register_style('theme_options_style', get_template_directory_uri() . '/library/theme-options.css', '', '', 'screen');
if ( file_exists( get_stylesheet_directory() . '/theme-options-custom.css' ) ) {
wp_register_style('theme_options_custom_style', get_stylesheet_directory_uri() . '/theme-options-custom.css', '', '', 'screen');
}
}
function enqueue_theme_options_style() {
wp_enqueue_style('theme_options_style');
wp_enqueue_style('theme_options_custom_style');
wp_enqueue_style('theme_options_style', get_template_directory_uri() . '/library/theme-options.css', '', false, 'screen');
if ( file_exists( get_stylesheet_directory() . '/theme-options-custom.css' ) )
wp_enqueue_style('theme_options_custom_style', get_stylesheet_directory_uri() . '/theme-options-custom.css', '', false, 'screen');
}
add_action('admin_init', 'add_theme_options_style');
add_action('admin_print_styles', 'enqueue_theme_options_style');
add_action('admin_print_styles-appearance_page_theme_options', 'enqueue_theme_options_style');
// Create tabs
function zenlite_option_tabs( $current = 'options' ) {
......@@ -64,7 +57,7 @@ function theme_options_do_page() {
$updated = false;
if ( isset( $_REQUEST['updated'] ) || isset( $_REQUEST['settings-updated'] ) ) $updated = true;?>
<div class="wrap">
<?php screen_icon(); echo "<h2>" . get_current_theme() . "</h2>"; ?>
<?php screen_icon(); echo "<h2>" . wp_get_theme() . "</h2>"; ?>
<?php if ( $updated == true ) : ?>
<div class="updated fade"><p><strong><?php _e( 'Your theme options have been saved', 'zenlite'); ?></strong></p></div>
<?php endif; ?>
......@@ -179,7 +172,7 @@ function theme_options_do_radio($radio_options, $stored_options, $name, $default
if ( $option['value'] == $default ) $checked = 'checked="checked"';
else $checked = '';
}?>
<label class="description" for="<?php echo $name;?>_<?php esc_attr_e( $option['value'] ); ?>"><input type="radio" id="<?php echo $name;?>_<?php esc_attr_e( $option['value'] ); ?>" name="<?php echo 'zenlite';?>_theme_options[<?php echo $name;?>]" value="<?php esc_attr_e( $option['value'] ); ?>" <?php echo $checked; ?> /> <?php echo $option['label']; ?></label>
<label class="description" for="<?php echo $name;?>_<?php echo esc_attr( $option['value'] ); ?>"><input type="radio" id="<?php echo $name;?>_<?php echo esc_attr( $option['value'] ); ?>" name="<?php echo 'zenlite';?>_theme_options[<?php echo $name;?>]" value="<?php echo esc_attr( $option['value'] ); ?>" <?php echo $checked; ?> /> <?php echo $option['label']; ?></label>
<?php
}
}
......
/*
Theme Name:ZenLite
Version: 4.5
Version: 4.6
Theme URI: http://quirm.net/themes/zenlite/
Description: A minimalistic single column design with a widget-ready horizontal navigation menu for listing Pages, Categories or a custom menu. Includes additional templates for archives, categories, author lists, pages without comments, images, attachments and search results. Thickbox enabled image template. Customisable header and background images. Post format support. Additional theme options. Translation-ready and child-theme friendly. Suitable for WordPress 3.1 and above. Support available at http://forum.quirm.net/
Author: Mel Pedley
Author URI: http://blackwidows.co.uk
Tags: one-column, custom-header, custom-background, custom-menu, light, white, flexible-width, theme-options, translation-ready, threaded-comments, editor-style
Tags: one-column, custom-header, custom-background, custom-menu, light, white, fixed-width, theme-options, translation-ready, threaded-comments, editor-style
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment