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 #126 from Codeinwp/development
Browse files Browse the repository at this point in the history
Fixed responsive isseus with the menu
Limit text for next / prev buttons
Decreased search page title on mobile devices
Added hooks
Decreased header on mobile devices
  • Loading branch information
rodica-andronache authored Jul 8, 2016
2 parents e3123ec + 20b111d commit b7210d1
Show file tree
Hide file tree
Showing 21 changed files with 2,308 additions and 1,309 deletions.
2 changes: 1 addition & 1 deletion 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<?php
get_search_form();
?>

<?php zillah_hook_404_content(); ?>
</div><!-- .page-content -->
</section><!-- .error-404 -->

Expand Down
4 changes: 4 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
get_header(); ?>

</div><!-- .container -->
<?php zillah_hook_archive_before(); ?>

<header class="page-header">
<div class="container">
Expand All @@ -27,6 +28,7 @@

<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 zillah_hook_archive_top(); ?>

<?php
if ( have_posts() ) : ?>
Expand All @@ -52,6 +54,7 @@

endif; ?>

<?php zillah_hook_archive_bottom(); ?>
</main><!-- #main -->
</div><!-- #primary -->

Expand All @@ -63,6 +66,7 @@

</div><!-- .content-wrap -->

<?php zillah_hook_archive_after(); ?>
<?php
get_footer();

4 changes: 4 additions & 0 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
}
?>

<?php zillah_hook_comments_before(); ?>
<div id="comments" class="comments-area">
<?php zillah_hook_comments_top(); ?>

<?php
if ( have_comments() ) : ?>
Expand Down Expand Up @@ -82,4 +84,6 @@
comment_form();
?>

<?php zillah_hook_comments_bottom(); ?>
</div><!-- #comments -->
<?php zillah_hook_comments_after(); ?>
9 changes: 8 additions & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

?>

<?php zillah_hook_content_bottom(); ?>
</div><!-- .container -->
</div><!-- #content -->
<?php zillah_hook_content_after(); ?>

<?php zillah_hook_footer_before(); ?>
<footer id="colophon" class="site-footer" role="contentinfo">
<?php zillah_hook_footer_top(); ?>

<?php if ( is_active_sidebar( 'zillah-footer-widget-area-3' ) || is_active_sidebar( 'zillah-footer-widget-area' ) || is_active_sidebar( 'zillah-footer-widget-area-2' ) ) : ?>

Expand Down Expand Up @@ -67,10 +71,13 @@
</div>
</div>
</div><!-- .site-info -->


<?php zillah_hook_footer_bottom(); ?>
</footer><!-- #colophon -->
<?php zillah_hook_footer_after(); ?>
</div><!-- #page -->

<?php zillah_hook_body_bottom(); ?>
<?php wp_footer(); ?>

</body>
Expand Down
33 changes: 23 additions & 10 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function zillah_scripts() {
'collapse' => '<span class="screen-reader-text">' . esc_html__( 'collapse child menu', 'zillah' ) . '</span>',
) );

wp_enqueue_script( 'boostrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20130115', true );
wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20130115', true );

wp_enqueue_script( 'zillah-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );

Expand Down Expand Up @@ -268,6 +268,19 @@ function zillah_customizer_script() {
require get_template_directory() . '/inc/jetpack.php';


/**
* Theme Hook Alliance hook.
*/
require get_template_directory() . '/inc/tha-theme-hooks.php';

/**
* Hooks.
*/
require get_template_directory() . '/inc/zillah_hooks.php';




function zillah_read_more_link() {
return '<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>';
}
Expand Down Expand Up @@ -375,14 +388,14 @@ function zillah_slider(){

$size = intval( round( sizeof( $slider_posts ) / 2, 0, PHP_ROUND_HALF_DOWN) );

echo "<div id=\"home-carousel\" class=\"carousel slide home-carousel" . ( $zillah_home_slider_show === false && is_customize_preview() ? " zillah-only-customizer" : "" ) . "\" data-ride=\"carousel\">";
echo "<div id=\"home-carousel\" class=\"carousel slide home-carousel" . esc_attr( $zillah_home_slider_show === false && is_customize_preview() ? " zillah-only-customizer" : "" ) . "\" data-ride=\"carousel\">";

if( $size ) :

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 "<li data-target=\"#home-carousel\" data-slide-to=\"" . esc_attr( $i ) . "\"" . ( $i === 0 ? " class=\"active\"" : "" ) . "></li>";
}
echo "</ol>";
}
Expand All @@ -400,11 +413,11 @@ function zillah_slider(){
<?php endif; ?>

<div class="item-inner-half">
<a href="<?php the_permalink(); ?>"" class="item-inner-link"></a>
<a href="<?php esc_url( the_permalink() ); ?>" class="item-inner-link"></a>
<?php the_post_thumbnail( 'zillah-slider-thumbnail' ); ?>
<div class="carousel-caption">
<div class="carousel-caption-inner">
<p class="carousel-caption-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p>
<p class="carousel-caption-title"><a href="<?php esc_url( the_permalink() ); ?>"><?php the_title(); ?></a></p>
<p class="carousel-caption-category"><?php echo get_the_category_list( ', ' ); ?></p>
</div>
</div>
Expand Down Expand Up @@ -735,7 +748,7 @@ function zillah_get_rgb( $color ) {
}


function custom_excerpt_length( $length ) {
function zillah_custom_excerpt_length( $length ) {
global $wp_customize;
$zillah_sidebar_show = get_theme_mod( 'zillah_sidebar_show', false );

Expand All @@ -745,7 +758,7 @@ function custom_excerpt_length( $length ) {
return 85;
}
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
add_filter( 'excerpt_length', 'zillah_custom_excerpt_length', 999 );

/* Post thumbnail */
function zillah_post_thumbnail() {
Expand All @@ -762,7 +775,7 @@ function zillah_post_thumbnail() {
if( $post_image_link && $zillah_image_as_thumbnail ) {
echo '<div class="post-thumbnail-wrap">';
echo '<a ' . ( $post_format !== 'quote' ? 'href="' . esc_url( get_permalink() ) . '"' : '' ) . ' class="post-thumbnail" rel="bookmark">';
echo '<img width="1170" height="545" src="'. $post_image_link .'" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="'. esc_attr( get_the_title() ) .'">';
echo '<img width="1170" height="545" src="'. esc_attr( $post_image_link ) .'" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="'. esc_attr( get_the_title() ) .'">';
echo '</a>';
echo '</div>';
}
Expand All @@ -780,7 +793,7 @@ function zillah_post_image() {
$post_image_link = zillah_catch_that_image();
if( $post_image_link ) {
echo '<div class="post-thumbnail-wrap"><a href="' . esc_url( get_permalink() ) . '" class="post-thumbnail" rel="bookmark">';
echo '<img width="1170" height="545" src="'. $post_image_link .'" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="'. esc_attr( get_the_title() ) .'">';
echo '<img width="1170" height="545" src="'. esc_attr( $post_image_link ) .'" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="'. esc_attr( get_the_title() ) .'">';
echo '</a></div>';
}
}
Expand Down Expand Up @@ -846,7 +859,7 @@ function zillah_post_gallery() {
}
?>
<div class="item<?php echo $i === 1 ? ' active' : ''; ?>">
<img src="<?php echo $url; ?>" alt="">
<img src="<?php echo esc_url( $url ); ?>" alt="">
</div>
<?php
endforeach;
Expand Down
32 changes: 19 additions & 13 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@
*/

?><!DOCTYPE html>
<?php zillah_hook_html_before(); ?>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php wp_head(); ?>
<?php zillah_hook_head_top(); ?>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php zillah_hook_head_bottom(); ?>
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php zillah_hook_body_top(); ?>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'zillah' ); ?></a>

<?php zillah_hook_header_before(); ?>
<header id="masthead" class="site-header" role="banner">

<div class="header-inner-top">
Expand Down Expand Up @@ -71,21 +74,24 @@
</div>
</div>

<div class="header-inner-site-branding">
<div class="header-inner-site-branding<?php echo ! is_home() || ! is_front_page() ? ' header-logo-wrap-single' : ''; ?>">
<div class="container container-header-logo">
<div class="site-branding-wrap">
<?php zillah_hook_header_top(); ?>
<div class="site-branding-wrap">
<div class="site-branding">
<?php zillah_brand(); ?>
</div><!-- .site-branding -->
</div>
<?php zillah_hook_header_bottom(); ?>
</div><!-- .container-header-logo -->
</div>

</header><!-- #masthead -->

<?php zillah_hook_header_after(); ?>

<?php zillah_slider(); ?>


<?php zillah_hook_content_before(); ?>
<div id="content" class="site-content">
<div class="container">
<div class="container">
<?php zillah_hook_content_top(); ?>
10 changes: 6 additions & 4 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
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';
$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';
$wp_customize->get_setting( 'header_image' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_image_data' )->transport = 'postMessage';

require_once ( 'class/zillah_category-selector-control.php');
require_once ( 'class/zillah-google-fonts.php');
Expand Down
Loading

0 comments on commit b7210d1

Please sign in to comment.