Permalink
Browse files

first commit

  • Loading branch information...
andrewspittle committed Mar 28, 2011
0 parents commit dc8bb52dbadefae0c8c34cbdebad24c791e7191d
Showing with 1,090 additions and 0 deletions.
  1. +13 −0 404.php
  2. +39 −0 archive.php
  3. +9 −0 attachment.php
  4. +64 −0 comments.php
  5. +12 −0 footer.php
  6. +85 −0 functions.php
  7. +53 −0 header.php
  8. +10 −0 index.php
  9. +76 −0 loop-attachment.php
  10. +19 −0 loop-page.php
  11. +39 −0 loop-single.php
  12. +115 −0 loop.php
  13. +9 −0 page.php
  14. BIN screenshot.png
  15. +25 −0 search.php
  16. +6 −0 searchform.php
  17. +9 −0 single.php
  18. +507 −0 style.css
13 404.php
@@ -0,0 +1,13 @@
+<?php get_header(); ?>
+
+ <div id="content">
+
+ <h2><a href="/"><?php bloginfo('name'); ?></a> : <b>not found</b></h2>
+<br>
+<br>
+Our search is lonely,<br>
+as futile as this lost page<br>
+Let's <a href="<?php echo get_option('home'); ?>/">go home</a> instead.
+ </div>
+
+<?php get_footer(); ?>
@@ -0,0 +1,39 @@
+<?php get_header(); ?>
+
+ <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>', 'mnmlist' ), get_the_date() ); ?>
+<?php elseif ( is_month() ) : ?>
+ <?php printf( __( 'Monthly Archives: <span>%s</span>', 'mnmlist' ), get_the_date( 'F Y' ) ); ?>
+<?php elseif ( is_year() ) : ?>
+ <?php printf( __( 'Yearly Archives: <span>%s</span>', 'mnmlist' ), get_the_date( 'Y' ) ); ?>
+<?php elseif ( is_category() ) : ?>
+ <?php printf( __( 'Category Archives: %s', 'mnmlist' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?>
+<?php elseif ( is_author() ) : ?>
+ <?php printf( __( 'Author Archives: %s', 'mnmlist' ), get_the_author() ); ?>
+<?php else : ?>
+ <?php _e( 'Blog Archives', 'mnmlist' ); ?>
+<?php endif; ?>
+ </h1>
+
+<?php
+ rewind_posts();
+ get_template_part( 'loop', 'archive' );
+?>
+
+ </div><!-- #content -->
+
+<?php get_footer(); ?>
@@ -0,0 +1,9 @@
+<?php get_header(); ?>
+
+ <div id="content" role="main">
+
+ <?php get_template_part( 'loop', 'attachment' ); ?>
+
+ </div><!-- #content -->
+
+<?php get_footer(); ?>
@@ -0,0 +1,64 @@
+ <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.', 'mnmlist' ); ?></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(), 'mnmlist' ),
+ 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">&larr;</span> Older Comments', 'mnmlist' ) ); ?></div>
+ <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'mnmlist' ) ); ?></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 mnmlist_comment() to format the comments.
+ * If you want to overload this in a child theme then you can
+ * define mnmlist_comment() and that will be used instead.
+ * See mnmlist_comment() in mnmlist/functions.php for more.
+ */
+ wp_list_comments( array( 'callback' => 'mnmlist_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">&larr;</span> Older Comments', 'mnmlist' ) ); ?></div>
+ <div class="nav-next"><?php next_comments_link( __( 'Newer Comments <span class="meta-nav">&rarr;</span>', 'mnmlist' ) ); ?></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.', 'mnmlist' ); ?></p>
+<?php endif; // end ! comments_open() ?>
+
+<?php endif; // end have_comments() ?>
+
+<?php comment_form(); ?>
+
+</div><!-- #comments -->
@@ -0,0 +1,12 @@
+<div id="footer">
+ <ul>
+ <?php wp_list_pages('depth=1&title_li='); ?>
+ </ul>
+ <?php get_search_form(); ?>
+</div>
+</div>
+
+<?php wp_footer(); ?>
+
+</body>
+</html>
@@ -0,0 +1,85 @@
+<?php
+if ( ! isset( $content_width ) )
+ $content_width = 560;
+
+/** Tell WordPress to run mnmlist_setup() when the 'after_setup_theme' hook is run. */
+add_action( 'after_setup_theme', 'mnmlist_setup' );
+
+if ( ! function_exists( 'mnmlist_setup' ) ):
+function mnmlist_setup() {
+
+ // Post Format support. You can also use the legacy "gallery" or "asides" (note the plural) categories.
+ add_theme_support( 'post-formats', array( 'aside', 'gallery', 'status' ) );
+
+}
+endif;
+
+/**
+ * Remove inline styles printed when the gallery shortcode is used.
+ */
+add_filter( 'use_default_gallery_style', '__return_false' );
+
+/**
+ * Deprecated way to remove inline styles printed when the gallery shortcode is used.
+ *
+ * This function is no longer needed or used. Use the use_default_gallery_style
+ * filter instead, as seen above.
+ *
+ */
+function mnmlist_remove_gallery_css( $css ) {
+ return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
+}
+// Backwards compatibility with WordPress 3.0.
+if ( version_compare( $GLOBALS['wp_version'], '3.1', '<' ) )
+ add_filter( 'gallery_style', 'mnmlist_remove_gallery_css' );
+
+if ( ! function_exists( 'mnmlist_comment' ) ) :
+function mnmlist_comment( $comment, $args, $depth ) {
+ $GLOBALS['comment'] = $comment;
+ switch ( $comment->comment_type ) :
+ case '' :
+ ?>
+ <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
+ <div id="comment-<?php comment_ID(); ?>">
+ <div class="comment-author vcard">
+ <?php echo get_avatar( $comment, 40 ); ?>
+ <?php printf( __( '%s <span class="says">says:</span>', 'mnmlist' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
+ </div><!-- .comment-author .vcard -->
+ <?php if ( $comment->comment_approved == '0' ) : ?>
+ <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'mnmlist' ); ?></em>
+ <br />
+ <?php endif; ?>
+
+ <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
+ <?php
+ /* translators: 1: date, 2: time */
+ printf( __( '%1$s at %2$s', 'mnmlist' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'mnmlist' ), ' ' );
+ ?>
+ </div><!-- .comment-meta .commentmetadata -->
+
+ <div class="comment-body"><?php comment_text(); ?></div>
+
+ <div class="reply">
+ <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
+ </div><!-- .reply -->
+ </div><!-- #comment-## -->
+
+ <?php
+ break;
+ case 'pingback' :
+ case 'trackback' :
+ ?>
+ <li class="post pingback">
+ <p><?php _e( 'Pingback:', 'mnmlist' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'mnmlist' ), ' ' ); ?></p>
+ <?php
+ break;
+ endswitch;
+}
+endif;
+/* Props Noel http://blog.noel.io/tweet-this-wordpress-function/ */
+function tweet_this() {
+ global $post;
+ $tweet = sprintf( __('Currently reading %1$s %2$s'), $post->post_title, wp_get_shortlink() );
+ echo '<a class="tweethis" href="http://twitter.com/home?status=' . urlencode( $tweet ) . '">Tweet this</a>';
+}
+?>
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML>
+<html lang=en>
+
+<head profile="http://gmpg.org/xfn/11">
+<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+
+<title><?php
+ /*
+ * Print the <title> tag based on what is being viewed.
+ */
+ global $page, $paged;
+
+ wp_title( '|', true, 'right' );
+
+ // Add the blog name.
+ bloginfo( 'name' );
+
+ // Add the blog description for the home/front page.
+ $site_description = get_bloginfo( 'description', 'display' );
+ if ( $site_description && ( is_home() || is_front_page() ) )
+ echo " | $site_description";
+
+ // Add a page number if necessary:
+ if ( $paged >= 2 || $page >= 2 )
+ echo ' | ' . sprintf( __( 'Page %s', 'mnmlist' ), max( $paged, $page ) );
+
+ ?></title>
+
+<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
+<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
+<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
+
+<?php
+ /* We add some JavaScript to pages with the comment form
+ * to support sites with threaded comments (when in use).
+ */
+ if ( is_singular() && get_option( 'thread_comments' ) )
+ wp_enqueue_script( 'comment-reply' );
+
+ /* Always have wp_head() just before the closing </head>
+ * tag of your theme, or you will break many plugins, which
+ * generally use this hook to add elements to <head> such
+ * as styles, scripts, and meta tags.
+ */
+ wp_head();
+?>
+</head>
+<body <?php body_class(); ?>>
+
+<div id="container">
+
+ <h1 id="site-title"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
+ <div id="site-description"><?php bloginfo( 'description' ); ?></div>
@@ -0,0 +1,10 @@
+<?php get_header(); ?>
+
+ <div id="content" role="main">
+
+ <?php get_template_part( 'loop', 'index' ); ?>
+
+ </div><!-- #content -->
+
+
+<?php get_footer(); ?>
@@ -0,0 +1,76 @@
+<?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', 'mnmlist' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
+ /* translators: %s - title of parent post */
+ printf( __( '<span class="meta-nav">&larr;</span> %s', 'mnmlist' ), 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">Published</span> %2$s', 'mnmlist' ),
+ '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', 'mnmlist' ),
+ sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
+ wp_get_attachment_url(),
+ esc_attr( __( 'Link to full-size image', 'mnmlist' ) ),
+ $metadata['width'],
+ $metadata['height']
+ )
+ );
+ }
+ ?>
+ </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_width = apply_filters( 'mnmlist_attachment_size', 540 );
+ $attachment_height = apply_filters( 'mnmlist_attachment_height', 540 );
+ echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // 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, '&larr; Previous image' ); ?></div>
+ <div class="nav-next"><?php next_image_link( false, 'Next image &rarr;' ); ?></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><!-- .entry-content -->
+ </div><!-- #post-## -->
+
+<?php endwhile; // end of the loop. ?>
@@ -0,0 +1,19 @@
+<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+
+ <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <h2 class="entry-title"><?php the_title(); ?></h2>
+
+ <div class="entry">
+
+ <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
+
+ <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
+
+ </div>
+ </div>
+
+ <?php comments_template( '', true ); ?>
+
+<?php endwhile; ?>
+
+<span class="edit-link"><?php edit_post_link('Edit', '<p>', '</p>'); ?></span>
Oops, something went wrong.

0 comments on commit dc8bb52

Please sign in to comment.