Commit 6311b110 authored by lucha's avatar lucha
Browse files

[auto] Theme: zenlite 4.10

parent e290b092
......@@ -91,7 +91,7 @@ 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');
$zenlite_options = get_option('zenlite_options');
// Register sidebar
if ( !function_exists( 'zenlite_widgets_init' )) :
......@@ -133,14 +133,14 @@ function zenlite_filter_wp_title( $old_title, $sep, $sep_location ) {
$left_sep = ( $sep_location != 'right' ? ' ' . $sep . ' ' : '' );
$right_sep = ( $sep_location != 'right' ? '' : ' ' . $sep . ' ' );
if( is_category() ) $page_type = $left_sep . 'Category' . $right_sep;
elseif( is_tag() ) $page_type = $left_sep . 'Tag' . $right_sep;
elseif( is_author() ) $page_type = $left_sep . 'Author' . $right_sep;
elseif( is_archive() || is_date() ) $page_type = $left_sep . 'Archives'. $right_sep;
if( is_category() ) $page_type = $left_sep . __('Category', 'zenlite') . $right_sep;
elseif( is_tag() ) $page_type = $left_sep . __('Tag', 'zenlite') . $right_sep;
elseif( is_author() ) $page_type = $left_sep . __('Author', 'zenlite') . $right_sep;
elseif( is_archive() || is_date() ) $page_type = $left_sep . __('Archives', 'zenlite') . $right_sep;
else $page_type = '';
if( get_query_var( 'paged' ) ) $page_num = $left_sep. get_query_var( 'paged' ) . $right_sep; // on index
elseif( get_query_var( 'page' ) ) $page_num = $left_sep . get_query_var( 'page' ) . $right_sep; // on single
if( get_query_var( 'paged' ) ) $page_num = $left_sep. __('page ', 'zenlite') . get_query_var( 'paged' ) . $right_sep; // on index
elseif( get_query_var( 'page' ) ) $page_num = $left_sep . __('page ', 'zenlite') . get_query_var( 'page' ) . $right_sep; // on single
else $page_num = '';
if( !is_feed() ) return get_bloginfo( 'name' ) . $page_type . $old_title . $page_num;
......@@ -247,7 +247,7 @@ function zenlite_password_form() {
$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">
<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" 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;
}
......@@ -267,8 +267,8 @@ add_filter('the_excerpt','zenlite_password_excerpt');
// Auto-generate post/page titles
if ( !function_exists( 'zenlite_autogenerate_title' ) ) :
function zenlite_autogenerate_title( $title ) {
global $zenlite_options;
if ( !$title && ( !isset($zenlite_options['notitle_display']) || $zenlite_options['notitle_display'] == 'yes' ) ) $title = __('No Title', 'zenlite');
global $zenlite_options, $post;
if ( !$title && ( !isset($zenlite_options['notitle_display']) || $zenlite_options['notitle_display'] == 'yes' ) ) $title = sprintf( __('Post %1$s', 'zenlite'), $post->ID );
return $title;
}
endif;
......
This diff is collapsed.
......@@ -32,6 +32,7 @@
<div class="box child-themes">
<h2><?php _e('Child Themes', 'zenlite');?></h2>
<ul>
<li><a href="http://quirm.net/themes/zenlite-basic-child/">ZenLite Basic Child</a></li>
<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>
......
......@@ -4,17 +4,17 @@
require_once get_template_directory() . '/library/zenlite-theme-options-array.php';
// White list theme options
function theme_options_init() {
register_setting( 'zenlite'. '_options', 'zenlite'. '_theme_options', 'theme_options_validate' );
function zenlite_options_init() {
register_setting( 'zenlite_options', 'zenlite_theme_options', 'zenlite_options_validate' );
}
add_action( 'admin_init', 'theme_options_init' );
add_action( 'admin_init', 'zenlite_options_init' );
// Add theme options page
function theme_options_add_page() {
$theme_page = add_theme_page( __( 'Theme Options', 'zenlite' ), __( 'Theme Options', 'zenlite' ), 'edit_theme_options', 'theme_options', 'theme_options_do_page' );
function zenlite_options_add_page() {
$theme_page = add_theme_page( __( 'Theme Options', 'zenlite' ), __( 'Theme Options', 'zenlite' ), 'edit_theme_options', 'theme_options', 'zenlite_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', 'zenlite_options_add_page');
// Add basic contextual help links
function add_zenlite_contextual_help() {
......@@ -30,12 +30,12 @@ function add_zenlite_contextual_help() {
) );
}
function enqueue_theme_options_style() {
function zenlite_enqueue_options_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_print_styles-appearance_page_theme_options', 'enqueue_theme_options_style');
add_action('admin_print_styles-appearance_page_theme_options', 'zenlite_enqueue_options_style');
// Create tabs
function zenlite_option_tabs( $current = 'options' ) {
......@@ -52,7 +52,7 @@ function zenlite_option_tabs( $current = 'options' ) {
}
// Theme options form
function theme_options_do_page() {
function zenlite_options_do_page() {
global $pagenow;
$updated = false;
if ( isset( $_REQUEST['updated'] ) || isset( $_REQUEST['settings-updated'] ) ) $updated = true;?>
......@@ -108,37 +108,37 @@ function zenite_do_options_tab() {
<fieldset>
<legend><?php _e('Use the non-custom navigation menu to display links to:','zenlite'); ?></legend>
<?php $option_name = 'menu_type';
theme_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
zenlite_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
</fieldset>
<fieldset>
<legend><?php _e('Display site name &amp; tagline above header image?','zenlite'); ?></legend>
<?php $option_name = 'header_text';
theme_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
zenlite_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
</fieldset>
<fieldset>
<legend><?php _e('Display "Pages in this section" list?','zenlite'); ?></legend>
<?php $option_name = 'pagetree';
theme_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
zenlite_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
</fieldset>
<fieldset>
<legend><?php _e('Display auto-generated title on Posts/Pages without titles?','zenlite'); ?></legend>
<?php $option_name = 'notitle_display';
theme_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
zenlite_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
</fieldset>
<fieldset>
<legend><?php _e('Display author name/link on Posts?','zenlite'); ?></legend>
<?php $option_name = 'author_display';
theme_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
zenlite_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
</fieldset>
<fieldset>
<legend><?php _e('Display allowed tags on comment form?','zenlite'); ?></legend>
<?php $option_name = 'kses_display';
theme_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
zenlite_options_sort( $zenlite_all_theme_options[$option_name], $stored_options, $option_name);?>
</fieldset>
<p class="submit"><input type="submit" class="button-primary" value="<?php _e('Update Theme', 'zenlite') ?>" /></p>
......@@ -149,10 +149,10 @@ function zenite_do_options_tab() {
}
// sort inputs for display
function theme_options_sort($option_input, $stored_options, $name) {
function zenlite_options_sort($option_input, $stored_options, $name) {
switch ($option_input['type']) {
case 'radio':
theme_options_do_radio($option_input['options'], $stored_options, $name, $option_input['default']);
zenlite_options_do_radio($option_input['options'], $stored_options, $name, $option_input['default']);
break;
default:
......@@ -161,7 +161,7 @@ function theme_options_sort($option_input, $stored_options, $name) {
}
// Radio button display
function theme_options_do_radio($radio_options, $stored_options, $name, $default) {
function zenlite_options_do_radio($radio_options, $stored_options, $name, $default) {
if ( ! isset( $checked ) ) $checked = '';
foreach ( $radio_options as $option ) {
if ( isset( $stored_options[$name] ) ) {
......@@ -178,7 +178,7 @@ function theme_options_do_radio($radio_options, $stored_options, $name, $default
}
// Sanitize and validate inputs
function theme_options_validate( $input ) {
function zenlite_options_validate( $input ) {
$new_input = array();
global $zenlite_all_theme_options;
$theme_option_names = array_keys($zenlite_all_theme_options);
......
ZENLITE THEME
COPYRIGHTS & lICENSES
All theme images are copyright 2013, Mel P. and are distributed and licensed as part of the ZenLite Theme.
THEME OPTIONS
Use the top navigation menu to display links to:
......@@ -20,7 +23,7 @@ This theme has been developed to support the creation of child themes. Wherever
See <http://codex.wordpress.org/Child_Themes> for further information.
There some child themes available for this theme. See <http://quirm.net/themes/> for a full list. Bespoke/customised child themes can also be developed for a moderate fee.
There are some child themes available for this theme. See <http://quirm.net/themes/> for a full list. Bespoke/customised child themes can also be developed for a moderate fee.
SUPPORT
Free support is available at <http://forum.quirm.net/>. You can also find free support at <http://wordpress.org/support/> but, due to the high traffic on the WordPress forums, I cannot guarantee that I will notice or answer your requests for assistance.
......
......@@ -35,7 +35,7 @@ get_template_part( 'format', $format );
</ul>
<?php else : ?>
<span class="sorry"><?php printf( __('Sorry - I couldn\'t find anything on %1$s%2$s%3$s', 'zenlite'), '<span>', $zenlite_searchterm, '</span>');?></p>
<span class="sorry"><?php printf( __('Sorry - I couldn\'t find anything on %1$s%2$s%3$s', 'zenlite'), '<span>', $zenlite_searchterm, '</span>');?></span></p>
<?php endif; ?>
<?php get_footer();
\ No newline at end of file
/*
Theme Name:ZenLite
Version: 4.8
Version: 4.10
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. Support available at http://forum.quirm.net/
Author: Mel Pedley
......@@ -11,7 +11,7 @@ License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/* Copyright 2009-2012 Mel P. (email : esmi@quirm.net)
/* Copyright 2009-2013 Mel P. (email : esmi@quirm.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
......@@ -178,13 +178,15 @@ th,td {
}
/* hides skip links until activated for keyboard navigators */
ul.jumplinks,.jumplinks {
ul.jumplinks,
.jumplinks {
position:absolute;
top:-9000px;
left:-9000px;
z-index:10;
z-index:90;
}
.jumplinks a:active,.jumplinks a:focus {
.jumplinks a:active,
.jumplinks a:focus {
position:absolute;
top:9020px;
left:9010px;
......
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