Skip to content

Commit

Permalink
Merge pull request #43 from ScottSmith95/3.0.9
Browse files Browse the repository at this point in the history
Decode 3.0.9
  • Loading branch information
ScottSmith95 committed Jul 17, 2015
2 parents fce02d1 + 08b82b3 commit fdce773
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 100 deletions.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function decode_scripts() {
wp_enqueue_style( 'decode-font-stylesheet', '//fonts.googleapis.com/css?family=Oxygen' );
}

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

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
Expand Down
6 changes: 3 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gulp.task('copy', ['styles'], function() {
.pipe(gulp.dest('./'));
});

gulp.task('scripts', ['modernizr'], function() {
gulp.task('scripts', function() {
var decodeScript = gulp.src(paths.decodeScript)
.pipe(sourcemaps.init())
.pipe(concat('decode.js'))
Expand All @@ -60,15 +60,15 @@ gulp.task('modernizr', function() {
gulp.src('scripts/src/*.js').pipe(modernizr({
cache: true,
dest: 'scripts/src/modernizr.js',
options: ['mq', 'html5printshiv'],
options: ['setClasses', 'mq', 'html5printshiv'],
tests: ['csstransforms', 'flexbox', 'inlinesvg', 'touchevents'],
crawl: false
}))
.pipe(gulp.dest('scripts/src/'));
});

gulp.task('watch', function() {
gulp.watch(paths.styles, ['styles']);
gulp.watch(paths.styles, ['styles', 'copy']);
gulp.watch([paths.decodeScript, paths.customizerScript], ['scripts']);
});

Expand Down
2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php if ( get_theme_mod( 'favicon_image', '' ) ) { echo '<link rel="icon" href="' . esc_url( get_theme_mod( 'favicon_image', '' ) ) . '">' . "\n" .
<?php if ( get_theme_mod( 'favicon_image', '' ) && decode_has_site_icon() ) { echo '<link rel="icon" href="' . esc_url( get_theme_mod( 'favicon_image', '' ) ) . '">' . "\n" .
'<link rel="apple-touch-icon-precomposed" href="' . esc_url( get_theme_mod( 'favicon_image', '' ) ) . '">' . "\n"; } ?>
<?php if ( get_background_image() ) { echo '<link rel="prefetch" href="' . get_background_image() . '">'; } ?>

Expand Down
32 changes: 23 additions & 9 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,20 @@ function decode_sidebar_is_enabled() {
}
}

function decode_has_site_icon() {
if ( function_exists( 'has_site_icon' ) ) {
if ( has_site_icon() ) {
return true;
}
else {
return false;
}
}
else {
return false;
}
}

function decode_social_icons_are_enabled() {
if ( get_theme_mod( 'show_header_social_icons', false ) == true || get_theme_mod( 'show_footer_social_icons', false ) == true ) {
return true;
Expand Down Expand Up @@ -730,7 +744,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 15,
) );

Expand Down Expand Up @@ -819,7 +833,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 26,
) );

Expand All @@ -836,7 +850,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 28,
) );

Expand Down Expand Up @@ -893,7 +907,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 35,
) );

Expand All @@ -918,7 +932,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 38,
) );

Expand All @@ -944,7 +958,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 41,
) );

Expand Down Expand Up @@ -1082,7 +1096,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'email', /* Uncomment for WP >= 4.4 */
//'type' => 'email', /* Uncomment for WP >= 4.4 */
'priority' => 58,
) );

Expand All @@ -1091,7 +1105,7 @@ public static function decode_customize_register( $wp_customize ) {
'section' => 'decode_social_options',
'active_callback' => 'decode_social_icons_are_enabled',
'type' => 'text',
//'type' => 'url', /* Uncomment for WP >= 4.4 */
//'type' => 'url', /* Uncomment for WP >= 4.4 */
'priority' => 59,
) );

Expand Down Expand Up @@ -1312,7 +1326,7 @@ public static function decode_customize_register( $wp_customize ) {
*/

$wp_customize->add_section( 'decode_other_options', array(
'title' => __( 'Other Options', 'decode' ),
'title' => __( 'Other Options', 'decode' ),
'description' => __( 'Custom CSS is longer recommended. This feature may be removed in a future update. To continue using your tweaks, copy and paste your CSS into a custom CSS plugin such as <a href="http://jetpack.me/install/">Jetpack</a>. Get help <a href="http://jetpack.me/support/custom-css/">here</a>.', 'decode' ),
'priority' => 38,
) );
Expand Down
Loading

0 comments on commit fdce773

Please sign in to comment.