Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A bunch of post format things. Content templates for each, some functions to handle default behavior. Bylines / entry-meta logic to customize per-format. Also installed fitvids and changed the happy-sub-nag to just happy-custom for all theme related js.
- Loading branch information
Showing
13 changed files
with
441 additions
and
76 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 | ||
/** | ||
* Content Template for the "Aside" post format | ||
* | ||
* Displays the "Aside" post format content to be called by get_template_part() in the various templates | ||
* | ||
* @package happy | ||
* @subpackage Template | ||
*/ | ||
?> | ||
<?php do_atomic( 'before_entry' ); // Before loop hook ?> | ||
|
||
<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> | ||
|
||
<?php do_atomic( 'open_entry' ); // Open loop hook ?> | ||
|
||
<?php get_template_part( 'loop', 'byline' ); ?> | ||
|
||
<div class="entry-content"> | ||
<?php the_content(); ?> | ||
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'happy' ), 'after' => '</p>' ) ); ?> | ||
</div><!-- .entry-content --> | ||
|
||
<?php get_template_part( 'loop', 'entry-meta' ); ?> | ||
|
||
<?php do_atomic( 'close_entry' ); // Close loop hook ?> | ||
|
||
</article><!-- .hentry --> | ||
|
||
<?php do_atomic( 'after_entry' ); // After loop hook ?> |
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,57 @@ | ||
<?php | ||
/** | ||
* Content Template for the "Gallery" post format | ||
* | ||
* Displays the "Gallery" post format content to be called by get_template_part() in the various templates | ||
* | ||
* @package happy | ||
* @subpackage Template | ||
*/ | ||
?> | ||
<?php do_atomic( 'before_entry' ); // Before loop hook ?> | ||
|
||
<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> | ||
|
||
<?php do_atomic( 'open_entry' ); // Open loop hook ?> | ||
|
||
<?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => array( 'Thumbnail' ), 'size' => 'thumbnail' ) ); ?> | ||
|
||
<header class="entry-header"> | ||
|
||
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?> | ||
|
||
<?php get_template_part( 'loop', 'byline' ); ?> | ||
|
||
</header><!-- .entry-header --> | ||
|
||
<div class="entry-summary"> | ||
|
||
<?php the_excerpt(); ?> | ||
|
||
<?php $count = happy_get_image_attachment_count(); ?> | ||
|
||
<p class="image-count"> | ||
|
||
<?php $count = apply_filters( 'happy_gallery_count', sprintf( _n( 'This gallery contains %s image. ', 'This gallery contains %s images. ', $count, 'happy' ), $count ) ); | ||
|
||
$date = apply_filters( 'happy_gallery_more', sprintf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>', | ||
esc_url( get_permalink() ), | ||
esc_attr( get_the_title() ), | ||
__( 'View All Images » ', 'happy' ) | ||
) | ||
); | ||
|
||
echo $count; | ||
echo $date; ?> | ||
|
||
</p> | ||
|
||
</div><!-- .entry-summary --> | ||
|
||
<?php get_template_part( 'loop', 'entry-meta' ); ?> | ||
|
||
<?php do_atomic( 'close_entry' ); // Close loop hook ?> | ||
|
||
</article><!-- .hentry --> | ||
|
||
<?php do_atomic( 'after_entry' ); // After loop hook ?> |
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,36 @@ | ||
<?php | ||
/** | ||
* Content Template for the "Image" post format | ||
* | ||
* Displays the "Image" post format content to be called by get_template_part() in the various templates | ||
* | ||
* @package happy | ||
* @subpackage Template | ||
*/ | ||
?> | ||
<?php do_atomic( 'before_entry' ); // Before loop hook ?> | ||
|
||
<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> | ||
|
||
<?php do_atomic( 'open_entry' ); // Open loop hook ?> | ||
|
||
<header class="entry-header"> | ||
|
||
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?> | ||
|
||
<?php get_template_part( 'loop', 'byline' ); ?> | ||
|
||
</header><!-- .entry-header --> | ||
|
||
<div class="entry-content"> | ||
<?php the_content(); ?> | ||
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'happy' ), 'after' => '</p>' ) ); ?> | ||
</div><!-- .entry-content --> | ||
|
||
<?php get_template_part( 'loop', 'entry-meta' ); ?> | ||
|
||
<?php do_atomic( 'close_entry' ); // Close loop hook ?> | ||
|
||
</article><!-- .hentry --> | ||
|
||
<?php do_atomic( 'after_entry' ); // After loop hook ?> |
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
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,36 @@ | ||
<?php | ||
/** | ||
* Content Template for the "Video" post format | ||
* | ||
* Displays the "Video" post format content to be called by get_template_part() in the various templates | ||
* | ||
* @package happy | ||
* @subpackage Template | ||
*/ | ||
?> | ||
<?php do_atomic( 'before_entry' ); // Before loop hook ?> | ||
|
||
<article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>"> | ||
|
||
<?php do_atomic( 'open_entry' ); // Open loop hook ?> | ||
|
||
<header class="entry-header"> | ||
|
||
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?> | ||
|
||
<?php get_template_part( 'loop', 'byline' ); ?> | ||
|
||
</header><!-- .entry-header --> | ||
|
||
<div class="entry-content"> | ||
<?php the_content(); ?> | ||
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'happy' ), 'after' => '</p>' ) ); ?> | ||
</div><!-- .entry-content --> | ||
|
||
<?php get_template_part( 'loop', 'entry-meta' ); ?> | ||
|
||
<?php do_atomic( 'close_entry' ); // Close loop hook ?> | ||
|
||
</article><!-- .hentry --> | ||
|
||
<?php do_atomic( 'after_entry' ); // After loop hook ?> |
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
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
Oops, something went wrong.