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

updated ZenLite theme to version 4.5

parent d18e84a1
...@@ -32,6 +32,9 @@ function zenlite_setup() { ...@@ -32,6 +32,9 @@ function zenlite_setup() {
// Add support for custom background // Add support for custom background
add_custom_background(); add_custom_background();
// Remove inline gallery css
add_filter( 'use_default_gallery_style', '__return_false' );
// Header & Background customisation/ // Header & Background customisation/
define('HEADER_IMAGE_WIDTH', apply_filters( 'zenlite_header_image_width',1000 ) ); 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_HEIGHT', apply_filters( 'zenlite_header_image_height', 150 ) );
...@@ -153,14 +156,6 @@ function zenlite_proper_hellip($more) { ...@@ -153,14 +156,6 @@ function zenlite_proper_hellip($more) {
endif; endif;
add_filter('excerpt_more', 'zenlite_proper_hellip'); 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 // Correct image path issue in thickbox
if( !function_exists ('zenlite_load_tb_fix') ) : if( !function_exists ('zenlite_load_tb_fix') ) :
function zenlite_load_tb_fix() { function zenlite_load_tb_fix() {
...@@ -282,7 +277,7 @@ function zenlite_comment_form_args($user_identity, $post_id, $req) { ...@@ -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 ) ) ) ), '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'), '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>' '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 @@ ...@@ -20,16 +20,28 @@
<?php wp_get_archives('type=monthly&format=link'); ?> <?php wp_get_archives('type=monthly&format=link'); ?>
<title><?php bloginfo('name'); <title><?php global $page, $paged;
if(is_search()) { if ( $paged >= 2 || $page >= 2 ) $we_are_on = sprintf( __( ' (Page %s) ', 'zenlite' ), max( $paged, $page ) );
if(trim(get_search_query()) != '') printf( __(" - Search Results for '%1$s'", 'zenlite'), trim(get_search_query()) ); else $we_are_on = '';
else {bloginfo('name'); _e(' - No search query entered!', 'zenlite');}
} if( is_home () ) : printf(__( '%1$s%2$s on %3$s', 'zenlite'), wp_title('', false), $we_are_on, get_bloginfo('name') );
elseif (is_category() || is_author()) wp_title('-',true);
elseif(is_tag()) printf( __(' - Entries tagged with %1$s ', 'zenlite') , wp_title('', false) ); elseif( is_search() ) :
elseif(is_archive() ) printf( __(' - Archives for %1$s ', 'zenlite') , wp_title('', false) ); if( trim( get_search_query() ) == '' ) printf(__('No search query entered on %1$s', 'zenlite'), get_bloginfo('name') );
elseif(is_404()) _e(' - Page not found!', 'zenlite'); else printf( __( 'Search Results for \'%1$s\' on %2$s%3$s', 'zenlite' ), trim(get_search_query() ), get_bloginfo('name'), $we_are_on );
elseif (have_posts()) wp_title('-',true);
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> </title>
......
...@@ -152,7 +152,7 @@ ul.jumplinks,.jumplinks { ...@@ -152,7 +152,7 @@ ul.jumplinks,.jumplinks {
position:absolute; position:absolute;
top:-9000px; top:-9000px;
left:-9000px; left:-9000px;
z-index:99; z-index:10;
} }
.jumplinks a:active,.jumplinks a:focus { .jumplinks a:active,.jumplinks a:focus {
position:absolute; position:absolute;
......
<div class="wrap donate"> <div class="wrap rhs">
<div class="box donate">
<h2><?php _e('Theme Donations', 'zenlite');?></h2> <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;"> <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="cmd" value="_xclick" />
<input type="hidden" name="business" value="paypal@blackwidows.co.uk" /> <input type="hidden" name="business" value="paypal@blackwidows.co.uk" />
...@@ -22,7 +24,18 @@ ...@@ -22,7 +24,18 @@
<p class="thanks"><?php _e('Thank you!', 'zenlite');?></p> <p class="thanks"><?php _e('Thank you!', 'zenlite');?></p>
</div> </div>
<div class="wrap donate"> <div class="box support">
<h2><?php _e('Theme Support', 'zenlite');?></h2> <h2><?php _e('Theme Support', 'zenlite');?></h2>
<p><a href="http://forum.quirm.net">Quirm.net</a></p> <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> </div>
\ No newline at end of file
...@@ -5,10 +5,13 @@ ...@@ -5,10 +5,13 @@
.appearance_page_theme_options fieldset { .appearance_page_theme_options fieldset {
margin-top:20px; margin-top:20px;
} }
.appearance_page_theme_options .donate { .appearance_page_theme_options .rhs {
clear:right; clear:right;
float:right; float:right;
width:30%; width:30%;
margin:45px 0 0;
}
.appearance_page_theme_options .rhs .box {
padding:0 10px; padding:0 10px;
margin:0 0 20px 20px; margin:0 0 20px 20px;
background:#fff; background:#fff;
...@@ -18,14 +21,17 @@ ...@@ -18,14 +21,17 @@
-webkit-border-radius:5px; -webkit-border-radius:5px;
border-radius:5px; border-radius:5px;
} }
.appearance_page_theme_options .donate h2 { .appearance_page_theme_options .box h2 {
font-weight:normal; font-weight:normal;
font-size:1.4em; font-size:1.4em;
padding-top:5px; padding-top:5px;
} }
.appearance_page_theme_options .donate p { .appearance_page_theme_options .box p {
margin-top:0; margin-top:0;
} }
.appearance_page_theme_options .donate {
margin-top:45px;
}
.appearance_page_theme_options .donate .thanks { .appearance_page_theme_options .donate .thanks {
margin:10px 0; margin:10px 0;
color:#999; color:#999;
......
...@@ -11,30 +11,35 @@ add_action( 'admin_init', 'theme_options_init' ); ...@@ -11,30 +11,35 @@ add_action( 'admin_init', 'theme_options_init' );
// Add theme options page // Add theme options page
function theme_options_add_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_action('admin_menu', 'theme_options_add_page');
// Add basic contextual help links // Add basic contextual help links
function add_zenlite_contextual_help() { function add_zenlite_contextual_help() {
$screen = get_current_screen();
$help = '<ul class="contextual-links">'; $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://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 .= '<li><a href="http://wordpress.org/tags/zenlite">' .__( 'ZenLite support on wordress.org', 'zenlite') . '</a></li>';
$help .= '</ul>'; $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() { function add_theme_options_style() {
$css_file = get_template_directory() . '/library/theme-options.css'; wp_register_style('theme_options_style', get_template_directory_uri() . '/library/theme-options.css', '', '', 'screen');
$css_url = get_template_directory_uri() . '/library/theme-options.css'; if ( file_exists( get_stylesheet_directory() . '/theme-options-custom.css' ) ) {
if ( file_exists($css_file) ) { wp_register_style('theme_options_custom_style', get_stylesheet_directory_uri() . '/theme-options-custom.css', '', '', 'screen');
wp_register_style('theme_options_style', $css_url, '', '', 'screen');
} }
} }
function enqueue_theme_options_style() { function enqueue_theme_options_style() {
wp_enqueue_style('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_init', 'add_theme_options_style');
add_action('admin_print_styles', 'enqueue_theme_options_style'); add_action('admin_print_styles', 'enqueue_theme_options_style');
......
<?php get_header(); <?php get_header();
if (have_posts()) : while (have_posts()) : the_post(); ?> if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>> <div <?php post_class(); ?>>
......
/* /*
Theme Name:ZenLite Theme Name:ZenLite
Version: 4.4 Version: 4.5
Theme URI: http://quirm.net/zenlite/ 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/ 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: Mel Pedley
Author URI: http://blackwidows.co.uk Author URI: http://blackwidows.co.uk
......
Supports Markdown
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