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

Commit

Permalink
Merge pull request #83 from Codeinwp/development
Browse files Browse the repository at this point in the history
Fixed issues with mobile menu color schemes
New screenshot
Fixed issues with font sizes on mobile devices
Fixed issues with comments layout on mobile devices
Fixed the option to hide post tags
Fixed issue with scrolling header on Safari
Add unminified scripts for all the minified scripts used
Update scripts licenses
  • Loading branch information
rodica-andronache authored Jun 13, 2016
2 parents 5ee87fa + d8e9a36 commit 67a01a7
Show file tree
Hide file tree
Showing 14 changed files with 2,682 additions and 117 deletions.
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<div class="content-wrap">

<div id="primary" class="content-area<?php echo $zillah_sidebar_show !== false ? " content-area-with-sidebar" : ""; ?>">
<div id="primary" class="content-area content-area-arch<?php echo $zillah_sidebar_show !== false ? " content-area-with-sidebar" : ""; ?>">
<main id="main" class="site-main" role="main">

<?php
Expand Down
67 changes: 42 additions & 25 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ function zillah_fonts_url() {
* Enqueue scripts and styles.
*/
function zillah_scripts() {
wp_enqueue_style( 'zillah-style', get_stylesheet_uri(), array( 'boostrap-css' ) );
wp_enqueue_style( 'zillah-style', get_stylesheet_uri(), array( 'bootstrap-css' ) );

wp_enqueue_style ( 'boostrap-css', get_template_directory_uri() . '/css/bootstrap.min.css', array(), 'v3.3.6', 'all' );
wp_enqueue_style ( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.min.css', array(), 'v3.3.6', 'all' );

wp_enqueue_style( 'zillah-fonts', zillah_fonts_url(), array(), null );

Expand Down Expand Up @@ -264,9 +264,15 @@ function zillah_customizer_script() {
require get_template_directory() . '/inc/jetpack.php';


function zillah_excerpt_more($more) {
function zillah_read_more_link() {
return '<span class="clearfix clearfix-post"></span><a href="'. esc_url( get_permalink(get_the_ID()) ) . '" class="more-link">' . sprintf( __( 'Continue Reading %s', 'zillah' ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) . ' <span class="meta-nav">&rarr;</span>' ) . '</a>';
}
add_filter( 'the_content_more_link', 'zillah_read_more_link' );


function zillah_excerpt_more() {
return '...<span class="clearfix clearfix-post"></span><a href="'. esc_url( get_permalink(get_the_ID()) ) . '" class="more-link">' . sprintf( __( 'Continue Reading %s', 'zillah' ), the_title( '<span class="screen-reader-text">"', '"</span>', false ) . ' <span class="meta-nav">&rarr;</span>' ) . '</a>';
}
add_filter('excerpt_more', 'zillah_excerpt_more');


Expand Down Expand Up @@ -364,11 +370,13 @@ function zillah_slider(){

if( $size ) :

echo "<ol class=\"carousel-indicators\">";
for( $i=0; $i<$size; $i++ ){
echo "<li data-target=\"#home-carousel\" data-slide-to=\"". $i . "\"" . ( $i===0 ? " class=\"active\"" : "" ) . "></li>";
if( $size > 1 ) {
echo "<ol class=\"carousel-indicators\">";
for ( $i = 0; $i < $size; $i ++ ) {
echo "<li data-target=\"#home-carousel\" data-slide-to=\"" . $i . "\"" . ( $i === 0 ? " class=\"active\"" : "" ) . "></li>";
}
echo "</ol>";
}
echo "</ol>";

echo "<div class=\"carousel-inner\" role=\"listbox\">";

Expand Down Expand Up @@ -466,9 +474,6 @@ function zillah_php_style() {

/* Color 2 */
echo '
a:visited {
color: inherit;
}
.widget-title {
color: '.$zillah_c2.';
}
Expand All @@ -488,7 +493,11 @@ function zillah_php_style() {
}
a.more-link,
a.more-link:visited,
.reply a {
.reply a,
a.post-edit-link, a.post-edit-link:visited,
.site-title a, .site-title a:visited,
.tags-links a:visited,
.logged-in-as a, .logged-in-as a:visited {
color: '.$zillah_c2.';
}
@media screen and (max-width: 992px) {
Expand All @@ -499,17 +508,29 @@ function zillah_php_style() {
';

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

/* Color 3 */
echo '
.main-navigation li:hover > a:hover,
.main-navigation li.focus > a:hover,
.widget li a:hover,
.main-navigation li:hover > a,
.main-navigation li.focus > a{
.main-navigation li:hover > a:hover,
.main-navigation li.focus > a:hover,
.widget li a:hover,
.main-navigation li:hover > a,
.main-navigation li.focus > a,
a.post-edit-link:hover,
.tags-links a:hover,
.dropdown-toggle,
.dropdown-toggle.toggled-on,
.dropdown-toggle.toggled-on:hover,
.dropdown-toggle.toggled-on:focus {
color: '.$zillah_c3.';
}
a.more-link:hover,
a:hover,
}
a.more-link:hover,
a:hover,
.site-title a:hover,
.cat-links a:hover,
.entry-title-blog a:hover,
Expand Down Expand Up @@ -567,17 +588,13 @@ function zillah_php_style() {
.main-navigation ul ul li:hover > a:hover,
.main-navigation ul ul li.focus > a:hover,
.main-navigation ul ul li:hover > a,
.main-navigation ul ul li.focus > a {
.main-navigation ul ul li.focus > a,
.main-navigation a:visited {
color: #FFF;
}
}
';

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

}
echo '</style>';
Expand Down
2 changes: 1 addition & 1 deletion inc/custom-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
function zillah_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'zillah_custom_header_args', array(
'default-image' => '',
'default-text-color' => '000000',
'default-text-color' => '7fcaad',
'width' => 1000,
'height' => 250,
'flex-height' => true,
Expand Down
15 changes: 12 additions & 3 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function zillah_customize_register( $wp_customize ) {

/* Show sidebar */
$wp_customize->add_setting('zillah_sidebar_show', array(
'default' => 0,
'default' => false,
'sanitize_callback' => 'zillah_sanitize_checkbox',
'transport' => 'postMessage',
));
Expand All @@ -63,7 +63,7 @@ function zillah_customize_register( $wp_customize ) {

/* Show Tags */
$wp_customize->add_setting('zillah_tags_show', array(
'default' => 0,
'default' => false,
'sanitize_callback' => 'zillah_sanitize_checkbox',
'transport' => 'postMessage',
));
Expand Down Expand Up @@ -98,7 +98,7 @@ function zillah_customize_register( $wp_customize ) {

$wp_customize->add_setting('zillah_home_slider_category', array(
'default' => 0,
'sanitize_callback' => 'sanitize_text_field',
'sanitize_callback' => 'zillah_sanitize_category_dropdown',
));

$wp_customize->add_control( new Zillah_Category_Control( $wp_customize, 'zillah_home_slider_category', array(
Expand Down Expand Up @@ -163,6 +163,15 @@ function zillah_sanitize_select( $input, $setting ) {
return ( array_key_exists( $input, $choices ) ? $input : $setting->default );
}


function zillah_sanitize_category_dropdown($input){
$cat = get_the_category_by_ID( $input );
if( empty( $cat ) ){
return '';
}
return $input;
}

/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
Expand Down
2 changes: 1 addition & 1 deletion inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function zillah_entry_footer() {
if ( 'post' === get_post_type() ) {

global $wp_customize;
$zillah_tags_show = get_theme_mod( 'zillah_tags_show', true );
$zillah_tags_show = get_theme_mod( 'zillah_tags_show', false );

if( $zillah_tags_show === true || is_customize_preview() ) {
/* translators: used between list items, there is a space after the comma */
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div class="content-wrap">

<div id="primary" class="content-area<?php echo $zillah_sidebar_show !== false ? " content-area-with-sidebar" : ""; ?>">
<div id="primary" class="content-area content-area-arch<?php echo $zillah_sidebar_show !== false ? " content-area-with-sidebar" : ""; ?>">
<main id="main" class="site-main" role="main">

<?php
Expand Down
Loading

0 comments on commit 67a01a7

Please sign in to comment.