Skip to content

Commit

Permalink
Merge pull request #17 from ScottSmith95/2.9.3
Browse files Browse the repository at this point in the history
Decode 2.9.3
  • Loading branch information
ScottSmith95 committed Apr 14, 2014
2 parents 8f3a460 + f452808 commit 423889d
Show file tree
Hide file tree
Showing 47 changed files with 2,016 additions and 1,250 deletions.
55 changes: 36 additions & 19 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,29 @@
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'decode' ); ?></p>
<?php endif; ?>

<?php
if (get_theme_mod( 'show_allowed_tags', false ) == true ) {
$comments_args = array(
'title_reply' => __( 'Leave a Reply', 'decode' ),
'title_reply_to' => __( 'Leave a Reply to %s', 'decode' ),
'cancel_reply_link' => __( 'Cancel reply', 'decode' ),
'label_submit' => __( 'Post Comment', 'decode' ),
);
}

else {
$comments_args = array(
'comment_notes_after' => '',
'title_reply' => __( 'Leave a Reply', 'decode' ),
'title_reply_to' => __( 'Leave a Reply to %s', 'decode' ),
'cancel_reply_link' => __( 'Cancel reply', 'decode' ),
'label_submit' => __( 'Post Comment', 'decode' ),
);
}
?>

<?php comment_form( array(
'title_reply' => __( 'Leave a Reply', 'decode' ),
'title_reply_to' => __( 'Leave a Reply to %s', 'decode' ),
'cancel_reply_link' => __( 'Cancel reply', 'decode' ),
'label_submit' => __( 'Post Comment', 'decode' ),
) ); ?>
<?php comment_form( $comments_args ); ?>

<?php
_x( 'Comment', 'noun', 'decode' );
Expand All @@ -86,20 +102,21 @@
__( 'You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', 'decode' );
?>


<script>
function hasClass(el, cls) {
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
}

var target = document.querySelector('.form-allowed-tags');

document.querySelector('textarea#comment').addEventListener('click', function() {
if (!hasClass(target, 'visible')) {
target.className += ' ' + 'visible';
<?php if (get_theme_mod( 'show_allowed_tags', false ) == true ) : ?>
<script>
function hasClass(el, cls) {
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
}
}, false);
</script>

var target = document.querySelector('.form-allowed-tags');

document.querySelector('textarea#comment').addEventListener('click', function() {
if (!hasClass(target, 'visible')) {
target.className += ' ' + 'visible';
}
}, false);
</script>
<?php endif; ?>

</div><!-- #comments -->
<?php tha_comments_after(); ?>
Expand Down
8 changes: 4 additions & 4 deletions content-excerpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@
<?php endif; ?>
<div class="entry-title"><h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div>
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'above' && get_theme_mod( 'show_entry_date_on_excerpts', false ) == true ) : ?>
<div class="entry-meta above-content">
<div class="entry-meta">
<p class="date"><?php decode_posted_on(); ?></p>
</div><!-- .entry-meta -->
</div>
<?php endif; ?>
</header><!-- .entry-header -->

<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->

<footer class="entry-meta">
<footer class="entry-footer">
<a class="read-more-link" href="<?php echo get_permalink(); ?>"><?php _e('Read More&hellip;', 'decode'); ?></a>
<?php edit_post_link( __( 'Edit', 'decode' ), '<div class="edit-link">', '</div>' ); ?>
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'below' && get_theme_mod( 'show_entry_date_on_excerpts', false ) == true ) : ?>
<p class="date"><?php decode_posted_on(); ?></p>
<?php endif; ?>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
Expand Down
8 changes: 4 additions & 4 deletions content-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<?php endif; ?>
<div class="entry-title"><h2><?php decode_print_post_title() ?><?php if ( get_theme_mod( 'link_post_title_arrow', false ) == true ) echo '<span class="link-title-arrow">&#8594;</span>'; ?></h2></div>
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'above' ) : ?>
<div class="entry-meta above-content">
<div class="entry-meta">
<p class="date"><?php decode_posted_on(); ?></p>
</div><!-- .entry-meta -->
</div>
<?php endif; ?>
</header><!-- .entry-header -->

Expand All @@ -28,7 +28,7 @@

<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<footer class="entry-meta">
<footer class="entry-footer">
<?php if (get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<div class="comments-link <?php echo get_theme_mod( 'enable_comments', '' ); ?>"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
<?php endif; ?>
Expand All @@ -42,7 +42,7 @@
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'below' ) : ?>
<p class="date"><?php decode_posted_on(); ?></p>
<?php endif; ?>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
Expand Down
9 changes: 4 additions & 5 deletions content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
</header><!-- .entry-header -->

<div class="entry-content">

<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<footer>
<?php edit_post_link( __( 'Edit', 'decode' ), '<span class="edit-link">', '</span>' ); ?>
</footer>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

</div><!-- .entry-content -->

<?php edit_post_link( __( 'Edit', '_s' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer>' ); ?>

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php tha_entry_after(); ?>
4 changes: 2 additions & 2 deletions content-quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<footer class="entry-meta">
<footer class="entry-footer">
<?php if (get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<div class="comments-link <?php echo get_theme_mod( 'enable_comments', '' ); ?>"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
<?php endif; ?>
Expand All @@ -26,7 +26,7 @@
<p class="categories"><?php _e( 'Categorized in&#58; ', 'decode') . the_category(', '); ?></p>
<?php endif; ?>
<p class="date"><?php decode_posted_on(); ?></p>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
Expand Down
5 changes: 2 additions & 3 deletions content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
</a>
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'decode' ), '<div class="edit-link">', '</div>' ); ?>
</footer>

<?php edit_post_link( __( 'Edit', '_s' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer>' ); ?>

</article><!-- #post-<?php the_ID(); ?> -->
16 changes: 8 additions & 8 deletions content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div class="entry-content"><?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'decode' ) ); ?></div>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>
<footer class="entry-meta">
<footer class="entry-footer">
<?php if (get_theme_mod( 'show_author_section', false ) == true ) : ?>
<section class="author-section cf">
<div class="author-image"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )?>" rel="author"><?php echo get_avatar( get_the_author_meta( 'ID' ), 250 ); ?></a></div>
Expand All @@ -28,7 +28,7 @@
<p class="tags"><?php the_tags(__( 'Tagged as: ', 'decode' ),', '); ?></p>
<p class="categories"><?php _e( 'Categorized in&#58; ', 'decode' ) . the_category(', '); ?></p>
<p class="date"><?php decode_posted_on(); ?></p>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
Expand All @@ -48,13 +48,13 @@
<?php endif; ?>
<div class="entry-title"><h2><?php decode_print_post_title() ?><?php if (get_theme_mod( 'link_post_title_arrow', false ) == true ) echo '<span class="link-title-arrow">&#8594;</span>'; ?></h2></div>
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'above' ) : ?>
<div class="entry-meta above-content">
<div class="entry-meta">
<p class="date"><?php decode_posted_on(); ?></p>
</div><!-- .entry-meta -->
<?php endif; ?>
</header>
<div class="entry-content"><?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'decode' ) ); ?></div>
<footer class="entry-meta">
<footer class="entry-footer">
<?php if (get_theme_mod( 'show_author_section', false ) == true ) : ?>
<section class="author-section cf">
<div class="author-image"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )?>" rel="author"><?php echo get_avatar( get_the_author_meta( 'ID' ), 250 ); ?></a></div>
Expand All @@ -72,7 +72,7 @@
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'below' ) : ?>
<p class="date"><?php decode_posted_on(); ?></p>
<?php endif; ?>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article>
Expand All @@ -92,14 +92,14 @@
<?php endif; ?>
<div class="entry-title"><h2><?php the_title(); ?></h2></div>
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'above' ) : ?>
<div class="entry-meta above-content">
<div class="entry-meta">
<p class="date"><?php decode_posted_on(); ?></p>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content"><?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'decode' ) ); ?></div>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>
<footer class="entry-meta">
<footer class="entry-footer">
<?php if (get_theme_mod( 'show_author_section', false ) == true ) : ?>
<section class="author-section cf">
<div class="author-image"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )?>" rel="author"><?php echo get_avatar( get_the_author_meta( 'ID' ), 250 ); ?></a></div>
Expand All @@ -117,7 +117,7 @@
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'below' ) : ?>
<p class="date"><?php decode_posted_on(); ?></p>
<?php endif; ?>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
Expand Down
8 changes: 4 additions & 4 deletions content.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<?php endif; ?>
<div class="entry-title"><h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2></div>
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'above' ) : ?>
<div class="entry-meta above-content">
<div class="entry-meta">
<p class="date"><?php decode_posted_on(); ?></p>
</div><!-- .entry-meta -->
</div>
<?php endif; ?>
</header><!-- .entry-header -->

Expand All @@ -28,7 +28,7 @@

<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<footer class="entry-meta below-content">
<footer class="entry-footer below-content">
<?php if (get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<div class="comments-link <?php echo get_theme_mod( 'enable_comments', '' ); ?>"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
<?php endif; ?>
Expand All @@ -42,7 +42,7 @@
<?php if ( get_theme_mod( 'entry_date_position', 'below' ) == 'below' ) : ?>
<p class="date"><?php decode_posted_on(); ?></p>
<?php endif; ?>
</footer><!-- .entry-meta -->
</footer><!-- .entry-footer -->

<?php tha_entry_bottom(); ?>
</article><!-- #post-<?php the_ID(); ?> -->
Expand Down
Loading

0 comments on commit 423889d

Please sign in to comment.