diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..aa8f865 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,17 @@ + + ### 1.0.2 - 07/06/2016 + **Changes:** + - Fixed issue with Related Posts + + ### 1.0.1 - 07/06/2016 + **Changes:** + - Add colors schemes options + - Fixed sanitizations + - Regenerate .pot file + - Style Trackbacks and Pingbacks + - Style Galleries + + ### 1.0.0 - 01/06/2016 + **Changes:** + - New design + diff --git a/functions.php b/functions.php index 9ef28d8..d28af9a 100644 --- a/functions.php +++ b/functions.php @@ -304,39 +304,28 @@ function zillah_brand(){ echo '
'; - if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) { - the_custom_logo(); - echo '
'; - if ( is_front_page() && is_home() ) : ?> -

- -

- '; + $zillah_tagline_hide = get_theme_mod( 'zillah_tagline_show', false ); - } else { - if( is_customize_preview() ){ ?> - - - - '; + + if( ( ! $zillah_tagline_hide && display_header_text() ) || is_customize_preview() ) { + echo '
'; if ( is_front_page() && is_home() ) : ?>

'; - } + echo '
'; + } - $description = get_bloginfo( 'description', 'display' ); - if ( $description || is_customize_preview() ) : ?> -

- +

+ '; } @@ -447,6 +436,8 @@ function zillah_php_style() { $zillah_c5 = $zillah_picker->color5; } + $header_text_color = get_header_textcolor(); + if( isset( $zillah_c5 ) ) { $rgb = zillah_get_rgb( $zillah_c5 ); } @@ -482,10 +473,11 @@ function zillah_php_style() { color: '.$zillah_c2.'; } a, .entry-content a:visited, .comment-content a:visited, - .site-title a, .site-title a:visited, .cat-links, .entry-header .cat-links, .cat-links a, p.dropcap:first-letter, - .site-footer .fa { + .site-footer .fa, + .author-details-title, + .entry-content #jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a { color:'.$zillah_c2.'; } button, input[type="button"], input[type="reset"], input[type="submit"], .btn { @@ -554,11 +546,6 @@ function zillah_php_style() { '; /* Color 4 */ - echo ' - body { - background: '.$zillah_c4.'; - } - '; /* Color 5 */ echo ' @@ -586,6 +573,12 @@ function zillah_php_style() { } '; + echo ' + .site-title a { + color: #'. esc_attr( $header_text_color ) .' + } + '; + } echo ''; } diff --git a/inc/customizer.php b/inc/customizer.php index 3bffd0a..aa1ccc6 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -14,24 +14,32 @@ function zillah_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; - $wp_customize->get_setting( 'header_textcolor' )->default = '#7fcaad'; require_once ( 'class/zillah_category-selector-control.php'); - - $wp_customize->remove_control( 'display_header_text' ); $wp_customize->get_control( 'blogname' )->priority = 3; $wp_customize->get_control( 'blogdescription' )->priority = 4; - $wp_customize->remove_control( 'background_color' ); - $wp_customize->remove_control( 'header_textcolor' ); - $custom_logo = $wp_customize->get_control( 'custom_logo' ); if( !empty( $custom_logo ) ) { $wp_customize->get_control( 'custom_logo' )->priority = 5; } + /* Title tagline */ + $wp_customize->add_setting('zillah_tagline_show', array( + 'default' => 0, + 'sanitize_callback' => 'zillah_sanitize_checkbox', + 'transport' => 'postMessage', + )); + + $wp_customize->add_control('zillah_tagline_show', array( + 'label' => esc_html__('Hide Site Title', 'zillah'), + 'section' => 'title_tagline', + 'priority' => 50, + 'type' => 'checkbox', + )); + /* Advanced options */ $wp_customize->add_section( 'zillah_home_theme_option_section', array( 'title' => esc_html__( 'Theme options', 'zillah' ), diff --git a/js/customizer.js b/js/customizer.js index 7a79aba..ef15321 100644 --- a/js/customizer.js +++ b/js/customizer.js @@ -14,6 +14,7 @@ $( '.site-title a' ).text( to ); } ); } ); + wp.customize( 'blogdescription', function( value ) { value.bind( function( to ) { $( '.site-description' ).text( to ); @@ -21,24 +22,37 @@ } ); // Header text color. - wp.customize( 'header_textcolor', function( value ) { - value.bind( function( to ) { - if ( 'blank' === to ) { - $( '.site-title a, .site-description' ).css( { - 'clip': 'rect(1px, 1px, 1px, 1px)', - 'position': 'absolute' - } ); - } else { - $( '.site-title a' ).css( { - 'clip': 'auto', - 'position': 'relative' - } ); - $( '.site-title a' ).css( { - 'color': to - } ); - } - } ); - } ); + wp.customize( 'header_textcolor', function( value ) { + value.bind( function( to ) { + if ( 'blank' === to ) { + $( '.site-title a, .site-description' ).css( { + 'clip': 'rect(1px, 1px, 1px, 1px)', + 'position': 'absolute' + } ); + } else { + $( '.site-title a, .site-description' ).css( { + 'clip': 'auto', + 'position': 'relative' + } ); + $( '.site-title a' ).css( { + 'color': to + } ); + } + } ); + } ); + + // Hide Site Title + wp.customize( 'zillah_tagline_show', function( value ) { + value.bind( function( to ) { + if( to != '' ) { + $( '.header-title-wrap' ).addClass( 'zillah-only-customizer' ); + } + else { + $( '.header-title-wrap' ).removeClass( 'zillah-only-customizer' ); + } + } ); + } ); + // Logo wp.customize( 'custom_logo', function( value ) { diff --git a/style.css b/style.css index 2d51525..e4bc245 100644 --- a/style.css +++ b/style.css @@ -1725,6 +1725,10 @@ object { padding: 12px 0; } +.header-title-wrap { + margin-top: 20px; +} + .menu-toggle-button-wrap { display: table-cell; vertical-align: middle;