Skip to content

Commit

Permalink
Merge pull request #38 from ScottSmith95/3.0.7
Browse files Browse the repository at this point in the history
Decode 3.0.7
  • Loading branch information
ScottSmith95 committed Apr 18, 2015
2 parents 0c35145 + a33e5e2 commit 5accb40
Show file tree
Hide file tree
Showing 42 changed files with 2,405 additions and 1,692 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Changelogs for each version can be found [on GitHub](https://github.com/ScottSmith95/Decode/releases).

I built Decode, the theme I use on [Beyond The Code](http://beyondtheco.de), to be a beautifully crafted, mobile first theme that uses media queries to bring in CSS for larger screens.
I built Decode to be a beautifully crafted, modern theme that puts mobile devices first.

If you want to change any of the colors in your theme, enable the sidebar, social links, and more, access the Customize menu in Admin > Appearance > Customize. From here you can access all the settings available for this theme.

Expand Down Expand Up @@ -77,7 +77,7 @@ Lastly, Decode has social icons that can link to your profiles from every side o
- Website
- Email

To find un-minified, vendor-prefixed CSS, look no further than the .css files in the "styles" directory. No seriously, don't look any further because the styles/src directory containes un-prefixed sass files that you may not want to work with.
To find un-minified, vendor-prefixed CSS, look no further than the .css files in the "styles" directory. No seriously, don't look any further because the styles/src directory contains un-prefixed sass files that you may not want to work with.

If you desire to add Typekit fonts to your blog, I recommend the [Typekit Fonts for WordPress plugin](http://wordpress.org/plugins/typekit-fonts-for-wordpress/). In the CSS field, add: `body, button, input, select, textarea {font-family: 'name-of-font-family';}` to override the default Decode font. This allows you more flexibility and ease when adding or changing fonts.

Expand Down
29 changes: 17 additions & 12 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
return;
}
?>
<?php if ( get_theme_mod( 'enable_comments', true ) == true ) : ?>

<?php tha_comments_before(); ?>
<div id="comments" class="comments-area">
Expand All @@ -31,10 +30,14 @@
</h2>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above" class="comment-navigation cf" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'decode' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'decode' ) ); ?></div>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'decode' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'decode' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>

Expand All @@ -51,10 +54,14 @@
</ol><!-- .comment-list -->

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="comment-navigation cf" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'decode' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'decode' ) ); ?></div>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h2>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'decode' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'decode' ) ); ?></div>

</div><!-- .nav-links -->
</nav><!-- #comment-nav-below -->
<?php endif; // check for comment navigation ?>

Expand Down Expand Up @@ -115,6 +122,4 @@ function hasClass( el, cls ) {
<?php endif; ?>

</div><!-- #comments -->
<?php tha_comments_after(); ?>

<?php endif; ?>
<?php tha_comments_after(); ?>
4 changes: 2 additions & 2 deletions content-link.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<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 if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<div class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
<?php endif; ?>

<?php edit_post_link( __( 'Edit', 'decode' ), '<div class="edit-link">', '</div>' ); ?>
Expand Down
4 changes: 2 additions & 2 deletions content-quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<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 if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<div class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
<?php endif; ?>

<?php edit_post_link( __( 'Edit', 'decode' ), '<span class="edit-link">', '</span>' ); ?>
Expand Down
7 changes: 6 additions & 1 deletion content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@
<?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>' ) ); ?>
<?php wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ),
'after' => '</div>',
'link_before' => '<span class="page-link">',
'link_after' => '</span>',
) ); ?>

<footer class="entry-footer">
<?php decode_author_section(); ?>
Expand Down
2 changes: 1 addition & 1 deletion content.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>

<footer class="entry-footer">
<?php if ( get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<div class="comments-link">
<?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Changelogs for each version can be found [on GitHub](https://github.com/ScottSmith95/Decode/releases).

I built Decode, the theme I use on [Beyond The Code](http://beyondtheco.de), to be a beautifully crafted, mobile first theme that uses media queries to bring in CSS for larger screens.
I built Decode to be a beautifully crafted, modern theme that puts mobile devices first.

If you want to change any of the colors in your theme, enable the sidebar, social links, and more, access the Customize menu in Admin > Appearance > Customize. From here you can access all the settings available for this theme.

Expand Down Expand Up @@ -77,7 +77,7 @@ Lastly, Decode has social icons that can link to your profiles from every side o
- Website
- Email

To find un-minified, vendor-prefixed CSS, look no further than the .css files in the "styles" directory. No seriously, don't look any further because the styles/src directory containes un-prefixed sass files that you may not want to work with.
To find un-minified, vendor-prefixed CSS, look no further than the .css files in the "styles" directory. No seriously, don't look any further because the styles/src directory contains un-prefixed sass files that you may not want to work with.

If you desire to add Typekit fonts to your blog, I recommend the [Typekit Fonts for WordPress plugin](http://wordpress.org/plugins/typekit-fonts-for-wordpress/). In the CSS field, add: `body, button, input, select, textarea {font-family: 'name-of-font-family';}` to override the default Decode font. This allows you more flexibility and ease when adding or changing fonts.

Expand Down
43 changes: 24 additions & 19 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package Decode
*/

/**
/*
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
Expand Down Expand Up @@ -48,15 +48,29 @@ function decode_setup() {
*/
add_theme_support( 'title-tag' );

/**
* Add theme support for Jetpack Site Logo.
*
* @link http://jetpack.me/support/site-logo/
*/
$args = array(
'header-text' => array(
'site-title',
'site-description',
)
);
$args = apply_filters( 'decode_site_logo_args', $args );
add_theme_support( 'site-logo', $args );

// Set up the WordPress core custom header feature.
$args = array(
'default-image' => '',
'flex-width' => true,
'height' => 300,
'flex-height' => true,
'header-text' => false,
'admin-head-callback' => 'decode_admin_header_style',
'admin-preview-callback' => 'decode_admin_header_image',
'admin-head-callback' => 'decode_admin_header_style', // @todo: Remove this function when WordPress 4.3 is released
'admin-preview-callback' => 'decode_admin_header_image', // @todo: Remove this function when WordPress 4.3 is released
);
$args = apply_filters( 'decode_custom_header_args', $args );
add_theme_support( 'custom-header', $args );
Expand All @@ -73,6 +87,7 @@ function decode_setup() {
* to output valid HTML5.
*/
$args = array(
'widgets',
'caption',
'comment-form',
'comment-list',
Expand All @@ -82,16 +97,16 @@ function decode_setup() {
$args = apply_filters( 'decode_html5_args', $args );
add_theme_support( 'html5', $args );

/*
/**
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
add_theme_support( 'post-thumbnails' );

/*
/**
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
* @link http://codex.wordpress.org/Post_Formats
*/
$args = array(
'aside',
Expand All @@ -113,7 +128,7 @@ function decode_setup() {

function decode_scripts() {

wp_enqueue_style( 'decode-style', get_stylesheet_uri(), array(), '3.0.6' );
wp_enqueue_style( 'decode-style', get_stylesheet_uri(), array(), '3.0.7' );

if ( get_theme_mod( 'latin_extended_font', false ) == true ) {
wp_enqueue_style( 'decode-font-stylesheet', '//fonts.googleapis.com/css?family=Oxygen&subset=latin-ext' );
Expand All @@ -124,7 +139,7 @@ function decode_scripts() {

wp_enqueue_script( 'decode-scripts', get_template_directory_uri() . '/scripts/decode.js', array(), '3.0.6', true );

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) && get_theme_mod( 'enable_comments', true ) == true ) {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}

Expand All @@ -136,7 +151,7 @@ function decode_scripts() {
}
add_action( 'wp_enqueue_scripts', 'decode_scripts' );

/*
/**
* Register widgetized area and update sidebar with default widgets.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
Expand Down Expand Up @@ -231,16 +246,6 @@ function decode_add_body_classes( $classes ) {
}
add_filter( 'body_class', 'decode_add_body_classes' );

/*
* Add Google Profile to user contact methods.
*/
function decode_add_google_profile( $contactmethods ) {
// Add Google Profiles
$contactmethods['google_profile'] = __( 'Google Profile URL', 'decode' );
return $contactmethods;
}
add_filter( 'user_contactmethods', 'decode_add_google_profile', 10, 1 );

/*
* Link post titles are turned into links to the link URL not the permalink for link blog-style behaviour.
*/
Expand Down
48 changes: 26 additions & 22 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@

<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'decode' ); ?></a>

<?php function decode_create_sidebar_link() {
if ( get_theme_mod( 'show_sidebar', true ) == true ) : ?>
<button id="sidebar-link" class="sidebar-link SidebarLink <?php echo get_theme_mod( 'sidebar_button_position', 'left' );?>" title="<?php _e( 'Show sidebar', 'decode' )?>">
<svg width="100%" height="100%" viewBox="0 0 240 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g class="menu-icon" fill-rule="evenodd">
<path d="M0,160 L0,200 L240,200 L240,160 L0,160 Z M0,160"></path>
<path d="M0,80 L0,120 L240,120 L240,80 L0,80 Z M0,80"></path>
<path d="M0,0 L0,40 L240,40 L240,0 L0,0 Z M0,0"></path>
</g>
</svg>
</button>
<?php endif;
}?>
<?php function decode_create_sidebar_link() {
if ( get_theme_mod( 'show_sidebar', true ) == true ) : ?>
<button id="sidebar-link" class="sidebar-link SidebarLink <?php echo get_theme_mod( 'sidebar_button_position', 'left' );?>" title="<?php _e( 'Show sidebar', 'decode' )?>">
<svg width="100%" height="100%" viewBox="0 0 240 200" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g class="menu-icon" fill-rule="evenodd">
<path d="M0,160 L0,200 L240,200 L240,160 L0,160 Z M0,160"></path>
<path d="M0,80 L0,120 L240,120 L240,80 L0,80 Z M0,80"></path>
<path d="M0,0 L0,40 L240,40 L240,0 L0,0 Z M0,0"></path>
</g>
</svg>
</button>
<?php endif;
}?>
<?php add_action( 'tha_header_before', 'decode_create_sidebar_link' ); ?>

<?php tha_header_before(); ?>
Expand All @@ -53,15 +53,19 @@
<?php tha_header_top(); ?>

<div class="site-branding">

<?php function decode_create_header_image() {
if ( get_header_image() != '' ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img class="site-logo" src="<?php header_image(); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" alt="">
</a>
<?php endif;
}
add_action( 'decode_header_image', 'decode_create_header_image' ); ?>

<?php function decode_create_header_image() {
// If Jetpack's site logo exists, give it preference over Decode's.
if ( function_exists( 'jetpack_the_site_logo' ) ) :
jetpack_the_site_logo();
// If no Jetpack site logo exists, use Decode's logo, if avaliable.
elseif ( get_header_image() != '' ) : ?>
<a class="site-logo-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<img class="site-logo" src="<?php header_image(); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" alt="">
</a>
<?php endif;
}
add_action( 'decode_header_image', 'decode_create_header_image' ); ?>
<?php decode_header_image(); ?>

<?php if ( get_theme_mod( 'show_site_title', true ) == true ) : ?>
Expand Down
42 changes: 23 additions & 19 deletions humans.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,36 @@
/* Translation Credits */
Chinese Translation: Daihui Gu
Email: yhzhtk@gmail.com
URI: http://yhzhtk.info/
URL: http://yhzhtk.info/

Dutch Translation: Tom van den Kieboom
Email: tvdkieboom@sharp-edge.nl
URI: http://www.sharp-edge.nl
Czech Translation: Christian Kopec
Email: chkopec@yahoo.com
Twitter: @chkopec

French Translation: Stéphane Bataillon
Email: sbataillon@yahoo.fr
URI: http://www.stephanebataillon.com
Twitter: @sbataillon
Dutch Translation: Tom van den Kieboom
Email: tvdkieboom@sharp-edge.nl
URL: http://www.sharp-edge.nl

German Translation: Christoph Purschke
Email: christoph@purschke.info
URI: http://purschke.info
Twitter: @cpu_inside
French Translation: Stéphane Bataillon
Email: sbataillon@yahoo.fr
URI: http://www.stephanebataillon.com
Twitter: @sbataillon

Polish Translation: Mateusz Wozniak
Email: m.wozniak@gmx.net
URI: multilingua.pl
Twitter: @MateuszJWozniak
Updated by: Michał Maciejewski
Email: admin@echidna-computers.pl
German Translation: Christoph Purschke
Email: christoph@purschke.info
URL: http://purschke.info
Twitter: @cpu_inside

Polish Translation: Mateusz Wozniak
Email: m.wozniak@gmx.net
URL: multilingua.pl
Twitter: @MateuszJWozniak
Updated by: Michał Maciejewski
Email: admin@echidna-computers.pl

Russian Translation: Michael Yesutin
Email: michael@yesutin.com
URI: http://about.me/yesutin
URL: http://about.me/yesutin
Twitter: @yesutin

Spanish Translation: Xabier Obanos
Expand Down
12 changes: 4 additions & 8 deletions image.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,10 @@
</article><!-- #post-<?php the_ID(); ?> -->

<?php
if ( get_theme_mod( 'enable_comments', true ) == true ) :

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}

endif;
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
?>

<?php endwhile; // end of the loop. ?>
Expand Down
Loading

0 comments on commit 5accb40

Please sign in to comment.