Skip to content

Commit 5accb40

Browse files
committed
Merge pull request #38 from ScottSmith95/3.0.7
Decode 3.0.7
2 parents 0c35145 + a33e5e2 commit 5accb40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2405
-1692
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

9-
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.
9+
I built Decode to be a beautifully crafted, modern theme that puts mobile devices first.
1010

1111
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.
1212

@@ -77,7 +77,7 @@ Lastly, Decode has social icons that can link to your profiles from every side o
7777
- Website
7878
- Email
7979

80-
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.
80+
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.
8181

8282
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.
8383

comments.php

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
return;
1818
}
1919
?>
20-
<?php if ( get_theme_mod( 'enable_comments', true ) == true ) : ?>
2120

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

3332
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
34-
<nav id="comment-nav-above" class="comment-navigation cf" role="navigation">
35-
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h1>
36-
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'decode' ) ); ?></div>
37-
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'decode' ) ); ?></div>
33+
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
34+
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h2>
35+
<div class="nav-links">
36+
37+
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'decode' ) ); ?></div>
38+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'decode' ) ); ?></div>
39+
40+
</div><!-- .nav-links -->
3841
</nav><!-- #comment-nav-above -->
3942
<?php endif; // check for comment navigation ?>
4043

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

5356
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
54-
<nav id="comment-nav-below" class="comment-navigation cf" role="navigation">
55-
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h1>
56-
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'decode' ) ); ?></div>
57-
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'decode' ) ); ?></div>
57+
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
58+
<h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'decode' ); ?></h2>
59+
<div class="nav-links">
60+
61+
<div class="nav-previous"><?php previous_comments_link( __( 'Older Comments', 'decode' ) ); ?></div>
62+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments', 'decode' ) ); ?></div>
63+
64+
</div><!-- .nav-links -->
5865
</nav><!-- #comment-nav-below -->
5966
<?php endif; // check for comment navigation ?>
6067

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

117124
</div><!-- #comments -->
118-
<?php tha_comments_after(); ?>
119-
120-
<?php endif; ?>
125+
<?php tha_comments_after(); ?>

content-link.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>
3232

3333
<footer class="entry-footer">
34-
<?php if ( get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
35-
<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>
34+
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
35+
<div class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
3636
<?php endif; ?>
3737

3838
<?php edit_post_link( __( 'Edit', 'decode' ), '<div class="edit-link">', '</div>' ); ?>

content-quote.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>
1919

2020
<footer class="entry-footer">
21-
<?php if ( get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
22-
<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>
21+
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
22+
<div class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?></div>
2323
<?php endif; ?>
2424

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

content-single.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,12 @@
9898
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'decode' ) ); ?>
9999
</div>
100100

101-
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>
101+
<?php wp_link_pages( array(
102+
'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ),
103+
'after' => '</div>',
104+
'link_before' => '<span class="page-link">',
105+
'link_after' => '</span>',
106+
) ); ?>
102107

103108
<footer class="entry-footer">
104109
<?php decode_author_section(); ?>

content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'decode' ), 'after' => '</div>' ) ); ?>
3333

3434
<footer class="entry-footer">
35-
<?php if ( get_theme_mod( 'enable_comments', true ) == true && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
35+
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
3636
<div class="comments-link">
3737
<?php comments_popup_link( __( 'Leave a comment', 'decode' ), __( '1 Comment', 'decode' ), __( '% Comments', 'decode' ) ); ?>
3838
</div>

docs/src/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

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

9-
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.
9+
I built Decode to be a beautifully crafted, modern theme that puts mobile devices first.
1010

1111
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.
1212

@@ -77,7 +77,7 @@ Lastly, Decode has social icons that can link to your profiles from every side o
7777
- Website
7878
- Email
7979

80-
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.
80+
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.
8181

8282
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.
8383

functions.php

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @package Decode
66
*/
77

8-
/**
8+
/*
99
* Set the content width based on the theme's design and stylesheet.
1010
*/
1111
if ( ! isset( $content_width ) ) {
@@ -48,15 +48,29 @@ function decode_setup() {
4848
*/
4949
add_theme_support( 'title-tag' );
5050

51+
/**
52+
* Add theme support for Jetpack Site Logo.
53+
*
54+
* @link http://jetpack.me/support/site-logo/
55+
*/
56+
$args = array(
57+
'header-text' => array(
58+
'site-title',
59+
'site-description',
60+
)
61+
);
62+
$args = apply_filters( 'decode_site_logo_args', $args );
63+
add_theme_support( 'site-logo', $args );
64+
5165
// Set up the WordPress core custom header feature.
5266
$args = array(
5367
'default-image' => '',
5468
'flex-width' => true,
5569
'height' => 300,
5670
'flex-height' => true,
5771
'header-text' => false,
58-
'admin-head-callback' => 'decode_admin_header_style',
59-
'admin-preview-callback' => 'decode_admin_header_image',
72+
'admin-head-callback' => 'decode_admin_header_style', // @todo: Remove this function when WordPress 4.3 is released
73+
'admin-preview-callback' => 'decode_admin_header_image', // @todo: Remove this function when WordPress 4.3 is released
6074
);
6175
$args = apply_filters( 'decode_custom_header_args', $args );
6276
add_theme_support( 'custom-header', $args );
@@ -73,6 +87,7 @@ function decode_setup() {
7387
* to output valid HTML5.
7488
*/
7589
$args = array(
90+
'widgets',
7691
'caption',
7792
'comment-form',
7893
'comment-list',
@@ -82,16 +97,16 @@ function decode_setup() {
8297
$args = apply_filters( 'decode_html5_args', $args );
8398
add_theme_support( 'html5', $args );
8499

85-
/*
100+
/**
86101
* Enable support for Post Thumbnails on posts and pages.
87102
*
88103
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
89104
*/
90105
add_theme_support( 'post-thumbnails' );
91106

92-
/*
107+
/**
93108
* Enable support for Post Formats.
94-
* See http://codex.wordpress.org/Post_Formats
109+
* @link http://codex.wordpress.org/Post_Formats
95110
*/
96111
$args = array(
97112
'aside',
@@ -113,7 +128,7 @@ function decode_setup() {
113128

114129
function decode_scripts() {
115130

116-
wp_enqueue_style( 'decode-style', get_stylesheet_uri(), array(), '3.0.6' );
131+
wp_enqueue_style( 'decode-style', get_stylesheet_uri(), array(), '3.0.7' );
117132

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

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

127-
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) && get_theme_mod( 'enable_comments', true ) == true ) {
142+
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
128143
wp_enqueue_script( 'comment-reply' );
129144
}
130145

@@ -136,7 +151,7 @@ function decode_scripts() {
136151
}
137152
add_action( 'wp_enqueue_scripts', 'decode_scripts' );
138153

139-
/*
154+
/**
140155
* Register widgetized area and update sidebar with default widgets.
141156
*
142157
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
@@ -231,16 +246,6 @@ function decode_add_body_classes( $classes ) {
231246
}
232247
add_filter( 'body_class', 'decode_add_body_classes' );
233248

234-
/*
235-
* Add Google Profile to user contact methods.
236-
*/
237-
function decode_add_google_profile( $contactmethods ) {
238-
// Add Google Profiles
239-
$contactmethods['google_profile'] = __( 'Google Profile URL', 'decode' );
240-
return $contactmethods;
241-
}
242-
add_filter( 'user_contactmethods', 'decode_add_google_profile', 10, 1 );
243-
244249
/*
245250
* Link post titles are turned into links to the link URL not the permalink for link blog-style behaviour.
246251
*/

header.php

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232

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

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

5050
<?php tha_header_before(); ?>
@@ -53,15 +53,19 @@
5353
<?php tha_header_top(); ?>
5454

5555
<div class="site-branding">
56-
57-
<?php function decode_create_header_image() {
58-
if ( get_header_image() != '' ) : ?>
59-
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
60-
<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="">
61-
</a>
62-
<?php endif;
63-
}
64-
add_action( 'decode_header_image', 'decode_create_header_image' ); ?>
56+
57+
<?php function decode_create_header_image() {
58+
// If Jetpack's site logo exists, give it preference over Decode's.
59+
if ( function_exists( 'jetpack_the_site_logo' ) ) :
60+
jetpack_the_site_logo();
61+
// If no Jetpack site logo exists, use Decode's logo, if avaliable.
62+
elseif ( get_header_image() != '' ) : ?>
63+
<a class="site-logo-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
64+
<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="">
65+
</a>
66+
<?php endif;
67+
}
68+
add_action( 'decode_header_image', 'decode_create_header_image' ); ?>
6569
<?php decode_header_image(); ?>
6670

6771
<?php if ( get_theme_mod( 'show_site_title', true ) == true ) : ?>

humans.txt

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,36 @@
77
/* Translation Credits */
88
Chinese Translation: Daihui Gu
99
Email: yhzhtk@gmail.com
10-
URI: http://yhzhtk.info/
10+
URL: http://yhzhtk.info/
1111

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

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

21-
German Translation: Christoph Purschke
22-
Email: christoph@purschke.info
23-
URI: http://purschke.info
24-
Twitter: @cpu_inside
20+
French Translation: Stéphane Bataillon
21+
Email: sbataillon@yahoo.fr
22+
URI: http://www.stephanebataillon.com
23+
Twitter: @sbataillon
2524

26-
Polish Translation: Mateusz Wozniak
27-
Email: m.wozniak@gmx.net
28-
URI: multilingua.pl
29-
Twitter: @MateuszJWozniak
30-
Updated by: Michał Maciejewski
31-
Email: admin@echidna-computers.pl
25+
German Translation: Christoph Purschke
26+
Email: christoph@purschke.info
27+
URL: http://purschke.info
28+
Twitter: @cpu_inside
29+
30+
Polish Translation: Mateusz Wozniak
31+
Email: m.wozniak@gmx.net
32+
URL: multilingua.pl
33+
Twitter: @MateuszJWozniak
34+
Updated by: Michał Maciejewski
35+
Email: admin@echidna-computers.pl
3236

3337
Russian Translation: Michael Yesutin
3438
Email: michael@yesutin.com
35-
URI: http://about.me/yesutin
39+
URL: http://about.me/yesutin
3640
Twitter: @yesutin
3741

3842
Spanish Translation: Xabier Obanos

image.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,10 @@
9898
</article><!-- #post-<?php the_ID(); ?> -->
9999

100100
<?php
101-
if ( get_theme_mod( 'enable_comments', true ) == true ) :
102-
103-
// If comments are open or we have at least one comment, load up the comment template.
104-
if ( comments_open() || get_comments_number() ) {
105-
comments_template();
106-
}
107-
108-
endif;
101+
// If comments are open or we have at least one comment, load up the comment template.
102+
if ( comments_open() || get_comments_number() ) {
103+
comments_template();
104+
}
109105
?>
110106

111107
<?php endwhile; // end of the loop. ?>

0 commit comments

Comments
 (0)