forked from trepmal/defenestrate
-
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
0 parents
commit 72cfb8c
Showing
23 changed files
with
2,199 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,67 @@ | ||
<?php | ||
/** | ||
* The template for displaying Comments | ||
* | ||
* The area of the page that contains comments and the comment form. | ||
* | ||
* @package WordPress | ||
* @subpackage Twenty_Fourteen | ||
* @since Twenty Fourteen 1.0 | ||
*/ | ||
|
||
/* | ||
* If the current post is protected by a password and the visitor has not yet | ||
* entered the password we will return early without loading the comments. | ||
*/ | ||
if ( post_password_required() ) { | ||
return; | ||
} | ||
?> | ||
|
||
<div id="comments" class="comments-area"> | ||
|
||
<?php if ( have_comments() ) : ?> | ||
|
||
<h2 class="comments-title"> | ||
<?php | ||
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'twentyfourteen' ), | ||
number_format_i18n( get_comments_number() ), get_the_title() ); | ||
?> | ||
</h2> | ||
|
||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> | ||
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation"> | ||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> | ||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> | ||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> | ||
</nav><!-- #comment-nav-above --> | ||
<?php endif; // Check for comment navigation. ?> | ||
|
||
<ol class="comment-list"> | ||
<?php | ||
wp_list_comments( array( | ||
'style' => 'ol', | ||
'callback' => 'defenestrate_comment', | ||
'short_ping' => true, | ||
'avatar_size'=> 40, | ||
) ); | ||
?> | ||
</ol><!-- .comment-list --> | ||
|
||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> | ||
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation"> | ||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfourteen' ); ?></h1> | ||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyfourteen' ) ); ?></div> | ||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentyfourteen' ) ); ?></div> | ||
</nav><!-- #comment-nav-below --> | ||
<?php endif; // Check for comment navigation. ?> | ||
|
||
<?php if ( ! comments_open() ) : ?> | ||
<p class="no-comments"><?php _e( 'Comments are closed.', 'twentyfourteen' ); ?></p> | ||
<?php endif; ?> | ||
|
||
<?php endif; // have_comments() ?> | ||
|
||
<?php comment_form(); ?> | ||
|
||
</div><!-- #comments --> |
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,7 @@ | ||
|
||
<article <?php post_class(); ?>> | ||
<h1><?php _e( 'Not Found', 'defenestrate' ); ?></h1> | ||
<div class="entry"> | ||
<?php _e( 'Sorry', 'defenestrate' ); ?> | ||
</div> | ||
</article> |
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 @@ | ||
|
||
<article id="post-<?php the_id(); ?>" <?php post_class(); ?>> | ||
<div class="entry-title"> | ||
<?php the_post_thumbnail('post-thumbnail'); ?> | ||
<h1 class="liner"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> | ||
</div> | ||
<div class="liner entry-content"> | ||
<?php get_template_part( 'part', 'byline' ); ?> | ||
<?php the_content(); ?> | ||
<?php wp_link_pages( array( | ||
'before' => '<nav class="paged-nav">', | ||
'after' => '</nav>', | ||
'link_before' => '<span class="paged-item">', | ||
'link_after' => '</span>', | ||
// 'next_or_number' => 'number', | ||
'separator' => '', | ||
// 'nextpagelink' => __( 'Next page' ), | ||
// 'previouspagelink' => __( 'Previous page' ), | ||
// 'pagelink' => '%-', | ||
// 'echo' => 1 | ||
) ); ?> | ||
<footer class="liner"> | ||
Posted in <?php the_category( ', ' ); the_tags( ' as well as ', ', ' ); ?>. | ||
</footer> | ||
</div> | ||
</article> | ||
<!-- <div class="liner entry-comments"> --> | ||
<?php | ||
// If comments are open or we have at least one comment, load up the comment template. | ||
if ( comments_open() || get_comments_number() ) { | ||
comments_template(); | ||
} | ||
?> | ||
<!-- </div> --> |
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,18 @@ | ||
<header class="page-footer"> | ||
<p><a href="http://trepmal.com/">trepmal*</a></p> | ||
|
||
<p> | ||
<a href="http://twitter.com/trepmal" class="genericon genericon-twitter">twitter</a> | ||
<a href="http://github.com/trepmal" class="genericon genericon-github">github</a> | ||
<a href="http://profiles.wordpress.org/trepmal" class="genericon genericon-wordpress">wordpress.org</a> | ||
<a href="http://kaileylampert.com/" class="genericon genericon-user">me</a> | ||
<a href="http://instagram.com/trepmal" class="genericon genericon-instagram">instagram</a> | ||
<a href="mailto:[email protected]" class="genericon genericon-mail">email</a> | ||
</p> | ||
|
||
<p class="little">* that's "Lampert" spelled backwards</p> | ||
</header> | ||
|
||
<?php wp_footer(); ?> | ||
</body> | ||
</html> |
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,194 @@ | ||
<?php | ||
|
||
/** | ||
* Set up the theme | ||
* | ||
* Theme Support | ||
* - menus | ||
* - background | ||
* - featured images | ||
* | ||
*/ | ||
function defenestrate_theme_setup() { | ||
|
||
register_nav_menus( array( | ||
'primary' => __( 'Top primary menu', 'defenestrate' ), | ||
'secondary' => __( 'Secondary menu in left sidebar', 'defenestrate' ), | ||
) ); | ||
|
||
add_theme_support( 'automatic-feed-links' ); | ||
|
||
add_theme_support( 'custom-background', apply_filters( 'defenestrate_custom_background_args', array( | ||
'default-color' => 'fcfcfc', | ||
) ) ); | ||
|
||
add_theme_support( 'post-thumbnails' ); | ||
set_post_thumbnail_size( 9999, 600, true ); | ||
|
||
add_theme_support( 'html5', array( | ||
'search-form', 'comment-form', 'comment-list', | ||
) ); | ||
|
||
if ( ! isset( $content_width ) ) { | ||
$content_width = 800; | ||
} | ||
|
||
} | ||
add_action( 'after_setup_theme', 'defenestrate_theme_setup' ); | ||
|
||
|
||
/** | ||
* CSS and JS Assets | ||
* | ||
* Stylesheets | ||
* - fonts | ||
* - main | ||
* | ||
* Javascript | ||
* - jquery | ||
* - comment-reply | ||
* | ||
*/ | ||
function defenestrate_css_js() { | ||
|
||
wp_enqueue_style( 'font-google', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic|Antic+Slab' ); | ||
wp_enqueue_style( 'font-genericons', get_stylesheet_directory_uri(). '/genericons/genericons.css' ); | ||
wp_enqueue_style( 'defenestrate', get_stylesheet_uri(), array( 'font-google', 'font-genericons' ) ); | ||
|
||
// wp_enqueue_script( 'jquery' ); | ||
if ( is_single() ) { | ||
wp_enqueue_script( 'comment-reply' ); | ||
} | ||
|
||
} | ||
add_action( 'wp_enqueue_scripts', 'defenestrate_css_js' ); | ||
|
||
/** | ||
* Create a nicely formatted and more specific title element text for output | ||
* in head of document, based on current view. | ||
* | ||
* @param string $title Default title text for current view. | ||
* @param string $sep Optional separator. | ||
* @return string The filtered title. | ||
*/ | ||
function defenestrate_wp_title( $title, $sep ) { | ||
global $paged, $page; | ||
|
||
if ( is_feed() ) { | ||
return $title; | ||
} | ||
|
||
// Add the site name. | ||
$title .= get_bloginfo( 'name' ); | ||
|
||
// Add the site description for the home/front page. | ||
$site_description = get_bloginfo( 'description', 'display' ); | ||
if ( $site_description && ( is_home() || is_front_page() ) ) { | ||
$title = "$title $sep $site_description"; | ||
} | ||
|
||
// Add a page number if necessary. | ||
if ( $paged >= 2 || $page >= 2 ) { | ||
$title = "$title $sep " . sprintf( __( 'Page %s', 'defenestrate' ), max( $paged, $page ) ); | ||
} | ||
|
||
return $title; | ||
} | ||
add_filter( 'wp_title', 'defenestrate_wp_title', 10, 2 ); | ||
|
||
|
||
function defenestrate_wp_link_pages_link( $link ) { | ||
$link = str_replace( '<a ', '<a class="paged-item-link" ', $link ); | ||
return $link; | ||
} | ||
// add_filter( 'wp_link_pages_link', 'defenestrate_wp_link_pages_link' ); | ||
|
||
function defenestrate_post_class( $classes, $class, $post_id ) { | ||
// var_dump($class); | ||
if ( has_post_thumbnail( $post_id) ) { | ||
$classes[] = 'has-thumbnail'; | ||
} | ||
return $classes; | ||
} | ||
add_filter( 'post_class', 'defenestrate_post_class', 10, 3 ); | ||
|
||
/** | ||
* Template for comments and pingbacks. | ||
* | ||
* To override this walker in a child theme without modifying the comments template | ||
* simply create your own defenestrate_comment(), and that function will be used instead. | ||
* | ||
* Used as a callback by wp_list_comments() for displaying the comments. | ||
* | ||
* @since Twenty Twelve 1.0 | ||
* | ||
* @return void | ||
*/ | ||
function defenestrate_comment( $comment, $args, $depth ) { | ||
$GLOBALS['comment'] = $comment; | ||
switch ( $comment->comment_type ) : | ||
case 'pingback' : | ||
case 'trackback' : | ||
// Display trackbacks differently than normal comments. | ||
?> | ||
<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> | ||
<p><?php _e( 'Pingback:', 'defenestrate' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', 'defenestrate' ), '<span class="edit-link">', '</span>' ); ?></p> | ||
<?php | ||
break; | ||
default : | ||
// Proceed with normal comments. | ||
global $post; | ||
?> | ||
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> | ||
<article id="comment-<?php comment_ID(); ?>" class="comment"> | ||
<header class="comment-meta comment-author vcard"> | ||
<?php | ||
echo get_avatar( $comment, 44 ); | ||
// edit_comment_link( __( 'Edit', 'defenestrate' ), ' <span class="edit-link">', '</span>' ); | ||
printf( '<cite><b class="fn">%1$s</b> %2$s</cite>', | ||
get_comment_author_link(), | ||
// If current post author is also comment author, make it known visually. | ||
'' | ||
// ( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'defenestrate' ) . '</span>' : '' | ||
); | ||
printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', | ||
esc_url( get_comment_link( $comment->comment_ID ) ), | ||
get_comment_time( 'c' ), | ||
/* translators: 1: date, 2: time */ | ||
sprintf( __( '%1$s at %2$s', 'defenestrate' ), get_comment_date(), get_comment_time() ) | ||
); | ||
?> | ||
</header><!-- .comment-meta --> | ||
|
||
<?php if ( '0' == $comment->comment_approved ) : ?> | ||
<p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'defenestrate' ); ?></p> | ||
<?php endif; ?> | ||
|
||
<section class="comment-content"> | ||
<?php comment_text(); ?> | ||
</section><!-- .comment-content --> | ||
|
||
<footer class="comment-meta comment-author comment-timestamp"> | ||
<?php | ||
// echo get_avatar( $comment, 44 ); | ||
// printf( '<cite><b class="fn">%1$s</b> %2$s</cite>', | ||
// get_comment_author_link(), | ||
// // If current post author is also comment author, make it known visually. | ||
// ( $comment->user_id === $post->post_author ) ? '<span>' . __( 'Post author', 'defenestrate' ) . '</span>' : '' | ||
// ); | ||
// printf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>', | ||
// esc_url( get_comment_link( $comment->comment_ID ) ), | ||
// get_comment_time( 'c' ), | ||
// /* translators: 1: date, 2: time */ | ||
// sprintf( __( '%1$s at %2$s', 'defenestrate' ), get_comment_date(), get_comment_time() ) | ||
// ); | ||
?> | ||
</header><!-- .comment-meta --> | ||
<div class="reply"> | ||
<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'defenestrate' ), 'after' => ' <span>↓</span>', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> | ||
</div><!-- .reply --> | ||
</article><!-- #comment-## --> | ||
<?php | ||
break; | ||
endswitch; // end comment_type check | ||
} |
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,9 @@ | ||
Genericons is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. | ||
|
||
The fonts are distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
||
As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. | ||
|
||
This license does not convey any intellectual property rights to third party trademarks that may be included in the icon font; such marks remain subject to all rights and guidelines of use of their owner. |
Binary file not shown.
Oops, something went wrong.