Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Jan 10, 2017
2 parents a5b32a9 + e614e85 commit 648da83
Show file tree
Hide file tree
Showing 35 changed files with 457 additions and 182 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist/
tmp
config.codekit
npm-debug.log
/sass/maps
/config.codekit3
1 change: 1 addition & 0 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* The template for displaying 404 pages (not found).
*
* @package siteorigin-north
* @license GPL 2.0
*/

get_header(); ?>
Expand Down
1 change: 1 addition & 0 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package siteorigin-north
* @license GPL 2.0
*/

get_header(); ?>
Expand Down
14 changes: 13 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@

View full release information on [Github](https://github.com/siteorigin/siteorigin-north/releases).

= 1.3.0 - 10 January 2016 =
* Updated settings framework.
* Added new Stripped page layout option, primarily for e-commerce use.
* Fixed sticky header page jump.
* Fixed mobile menu scrolling with sticky header.
* Added Jetpack Infinite Scroll styling and template for WooCommerce.
* Added a setting to display Scroll to Top on mobile devices.
* Improved smooth scroll functionality for late loading assets like the SO Hero widget.
* Added a setting to display the WooCommerce mini-cart on the cart and checkout pages.
* Added menu font color settings.
* Added support for Jetpack Responsive Videos.

= 1.2.9 - 05 December 2016 =
* Fixed mobile menu breakpoint warning notice bug.
* Improved mobile menu breakpoint setting allowing lower values.
* Improve WooCommerce product quickview modal closing.
* Fix WooCommerce product quickview modal title overlap bug.
* Fixed WooCommerce product quickview modal title overlap bug.

= 1.2.8 - 07 November 2016 =
* Updated settings framework.
Expand Down
1 change: 1 addition & 0 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* and the comment form.
*
* @package siteorigin-north
* @license GPL 2.0
*/

/*
Expand Down
16 changes: 8 additions & 8 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
* Contains the closing of the #content div and all content after
*
* @package siteorigin-north
* @license GPL 2.0
*/

?>
</div>
</div><!-- #content -->

<footer id="colophon" class="site-footer <?php if( !siteorigin_setting('footer_constrained') ) echo 'unconstrained-footer' ?>" role="contentinfo">

<?php if( ! siteorigin_page_setting( 'hide_footer_widgets', false ) ) : ?>
<footer id="colophon" class="site-footer <?php if ( ! siteorigin_setting( 'footer_constrained' ) ) echo 'unconstrained-footer' ?>" role="contentinfo">
<?php if ( ! siteorigin_page_setting( 'hide_footer_widgets', false ) && ! in_array( siteorigin_page_setting( 'layout' ), array( 'stripped' ), true ) ) : ?>
<div class="container">

<?php
if( is_active_sidebar( 'footer-sidebar' ) ) {
if ( is_active_sidebar( 'footer-sidebar' ) ) {
$siteorigin_north_sidebars = wp_get_sidebars_widgets();
?>
<div class="widgets widget-area widgets-<?php echo count( $siteorigin_north_sidebars['footer-sidebar'] ) ?>" role="complementary" aria-label="<?php _e( 'Footer Sidebar', 'siteorigin-north' ); ?>">
Expand All @@ -27,7 +27,7 @@
}
?>

</div>
</div><!-- .container -->
<?php endif; ?>

<div class="site-info">
Expand All @@ -40,7 +40,7 @@
sprintf( esc_html__( 'Theme by %s.', 'siteorigin-north' ), '<a href="https://siteorigin.com/" rel="designer">SiteOrigin</a>' )
);

if( !empty($credit_text) ) {
if ( !empty( $credit_text ) ) {
?><span class="sep"> | </span><?php
echo wp_kses_post( $credit_text );
}
Expand All @@ -51,10 +51,10 @@
</footer><!-- #colophon -->
</div><!-- #page -->

<?php if( siteorigin_setting('navigation_scroll_to_top') ) : ?>
<?php if ( siteorigin_setting( 'navigation_scroll_to_top' ) ) : ?>
<div id="scroll-to-top">
<span class="screen-reader-text"><?php esc_html_e( 'Scroll to top', 'siteorigin-north' ); ?></span>
<?php siteorigin_north_display_icon('up-arrow') ?>
<?php siteorigin_north_display_icon( 'up-arrow' ); ?>
</div>
<?php endif; ?>

Expand Down
27 changes: 20 additions & 7 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SiteOrigin North functions and definitions
*
* @package siteorigin-north
* @license GPL 2.0
*/

define('SITEORIGIN_THEME_VERSION', 'dev');
Expand Down Expand Up @@ -192,21 +193,33 @@ function siteorigin_north_widgets_init() {
* Enqueue scripts and styles.
*/
function siteorigin_north_scripts() {
wp_enqueue_style( 'siteorigin-north-style', get_stylesheet_uri() );
wp_enqueue_style( 'siteorigin-north-icons', get_template_directory_uri() . '/css/north-icons.css' );

wp_enqueue_script( 'jquery-transit', get_template_directory_uri() . '/js/jquery.transit' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
wp_enqueue_script( 'siteorigin-north-script', get_template_directory_uri() . '/js/north' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
wp_enqueue_script( 'siteorigin-north-skip-link', get_template_directory_uri() . '/js/skip-link-focus-fix' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
// Theme stylesheet.
wp_enqueue_style( 'siteorigin-north-style', get_stylesheet_uri(), array(), SITEORIGIN_THEME_VERSION );

// Theme icons.
wp_enqueue_style( 'siteorigin-north-icons', get_template_directory_uri() . '/css/north-icons.css', array(), SITEORIGIN_THEME_VERSION );

// jQuery Transit.
wp_enqueue_script( 'jquery-transit', get_template_directory_uri() . '/js/jquery.transit' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), '0.9.12', true );

// Theme JavaScript.
wp_enqueue_script( 'siteorigin-north-script', get_template_directory_uri() . '/js/north' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), SITEORIGIN_THEME_VERSION, true );

// Skip link focus fix.
wp_enqueue_script( 'siteorigin-north-skip-link', get_template_directory_uri() . '/js/skip-link-focus-fix' . SITEORIGIN_THEME_JS_PREFIX . '.js', array(), SITEORIGIN_THEME_VERSION, true );

// Localize smooth scroll.
wp_localize_script( 'siteorigin-north-script', 'siteoriginNorth', array(
'smoothScroll' => siteorigin_setting( 'navigation_smooth_scroll' )
) );

if ( siteorigin_setting( 'responsive_fitvids' ) ) {
wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/js/jquery.fitvids' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
// jQuery FitVids.
if ( ! class_exists( 'Jetpack' ) && siteorigin_setting( 'responsive_fitvids' ) ) {
wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/js/jquery.fitvids' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), '1.1', true );
}

// Comment reply.
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
Expand Down
91 changes: 53 additions & 38 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Displays all of the <head> section and everything up till <div id="content">
*
* @package siteorigin-north
* @license GPL 2.0
*/

?><!DOCTYPE html>
Expand All @@ -29,12 +30,13 @@
</div>
<?php endif; ?>

<?php if( ! siteorigin_page_setting( 'hide_masthead', false ) ) : ?>
<?php if ( ! siteorigin_page_setting( 'hide_masthead', false ) ) : ?>
<header id="masthead" class="site-header layout-<?php echo sanitize_html_class( str_replace('_', '-', siteorigin_setting( 'masthead_layout' ) ) ) ?> <?php if( siteorigin_setting('navigation_sticky') ) echo 'sticky-menu'; ?>" role="banner"
<?php if( siteorigin_setting( 'navigation_sticky_scale' ) ) echo 'data-scale-logo="true"' ?> >
<div class="container">

<div class="container-inner">

<div class="site-branding">
<?php siteorigin_north_display_logo() ?>
<?php if( siteorigin_setting('branding_site_description') ) : ?>
Expand All @@ -44,52 +46,65 @@

<nav id="site-navigation" class="main-navigation" role="navigation">

<a href="#menu" id="mobile-menu-button">
<?php siteorigin_north_display_icon('menu') ?>
<?php if( siteorigin_setting('responsive_menu_text') ) : ?>
<?php echo esc_html( siteorigin_setting('responsive_menu_text') ) ?>
<?php else : ?>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'siteorigin-north' ); ?></span>
<?php endif; ?>
</a>
<?php if ( siteorigin_page_setting( 'layout' ) !== 'stripped' ) : ?>

<a href="#menu" id="mobile-menu-button">
<?php siteorigin_north_display_icon('menu') ?>
<?php if ( siteorigin_setting( 'responsive_menu_text' ) ) : ?>
<?php echo esc_html( siteorigin_setting( 'responsive_menu_text' ) ) ?>
<?php else : ?>
<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'siteorigin-north' ); ?></span>
<?php endif; ?>
</a>

<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu'
) );
?>

<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_id' => 'primary-menu'
) );
?>

<?php if( class_exists('Woocommerce') && !( is_cart() || is_checkout() ) && siteorigin_setting('woocommerce_display_cart') ): ?>
<?php global $woocommerce; ?>
<ul class="shopping-cart">
<li>
<a class="shopping-cart-link" href="<?php echo $woocommerce->cart->get_cart_url();?>">
<span class="screen-reader-text"><?php esc_html_e( 'View shopping cart', 'siteorigin-north' ); ?></span>
<span class="north-icon-cart"></span>
<span class="shopping-cart-text"><?php esc_html_e( ' View Cart ', 'siteorigin-north' ); ?></span>
<span class="shopping-cart-count"><?php echo WC()->cart->cart_contents_count;?></span>
</a>
<ul class="shopping-cart-dropdown" id="cart-drop">
<?php the_widget('WC_Widget_Cart');?>
<?php if ( class_exists( 'Woocommerce' ) ) : ?>
<?php if ( ( ! ( is_cart() || is_checkout() ) && siteorigin_setting( 'woocommerce_display_cart' ) ) || ( ( is_cart() || is_checkout() ) && siteorigin_setting( 'woocommerce_display_checkout_cart' ) ) ) : ?>
<?php global $woocommerce; ?>
<ul class="shopping-cart">
<li>
<a class="shopping-cart-link" href="<?php echo $woocommerce->cart->get_cart_url();?>">
<span class="screen-reader-text"><?php esc_html_e( 'View shopping cart', 'siteorigin-north' ); ?></span>
<span class="north-icon-cart"></span>
<span class="shopping-cart-text"><?php esc_html_e( ' View Cart ', 'siteorigin-north' ); ?></span>
<span class="shopping-cart-count"><?php echo WC()->cart->cart_contents_count;?></span>
</a>
<ul class="shopping-cart-dropdown" id="cart-drop">
<?php the_widget('WC_Widget_Cart');?>
</ul>
</li>
</ul>
</li>
</ul>
<?php endif; ?>
<?php endif; ?>

<?php if ( siteorigin_setting( 'navigation_search' ) ) : ?>
<a class="north-search-icon">
<label class="screen-reader-text"><?php esc_html_e( 'Open search bar', 'siteorigin-north' ); ?></label>
<?php siteorigin_north_display_icon('search'); ?>
</a>
<?php endif; ?>

<?php endif; ?>

<?php if( siteorigin_setting('navigation_search') ) : ?>
<a class="north-search-icon">
<label class="screen-reader-text"><?php esc_html_e( 'Open search bar', 'siteorigin-north' ); ?></label>
<?php siteorigin_north_display_icon('search'); ?>
</a>
<?php if ( siteorigin_page_setting( 'layout' ) == 'stripped' ) : ?>
<ul>
<li><a href="" class="stripped-backlink" onclick="window.history.go( -1 ); return false;"><?php esc_html_e( 'Go back', 'siteorigin-north' ); ?></a></li>
</ul>
<?php endif; ?>

</nav><!-- #site-navigation -->
</div>

</div>
</div><!-- .container-inner -->

</div><!-- .container -->

<?php if( siteorigin_setting('navigation_search') ) : ?>
<?php if ( siteorigin_setting( 'navigation_search' ) ) : ?>
<div id="header-search">
<div class="container">
<label for='s' class='screen-reader-text'><?php esc_html_e( 'Search for:', 'siteorigin-north' ); ?></label>
Expand Down
4 changes: 4 additions & 0 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ function siteorigin_north_body_classes( $classes ) {
$classes[] = 'no-topbar';
}

if ( siteorigin_setting( 'navigation_scroll_to_top_mobile' ) ) {
$classes[] = 'mobile-scroll-to-top';
}

return $classes;
}
endif;
Expand Down
31 changes: 26 additions & 5 deletions inc/jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
* See: https://jetpack.me/
*
* @package siteorigin-north
* @license GPL 2.0
*/

if ( ! function_exists( 'siteorigin_north_jetpack_setup' ) ) :
/**
* Add theme support for Infinite Scroll.
* See: https://jetpack.me/support/infinite-scroll/
* Jetpack setup function.
*
*/
function siteorigin_north_jetpack_setup() {
/*
* Enable support for Jetpack Infinite Scroll.
* See: https://jetpack.com/support/infinite-scroll/
*/
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'render' => 'siteorigin_north_infinite_scroll_render',
'footer' => 'page',
'posts_per_page' => 9,
) );

/*
* Enable support for Responsive Videos.
* See: https://jetpack.com/support/responsive-videos/
*/
add_theme_support( 'jetpack-responsive-videos' );
} // end function siteorigin_north_jetpack_setup
endif;
add_action( 'after_setup_theme', 'siteorigin_north_jetpack_setup' );
Expand All @@ -26,9 +38,18 @@ function siteorigin_north_jetpack_setup() {
* Custom render function for Infinite Scroll.
*/
function siteorigin_north_infinite_scroll_render() {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', get_post_format() );
if ( function_exists( 'is_woocommerce' ) && ( is_shop() || is_woocommerce() ) ) {
echo '<ul class="products">';
while ( have_posts() ) {
the_post();
wc_get_template_part( 'content', 'product' );
}
echo '</ul>';
} else {
while ( have_posts() ) {
the_post();
get_template_part( 'template-parts/content', get_post_format() );
}
}
} // end function siteorigin_north_infinite_scroll_render
endif;
2 changes: 1 addition & 1 deletion inc/settings
3 changes: 3 additions & 0 deletions inc/settings.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'fonts_main' => 'font__main',
'fonts_headings' => 'font__headings',
'fonts_details' => 'font__detail',
'fonts_menu' => 'font__menu',

// The page structure
'structure_sidebar_width' => 'size__site-sidebar',
Expand All @@ -20,6 +21,8 @@
'fonts_text_medium' => 'color__text_medium',
'fonts_text_light' => 'color__text_light',
'fonts_text_meta' => 'color__text_meta',
'fonts_text_menu' => 'color__text_menu',
'fonts_text_menu_hover' => 'color__text_menu_hover',

// The header customizations
'masthead_background_color' => 'masthead__background_color',
Expand Down
Loading

0 comments on commit 648da83

Please sign in to comment.