forked from cyrilleberger/calligra-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cyrille Berger
committed
Nov 14, 2010
0 parents
commit 07a5900
Showing
42 changed files
with
4,226 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* The template for displaying 404 pages (Not Found). | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Ten | ||
* @since Twenty Ten 1.0 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<div id="container"> | ||
<div id="content" role="main"> | ||
|
||
<div id="post-0" class="post error404 not-found"> | ||
<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> | ||
<div class="entry-content"> | ||
<p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'twentyten' ); ?></p> | ||
<?php get_search_form(); ?> | ||
</div><!-- .entry-content --> | ||
</div><!-- #post-0 --> | ||
|
||
</div><!-- #content --> | ||
</div><!-- #container --> | ||
<script type="text/javascript"> | ||
// focus on search field after it has loaded | ||
document.getElementById('s') && document.getElementById('s').focus(); | ||
</script> | ||
|
||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
/** | ||
* The template for displaying Archive pages. | ||
* | ||
* Used to display archive-type pages if nothing more specific matches a query. | ||
* For example, puts together date-based pages if no date.php file exists. | ||
* | ||
* Learn more: http://codex.wordpress.org/Template_Hierarchy | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Ten | ||
* @since Twenty Ten 1.0 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<div id="container"> | ||
<div id="content" role="main"> | ||
|
||
<?php | ||
/* Queue the first post, that way we know | ||
* what date we're dealing with (if that is the case). | ||
* | ||
* We reset this later so we can run the loop | ||
* properly with a call to rewind_posts(). | ||
*/ | ||
if ( have_posts() ) | ||
the_post(); | ||
?> | ||
|
||
<h1 class="page-title"> | ||
<?php if ( is_day() ) : ?> | ||
<?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?> | ||
<?php elseif ( is_month() ) : ?> | ||
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?> | ||
<?php elseif ( is_year() ) : ?> | ||
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?> | ||
<?php else : ?> | ||
<?php _e( 'Blog Archives', 'twentyten' ); ?> | ||
<?php endif; ?> | ||
</h1> | ||
|
||
<?php | ||
/* Since we called the_post() above, we need to | ||
* rewind the loop back to the beginning that way | ||
* we can run the loop properly, in full. | ||
*/ | ||
rewind_posts(); | ||
|
||
/* Run the loop for the archives page to output the posts. | ||
* If you want to overload this in a child theme then include a file | ||
* called loop-archives.php and that will be used instead. | ||
*/ | ||
get_template_part( 'loop', 'archive' ); | ||
?> | ||
|
||
</div><!-- #content --> | ||
</div><!-- #container --> | ||
|
||
<?php get_sidebar(); ?> | ||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?php | ||
/** | ||
* The template for displaying attachments. | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Ten | ||
* @since Twenty Ten 1.0 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<div id="container" class="single-attachment"> | ||
<div id="content" role="main"> | ||
|
||
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> | ||
|
||
<?php if ( ! empty( $post->post_parent ) ) : ?> | ||
<p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php | ||
/* translators: %s - title of parent post */ | ||
printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) ); | ||
?></a></p> | ||
<?php endif; ?> | ||
|
||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
<h2 class="entry-title"><?php the_title(); ?></h2> | ||
|
||
<div class="entry-meta"> | ||
<?php | ||
printf(__('<span class="%1$s">By</span> %2$s', 'twentyten'), | ||
'meta-prep meta-prep-author', | ||
sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', | ||
get_author_posts_url( get_the_author_meta( 'ID' ) ), | ||
sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), | ||
get_the_author() | ||
) | ||
); | ||
?> | ||
<span class="meta-sep">|</span> | ||
<?php | ||
printf( __('<span class="%1$s">Published</span> %2$s', 'twentyten'), | ||
'meta-prep meta-prep-entry-date', | ||
sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>', | ||
esc_attr( get_the_time() ), | ||
get_the_date() | ||
) | ||
); | ||
if ( wp_attachment_is_image() ) { | ||
echo ' <span class="meta-sep">|</span> '; | ||
$metadata = wp_get_attachment_metadata(); | ||
printf( __( 'Full size is %s pixels', 'twentyten'), | ||
sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>', | ||
wp_get_attachment_url(), | ||
esc_attr( __('Link to full-size image', 'twentyten') ), | ||
$metadata['width'], | ||
$metadata['height'] | ||
) | ||
); | ||
} | ||
?> | ||
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> | ||
</div><!-- .entry-meta --> | ||
|
||
<div class="entry-content"> | ||
<div class="entry-attachment"> | ||
<?php if ( wp_attachment_is_image() ) : | ||
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); | ||
foreach ( $attachments as $k => $attachment ) { | ||
if ( $attachment->ID == $post->ID ) | ||
break; | ||
} | ||
$k++; | ||
// If there is more than 1 image attachment in a gallery | ||
if ( count( $attachments ) > 1 ) { | ||
if ( isset( $attachments[ $k ] ) ) | ||
// get the URL of the next image attachment | ||
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); | ||
else | ||
// or get the URL of the first image attachment | ||
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); | ||
} else { | ||
// or, if there's only 1 image attachment, get the URL of the image | ||
$next_attachment_url = wp_get_attachment_url(); | ||
} | ||
?> | ||
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php | ||
$attachment_size = apply_filters( 'twentyten_attachment_size', 900 ); | ||
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height. | ||
?></a></p> | ||
|
||
<div id="nav-below" class="navigation"> | ||
<div class="nav-previous"><?php previous_image_link( false ); ?></div> | ||
<div class="nav-next"><?php next_image_link( false ); ?></div> | ||
</div><!-- #nav-below --> | ||
<?php else : ?> | ||
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a> | ||
<?php endif; ?> | ||
</div><!-- .entry-attachment --> | ||
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div> | ||
|
||
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> | ||
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> | ||
|
||
</div><!-- .entry-content --> | ||
|
||
<div class="entry-utility"> | ||
<?php twentyten_posted_in(); ?> | ||
<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?> | ||
</div><!-- .entry-utility --> | ||
</div><!-- #post-## --> | ||
|
||
<?php comments_template(); ?> | ||
|
||
<?php endwhile; ?> | ||
|
||
</div><!-- #content --> | ||
</div><!-- #container --> | ||
|
||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?php | ||
/** | ||
* The template for displaying Author Archive pages. | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Ten | ||
* @since Twenty Ten 1.0 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<div id="container"> | ||
<div id="content" role="main"> | ||
|
||
<?php | ||
/* Queue the first post, that way we know who | ||
* the author is when we try to get their name, | ||
* URL, description, avatar, etc. | ||
* | ||
* We reset this later so we can run the loop | ||
* properly with a call to rewind_posts(). | ||
*/ | ||
if ( have_posts() ) | ||
the_post(); | ||
?> | ||
|
||
<h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1> | ||
|
||
<?php | ||
// If a user has filled out their description, show a bio on their entries. | ||
if ( get_the_author_meta( 'description' ) ) : ?> | ||
<div id="entry-author-info"> | ||
<div id="author-avatar"> | ||
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> | ||
</div><!-- #author-avatar --> | ||
<div id="author-description"> | ||
<h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2> | ||
<?php the_author_meta( 'description' ); ?> | ||
</div><!-- #author-description --> | ||
</div><!-- #entry-author-info --> | ||
<?php endif; ?> | ||
|
||
<?php | ||
/* Since we called the_post() above, we need to | ||
* rewind the loop back to the beginning that way | ||
* we can run the loop properly, in full. | ||
*/ | ||
rewind_posts(); | ||
|
||
/* Run the loop for the author archive page to output the authors posts | ||
* If you want to overload this in a child theme then include a file | ||
* called loop-author.php and that will be used instead. | ||
*/ | ||
get_template_part( 'loop', 'author' ); | ||
?> | ||
</div><!-- #content --> | ||
</div><!-- #container --> | ||
|
||
<?php get_sidebar(); ?> | ||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* The template for displaying Category Archive pages. | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Ten | ||
* @since Twenty Ten 1.0 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
||
<div id="container"> | ||
<div id="content" role="main"> | ||
|
||
<h1 class="page-title"><?php | ||
printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); | ||
?></h1> | ||
<?php | ||
$category_description = category_description(); | ||
if ( ! empty( $category_description ) ) | ||
echo '<div class="archive-meta">' . $category_description . '</div>'; | ||
|
||
/* Run the loop for the category page to output the posts. | ||
* If you want to overload this in a child theme then include a file | ||
* called loop-category.php and that will be used instead. | ||
*/ | ||
get_template_part( 'loop', 'category' ); | ||
?> | ||
|
||
</div><!-- #content --> | ||
</div><!-- #container --> | ||
|
||
<?php get_sidebar(); ?> | ||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?php | ||
/** | ||
* The template for displaying Comments. | ||
* | ||
* The area of the page that contains both current comments | ||
* and the comment form. The actual display of comments is | ||
* handled by a callback to twentyten_comment which is | ||
* located in the functions.php file. | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Ten | ||
* @since Twenty Ten 1.0 | ||
*/ | ||
?> | ||
|
||
<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.', 'twentyten' ); ?></p> | ||
</div><!-- #comments --> | ||
<?php | ||
/* Stop the rest of comments.php from being processed, | ||
* but don't kill the script entirely -- we still have | ||
* to fully load the template. | ||
*/ | ||
return; | ||
endif; | ||
?> | ||
|
||
<?php | ||
// You can start editing here -- including this comment! | ||
?> | ||
|
||
<?php if ( have_comments() ) : ?> | ||
<h3 id="comments-title"><?php | ||
printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), | ||
number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); | ||
?></h3> | ||
|
||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> | ||
<div class="navigation"> | ||
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> | ||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> | ||
</div> <!-- .navigation --> | ||
<?php endif; // check for comment navigation ?> | ||
|
||
<ol class="commentlist"> | ||
<?php | ||
/* Loop through and list the comments. Tell wp_list_comments() | ||
* to use twentyten_comment() to format the comments. | ||
* If you want to overload this in a child theme then you can | ||
* define twentyten_comment() and that will be used instead. | ||
* See twentyten_comment() in twentyten/functions.php for more. | ||
*/ | ||
wp_list_comments( array( 'callback' => 'twentyten_comment' ) ); | ||
?> | ||
</ol> | ||
|
||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?> | ||
<div class="navigation"> | ||
<div class="nav-previous"><?php previous_comments_link( __( '<span class="meta-nav">←</span> Older Comments', 'twentyten' ) ); ?></div> | ||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> | ||
</div><!-- .navigation --> | ||
<?php endif; // check for comment navigation ?> | ||
|
||
<?php else : // or, if we don't have comments: | ||
|
||
/* If there are no comments and comments are closed, | ||
* let's leave a little note, shall we? | ||
*/ | ||
if ( ! comments_open() ) : | ||
?> | ||
<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p> | ||
<?php endif; // end ! comments_open() ?> | ||
|
||
<?php endif; // end have_comments() ?> | ||
|
||
<?php comment_form(); ?> | ||
|
||
</div><!-- #comments --> |
Oops, something went wrong.