Skip to content

Commit

Permalink
add mor infos to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bueltge committed Oct 2, 2012
1 parent 227f82b commit 41409d0
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 79 deletions.
6 changes: 5 additions & 1 deletion archive.php
Expand Up @@ -8,6 +8,8 @@

if ( have_posts() ) :

tha_content_top();

/* If this is a category archive */ if ( is_category() ) { ?>
<h2><?php _e('Archive for categorie', 'documentation'); ?> &bdquo;<?php echo single_cat_title(); ?>&ldquo;</h2>
<?php /* If this is a daily archive */ } elseif ( is_day() ) { ?>
Expand Down Expand Up @@ -81,7 +83,9 @@
* called no-results-single.php and that will be used instead.
*/
get_template_part( 'parts/no-results', 'home' );


tha_content_bottom();

endif;

get_footer();
17 changes: 11 additions & 6 deletions comments.php
Expand Up @@ -11,10 +11,13 @@
* @subpackage Documentation
* @since 2.0.0
*/
?>
<div id="comments">

tha_comments_before(); ?>

<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'documentation' ); ?></p>
<?php tha_comments_after(); ?>
</div><!-- #comments -->
<?php
/* Stop the rest of comments.php from being processed,
Expand Down Expand Up @@ -54,13 +57,15 @@
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'documentation' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>

<?php // If there are no comments and comments are closed, let's leave a note.
elseif ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'documentation' ); ?></p>
<?php endif; ?>

<?php comment_form(); ?>


<?php
comment_form();

tha_comments_after(); ?>
</div><!-- #comments -->
18 changes: 15 additions & 3 deletions footer.php
Expand Up @@ -3,15 +3,22 @@
* @package WordPress
* @subpackage Documentation
*/


tha_content_after();

if ( ! is_singular() )
documentation_get_paginate_bar();
?>
</div>

<?php get_sidebar(); ?>
<?php
get_sidebar();

tha_footer_before();
?>

<div id="footer">
<?php tha_footer_top(); ?>
<p>&copy; 2007 - <?php echo date( 'Y' ); ?> | <a href="<?php home_url( '/' ); ?>" class="site-name"><?php bloginfo( 'name' ); ?></a>
<?php
if ( defined( 'WP_DEBUG' ) && WP_DEBUG )
Expand All @@ -26,9 +33,14 @@
echo apply_filters( 'loginout', $link );
?>
</p>
<?php tha_footer_bottom(); ?>
</div>

<?php wp_footer(); ?>
<?php
wp_footer();

tha_footer_after();
?>
</div>
</body>
</html>
59 changes: 34 additions & 25 deletions functions.php
Expand Up @@ -5,16 +5,6 @@
* @version 08/09/2012
*/

/**
* Post content often has specified width.
* Thus, images which has bigger size than content width can break up the layout of theme.
* To prevent this situation, WordPress provides one way to specify the maximum image size for themes.
* Define the maximum image size
*/
if ( ! isset( $content_width ) )
$content_width = 900;


if ( ! function_exists( 'documentation_setup' ) ) {

add_action( 'after_setup_theme', 'documentation_setup' );
Expand All @@ -29,6 +19,16 @@
* @return void
*/
function documentation_setup() {

/**
* Post content often has specified width.
* Thus, images which has bigger size than content width can break up the layout of theme.
* To prevent this situation, WordPress provides one way to specify the maximum image size for themes.
* Define the maximum image size
*/
if ( ! isset( $GLOBALS['content_width'] ) )
$GLOBALS['content_width'] = 900;

/**
* Make Documentation available for translation.
* Translations can be added to the /languages/ directory.
Expand All @@ -45,24 +45,33 @@ function documentation_setup() {
require_once( get_template_directory() . '/inc/class-branding.php' );
new Documentation_Admin_Branding( array() );

// params for options class
$args = array(
'theme_key' => strtolower( get_stylesheet() )
);

/**
* CURRENT DON'T LOAD WITHOUT CUSTOMIZER; BUT WITH MORE WORK FOR CODERS
// Load up our theme options page and related code.
require_once( get_template_directory() . '/inc/theme-options.php' );
$documentation_options = new Documentation_Options( $args );
*/
* Add support for Theme Customizer
*
* @since 09/06/2012
*/
add_theme_support( 'documentation_customizer', array( 'all' ) );
// Include the theme customizer for options of theme options, if theme supported
require_if_theme_supports( 'documentation_customizer', get_template_directory() . '/inc/theme-customize.php' );

// Include the theme customizer for options of theme options
require_once( get_template_directory() . '/inc/theme-customize.php' );
$documentation_customize = new Documentation_Customize( $args );
/**
* Add support for custom style to write in head
*
* @since 09/06/2012
*/
add_theme_support( 'documentation_head_style', array( 'all' ) );
// include to write the custom theme options in theme head
require_once( get_template_directory() . '/inc/head-style.php' );
$documentation_head_style = new Documentation_Head_Style( $args );
require_if_theme_supports( 'documentation_head_style', get_template_directory() . '/inc/head-style.php' );

/**
* Add support for the hook alliance
*
* @see https://github.com/zamoose/themehookalliance
* @since 10/02/2012
*/
add_theme_support( 'tha_hooks', array( 'all' ) );
// include the file from this project, if theme supported
require_if_theme_supports( 'tha_hooks', get_template_directory() . '/inc/tha/tha-theme-hooks.php' );

// Add default posts and comments RSS feed links to <head>.
add_theme_support( 'automatic-feed-links' );
Expand Down
12 changes: 10 additions & 2 deletions header.php
Expand Up @@ -10,6 +10,7 @@
<html <?php language_attributes(); ?>>

<head>
<?php tha_head_top(); ?>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />

Expand All @@ -18,6 +19,7 @@
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="Shortcut Icon" type="image/x-icon" href="favicon.ico" />
<?php
tha_head_bottom();
wp_head();

if ( is_singular() )
Expand All @@ -27,7 +29,9 @@

<body <?php body_class(); ?>>
<div id="wrap" class="hfeed">
<?php tha_header_before(); ?>
<div id="header">
<?php tha_header_top(); ?>
<p id="login"><?php
$redirect = documentation_get_options( 'rewrite_url' );
if ( ! is_user_logged_in() ) {
Expand All @@ -52,7 +56,11 @@
$header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
<?php endif; ?>
<?php endif;
tha_header_bottom();
?>
</div>

<?php tha_header_after(); ?>
<div id="content">

<?php tha_content_before(); ?>
3 changes: 2 additions & 1 deletion inc/head-style.php
Expand Up @@ -126,4 +126,5 @@ public function enqueue_color_scheme() {
do_action( $this->theme_key . '_enqueue_color_scheme', $option );
}

} // end class
} // end class
$documentation_head_style = new Documentation_Head_Style();
7 changes: 5 additions & 2 deletions inc/theme-customize.php
Expand Up @@ -227,9 +227,11 @@ public function customize_register( $wp_customize ) {
*/
public function customize_preview_js() {

$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';

wp_register_script(
$this->theme_key . '-customizer',
get_template_directory_uri() . '/js/theme-customizer.js',
get_template_directory_uri() . '/js/theme-customizer' . $suffix . '.js',
array( 'customize-preview' ),
FALSE,
TRUE
Expand All @@ -238,4 +240,5 @@ public function customize_preview_js() {
wp_enqueue_script( $this->theme_key . '-customizer' );
}

} // end class
} // end class
$documentation_customize = new Documentation_Customize();
3 changes: 2 additions & 1 deletion inc/theme-options.php
Expand Up @@ -334,4 +334,5 @@ public function validate( $input ) {
return apply_filters( $this->theme_key . '_options_validate', $output, $input, $defaults );
}

} // end class
} // end class
$documentation_options = new Documentation_Options();
8 changes: 6 additions & 2 deletions index.php
Expand Up @@ -7,7 +7,9 @@
get_header();

if ( have_posts() ) :


tha_content_top();

/* If this is a category archive */ if ( is_category() ) { ?>
<h2><?php _e('Archive for categorie', 'documentation'); ?> &bdquo;<?php echo single_cat_title(); ?>&ldquo;</h2>
<?php /* If this is a daily archive */ } elseif ( is_day() ) { ?>
Expand Down Expand Up @@ -73,6 +75,7 @@

<?php
endwhile;

else:

/**
Expand All @@ -81,7 +84,8 @@
* called no-results-single.php and that will be used instead.
*/
get_template_part( 'parts/no-results', 'home' );


tha_content_bottom();
endif;

get_footer();
27 changes: 1 addition & 26 deletions js/theme-customizer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion page.php
Expand Up @@ -7,6 +7,9 @@
get_header();

if ( have_posts() ) :

tha_content_top();

while ( have_posts() ) :
the_post(); ?>

Expand Down Expand Up @@ -43,7 +46,9 @@
* called no-results-single.php and that will be used instead.
*/
get_template_part( 'parts/no-results', 'home' );


tha_content_bottom();

endif;

get_footer();
7 changes: 6 additions & 1 deletion readme.md
@@ -1,8 +1,10 @@
# Documentation
A small theme for WordPress as a documentation-tool.

*old theme, but on maintenance*

## Descripton
A theme with simple structure, different settings and possibilities with the forus to documentize a topic with WordPress.
A theme with simple structure, different settings and possibilities with the focus to documentize a topic with WordPress.
The supports custom settings for background, header, text- and link color and different more. It is possible to set the settings on frontend with the possibilities of the theme Customizer in WordPress.

## Installation
Expand All @@ -11,6 +13,9 @@ The supports custom settings for background, header, text- and link color and di
* PHP 5.2*

## Other Notes
### Supported Theme Hook Alliance
**What? Why?**
Please see the description to this project on [github.com/zamoose/themehookalliance](https://github.com/zamoose/themehookalliance)
### Licence
Good news, this theme is free for everyone! Since it's released under the GPL, you can use it free of charge on your personal or commercial blog.

Expand Down
15 changes: 11 additions & 4 deletions sidebar.php
Expand Up @@ -3,9 +3,13 @@
* @package WordPress
* @subpackage Documentation
*/

tha_sidebars_before();
?>
<div id="sidebar">


<?php tha_sidebar_top(); ?>

<ul class="primary-widget-area">

<?php if ( class_exists('SitePress') ) { ?>
Expand Down Expand Up @@ -51,7 +55,10 @@
<ul class="secondary-widget-area">
<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
</ul>
<?php endif; ?>

<?php endif;

tha_sidebar_bottom();
?>
</div>


<?php tha_sidebars_after(); ?>

0 comments on commit 41409d0

Please sign in to comment.