Commit 2f842924 authored by lucha's avatar lucha Committed by lechuck

updated ZenLite theme to version 4.5

parent d18e84a1
......@@ -32,6 +32,9 @@ function zenlite_setup() {
// Add support for custom background
add_custom_background();
// 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 ) );
......@@ -153,14 +156,6 @@ function zenlite_proper_hellip($more) {
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() {
......@@ -282,7 +277,7 @@ function zenlite_comment_form_args($user_identity, $post_id, $req) {
'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>', 'zenlite' ), 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">' . _e( 'Comment', 'zenlite' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8"></textarea></p>',
'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __( 'Comment', 'zenlite' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8"></textarea></p>',
'label_submit'=>__('Submit Reply', 'zenlite'),
'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>'
......
......@@ -20,16 +20,28 @@
<?php wp_get_archives('type=monthly&format=link'); ?>
<title><?php bloginfo('name');
if(is_search()) {
if(trim(get_search_query()) != '') printf( __(" - Search Results for '%1$s'", 'zenlite'), trim(get_search_query()) );
else {bloginfo('name'); _e(' - No search query entered!', 'zenlite');}
}
elseif (is_category() || is_author()) wp_title('-',true);
elseif(is_tag()) printf( __(' - Entries tagged with %1$s ', 'zenlite') , wp_title('', false) );
elseif(is_archive() ) printf( __(' - Archives for %1$s ', 'zenlite') , wp_title('', false) );
elseif(is_404()) _e(' - Page not found!', 'zenlite');
elseif (have_posts()) wp_title('-',true);
<title><?php global $page, $paged;
if ( $paged >= 2 || $page >= 2 ) $we_are_on = sprintf( __( ' (Page %s) ', 'zenlite' ), max( $paged, $page ) );
else $we_are_on = '';
if( is_home () ) : printf(__( '%1$s%2$s on %3$s', 'zenlite'), wp_title('', false), $we_are_on, get_bloginfo('name') );
elseif( is_search() ) :
if( trim( get_search_query() ) == '' ) printf(__('No search query entered on %1$s', 'zenlite'), get_bloginfo('name') );
else printf( __( 'Search Results for \'%1$s\' on %2$s%3$s', 'zenlite' ), trim(get_search_query() ), get_bloginfo('name'), $we_are_on );
elseif ( is_category() || is_author() ) : printf(__( '%1$s%2$s on %3$s', 'zenlite' ), wp_title('', false), $we_are_on, get_bloginfo('name') );
elseif( is_tag() ) : printf( __('Entries tagged with \'%1$s\'%2$s on %3$s', 'zenlite') , wp_title('', false), $we_are_on, get_bloginfo('name') );
elseif( is_archive() ) :
printf( __('Archives for %1$s%2$s on %3$s', 'zenlite'), wp_title('', false), $we_are_on, get_bloginfo('name') );
elseif( is_404() ) : printf(__( 'Page not found on %1$s', 'zenlite' ), get_bloginfo('name') );
else : printf( __('%1$s%2$s', 'zenlite'), wp_title(':',true, 'right'), get_bloginfo('name') );
endif;
?>
</title>
......
......@@ -152,7 +152,7 @@ ul.jumplinks,.jumplinks {
position:absolute;
top:-9000px;
left:-9000px;
z-index:99;
z-index:10;
}
.jumplinks a:active,.jumplinks a:focus {
position:absolute;
......
<div class="wrap donate">
<div class="wrap rhs">
<div class="box donate">
<h2><?php _e('Theme Donations', 'zenlite');?></h2>
<p><?php _e('Please support us so we can support you.', 'zenlite');?></p>
<p><?php _e('Please support us so that we can support you.', 'zenlite');?></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:0 auto; width:120px;">
<input type="hidden" name="cmd" value="_xclick" />
<input type="hidden" name="business" value="paypal@blackwidows.co.uk" />
......@@ -22,7 +24,18 @@
<p class="thanks"><?php _e('Thank you!', 'zenlite');?></p>
</div>
<div class="wrap donate">
<div class="box support">
<h2><?php _e('Theme Support', 'zenlite');?></h2>
<p><a href="http://forum.quirm.net">Quirm.net</a></p>
</div>
<div class="box child-themes">
<h2><?php _e('Child Themes', 'zenlite');?></h2>
<ul>
<li><a href="http://quirm.net/themes/zenlite/zenlite-black-mandarin/">ZenLite Black Mandarin</a></li>
<li><a href="http://quirm.net/themes/zenlite/zenlite-blue/">ZenLite Blue</a></li>
<li><a href="http://quirm.net/themes/zenlite/zenlite-citrus/">ZenLite Citrus</a></li>
<li><a href="http://quirm.net/themes/zenlite/zenlite-vertical/">ZenLite Vertical</a></li></ul>
</div>
</div>
\ No newline at end of file
......@@ -5,10 +5,13 @@
.appearance_page_theme_options fieldset {
margin-top:20px;
}
.appearance_page_theme_options .donate {
.appearance_page_theme_options .rhs {
clear:right;
float:right;
width:30%;
margin:45px 0 0;
}
.appearance_page_theme_options .rhs .box {
padding:0 10px;
margin:0 0 20px 20px;
background:#fff;
......@@ -18,14 +21,17 @@
-webkit-border-radius:5px;
border-radius:5px;
}
.appearance_page_theme_options .donate h2 {
.appearance_page_theme_options .box h2 {
font-weight:normal;
font-size:1.4em;
padding-top:5px;
}
.appearance_page_theme_options .donate p {
.appearance_page_theme_options .box p {
margin-top:0;
}
.appearance_page_theme_options .donate {
margin-top:45px;
}
.appearance_page_theme_options .donate .thanks {
margin:10px 0;
color:#999;
......
......@@ -11,30 +11,35 @@ add_action( 'admin_init', 'theme_options_init' );
// Add theme options page
function theme_options_add_page() {
add_theme_page( __( 'Theme Options', 'zenlite' ), __( 'Theme Options', 'zenlite' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );
$theme_page = add_theme_page( __( 'Theme Options', 'zenlite' ), __( 'Theme Options', 'zenlite' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );
if ( $theme_page ) add_action( 'load-' . $theme_page, 'add_zenlite_contextual_help' );
}
add_action('admin_menu', 'theme_options_add_page');
// Add basic contextual help links
function add_zenlite_contextual_help() {
$screen = get_current_screen();
$help = '<ul class="contextual-links">';
$help .= '<li><a href="http://quirm.net/forum/forum.php?id=15">' .__( 'ZenLite support on Quirm.net', 'zenlite') . '</a></li>';
$help .= '<li><a href="http://wordpress.org/tags/zenlite">' .__( 'ZenLite support on wordress.org', 'zenlite') . '</a></li>';
$help .= '</ul>';
add_contextual_help( 'appearance_page_theme_options', $help );
$screen->add_help_tab( array(
'id' => 'theme-support',
'title' => __( 'Theme Support', 'zenlite' ),
'content' => $help,
) );
}
add_action('admin_init','add_zenlite_contextual_help');
// Load theme options stylesheet
// Load theme options stylesheet(s)
function add_theme_options_style() {
$css_file = get_template_directory() . '/library/theme-options.css';
$css_url = get_template_directory_uri() . '/library/theme-options.css';
if ( file_exists($css_file) ) {
wp_register_style('theme_options_style', $css_url, '', '', 'screen');
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');
}
add_action('admin_init', 'add_theme_options_style');
add_action('admin_print_styles', 'enqueue_theme_options_style');
......
<?php get_header();
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
......
/*
Theme Name:ZenLite
Version: 4.4
Theme URI: http://quirm.net/zenlite/
Version: 4.5
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
......
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