Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Commit

Permalink
!!! Fixed conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rodica-andronache committed Jun 8, 2016
2 parents b8439b4 + fb9d130 commit 753ca90
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 55 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
55 changes: 24 additions & 31 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,39 +304,28 @@ function zillah_brand(){

echo '<div class="header-logo-wrap">';

if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
the_custom_logo();
echo '<div class="header-title-wrap zillah-only-customizer">';
if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
echo '</div>';
$zillah_tagline_hide = get_theme_mod( 'zillah_tagline_show', false );

} else {
if( is_customize_preview() ){ ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="custom-logo-link zillah-only-customizer" title="<?php echo esc_attr( get_bloginfo( 'title' ) ); ?>">
<img src="">
</a>
<?php
if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
}
echo '<div class="header-title-wrap">';

if( ( ! $zillah_tagline_hide && display_header_text() ) || is_customize_preview() ) {
echo '<div class="header-title-wrap' . ( ($zillah_tagline_hide || !display_header_text() ) && is_customize_preview() ? ' zillah-only-customizer' : '' ) . '">';
if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php
endif;
echo '</div>';
}
echo '</div>';
}

$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
<?php
endif;
$description = get_bloginfo( 'description', 'display' );
if ( ( $description && display_header_text() ) || is_customize_preview() ) : ?>
<p class="site-description<?php echo ! display_header_text() && is_customize_preview() ? ' zillah-only-customizer' : ''; ?>"><?php echo $description; /* WPCS: xss ok. */ ?></p>
<?php
endif;

echo '</div>';
}
Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -554,11 +546,6 @@ function zillah_php_style() {
';

/* Color 4 */
echo '
body {
background: '.$zillah_c4.';
}
';

/* Color 5 */
echo '
Expand Down Expand Up @@ -586,6 +573,12 @@ function zillah_php_style() {
}
';

echo '
.site-title a {
color: #'. esc_attr( $header_text_color ) .'
}
';

}
echo '</style>';
}
Expand Down
20 changes: 14 additions & 6 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down
50 changes: 32 additions & 18 deletions js/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,45 @@
$( '.site-title a' ).text( to );
} );
} );

wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '.site-description' ).text( to );
} );
} );

// 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 ) {
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1725,6 +1725,10 @@ object {
padding: 12px 0;
}

.header-title-wrap {
margin-top: 20px;
}

.menu-toggle-button-wrap {
display: table-cell;
vertical-align: middle;
Expand Down

0 comments on commit 753ca90

Please sign in to comment.