Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregpriday committed Mar 7, 2016
2 parents e8b564d + 32c6712 commit 76072d8
Show file tree
Hide file tree
Showing 45 changed files with 1,896 additions and 265 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
dist/
dist/
tmp
2 changes: 1 addition & 1 deletion build
77 changes: 77 additions & 0 deletions build-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module.exports = {
slug: 'so-widgets-bundle',
jsMinSuffix: '.min',
//contributors: {
// src: [
// '**/*',
// '!{build,build/**}', // Ignore build/ submodule
// '!{design,design/**}', // Ignore design/ and contents
// '!{inc/settings,inc/settings/**}', // Ignore settings submodule
// '!{inc/panels-lite,inc/panels-lite/**}', // Ignore panels-lite submodule
// '!{languages,languages/**}', // Ignore languages
// '!{tests,tests/**}', // Ignore tests/ and contents if any
// '!{tmp,tmp/**}' // Ignore tmp/ and contents if any
// ],
// skipCommits: [],
//},
version: {
src: [
'functions.php',
'readme.txt'
]
},
sass: {
src: [
'sass/**/*.scss',
],
include: [
'sass',
],
external: {
src: [
'inc/settings/css/**/*.scss',
],
include: [
'inc/settings/css'
],
}
},
less: {
src: [],
include:[],
external: {
src: [
'inc/panels-lite/css/**/*.less',
],
include: [
'inc/panels-lite/css',
],
},
},
js: {
src: [
'js/**/*.js',
'inc/settings/js/**/*.js',
'inc/panels-lite/js/**/*.js',
'!{node_modules,node_modules/**}', // Ignore node_modules/ and contents
'!{tests,tests/**}', // Ignore tests/ and contents
'!{tmp,tmp/**}' // Ignore tmp/ and contents
]
},
copy: {
src: [
'**/!(*.js|*.scss|*.md|style.css|woocommerce.css)', // Everything except .js and .scss files
'!{build,build/**}', // Ignore build/ and contents
'!{sass,sass/**}', // Ignore sass/ and contents
'inc/settings/chosen/*.js', // Ensure necessary .js files ignored in the first glob are copied
'!{inc/settings/bin,inc/settings/bin/**}', // Ignore settings/bin/ and contents
'!{inc/settings/README.md}', // Ignore settings/README.md
'!{tests,tests/**}', // Ignore tests/ and contents
'!{tmp,tmp/**}', // Ignore tmp/ and contents
'!phpunit.xml', // Not the unit tests configuration file. (If there is one.)
'!functions.php', // Not the functions .php file. It is copied by the 'version' task.
'!readme.txt', // Not the readme.txt file. It is copied by the 'version' task.
'!npm-debug.log' // Ignore debug log from NPM if it's there
]
}
};
13 changes: 13 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
= 1.1.2 - March 7 2016 =
* Fixed WooCommerce checkout button.
* Created new checkout page style.
* Styled core WordPress widgets.
* Small WooCommerce product page fixes.
* Fixed disable responsive layout for cart and checkout pages.

= 1.1.1 - March 2 2016 =
* Fixed/Improved various WooCommerce element styling.
* Added smooth scrolling navigation option for one-page sites.
* Updated settings framework.
* Updated all WooCommerce template files for latest version.

= 1.1 - January 20 2016 =
* Fixed WooCommerce enqueueing and buttons.
* Added various customizations in theme settings.
Expand Down
8 changes: 4 additions & 4 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
<?php // You can start editing here -- including this comment! ?>

<?php if ( have_comments() ) : ?>
<h3 class="comments-title">
<h2 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'siteorigin-north' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
?>
</h3>
</h2>

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'siteorigin-north' ); ?></h2>
<h3 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'siteorigin-north' ); ?></h3>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'siteorigin-north' ) ); ?></div>
Expand All @@ -57,7 +57,7 @@

<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'siteorigin-north' ); ?></h2>
<h3 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'siteorigin-north' ); ?></h3>
<div class="nav-links">

<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'siteorigin-north' ) ); ?></div>
Expand Down
7 changes: 4 additions & 3 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
if( is_active_sidebar( 'footer-sidebar' ) ) {
$siteorigin_north_sidebars = wp_get_sidebars_widgets();
?>
<div class="widgets widgets-<?php echo count( $siteorigin_north_sidebars['footer-sidebar'] ) ?>">
<div class="widgets widget-area widgets-<?php echo count( $siteorigin_north_sidebars['footer-sidebar'] ) ?>" role="complementary" aria-label="<?php _e( 'Footer Sidebar', 'siteorigin-north' ); ?>">
<?php dynamic_sidebar( 'footer-sidebar' ); ?>
</div>
<?php
Expand Down Expand Up @@ -50,9 +50,10 @@
</div><!-- #page -->

<?php if( siteorigin_setting('navigation_scroll_to_top') ) : ?>
<div id="scroll-to-top">
<button id="scroll-to-top">
<span class="screen-reader-text"><?php esc_html_e( 'Scroll to top', 'siteorigin-north' ); ?></span>
<img src="<?php echo get_template_directory_uri() ?>/images/up-arrow.svg" width="24px" height="24px" />
</div>
</button>
<?php endif; ?>

<?php wp_footer(); ?>
Expand Down
40 changes: 28 additions & 12 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ function siteorigin_north_widgets_init() {
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );

register_sidebar( array(
Expand All @@ -155,8 +155,8 @@ function siteorigin_north_widgets_init() {
'description' => '',
'before_widget' => '<div class="widget-wrapper"><aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside></div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );

}
Expand All @@ -171,6 +171,11 @@ function siteorigin_north_scripts() {

wp_enqueue_script( 'siteorigin-north-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') );

wp_localize_script( 'siteorigin-north-script', 'siteoriginNorth', array(
'smoothScroll' => siteorigin_setting( 'navigation_smooth_scroll' )
) );

if( siteorigin_setting('responsive_fitvids') ) {
wp_enqueue_script( 'fitvids', get_template_directory_uri() . '/js/jquery.fitvids' . SITEORIGIN_THEME_JS_PREFIX . '.js', array('jquery') );
Expand All @@ -195,24 +200,32 @@ function siteorigin_north_filter_comment_form_default_fields( $fields ){
'url' => __('Your Site URL', 'siteorigin-north'),
) );

$default_author = array('<label for="author"', '<input id="author" ');
$default_email = array('<label for="email"', '<input id="email" ');
$default_url = array('<label for="url"', '<input id="url" ');

$replace_author = array('<label for="author" class="screen-reader-text"', '<input id="author" placeholder="' . esc_attr($placeholders['author']) . '" ');
$replace_email = array('<label for="email" class="screen-reader-text"', '<input id="email" placeholder="' . esc_attr($placeholders['email']) . '" ');
$replace_url = array('<label for="url" class="screen-reader-text"', '<input id="url" placeholder="' . esc_attr($placeholders['url']) . '" ');

if( isset($fields['author']) ) {
$fields['author'] = str_replace(
'<input id="author" ',
'<input id="author" placeholder="' . esc_attr($placeholders['author']) . '" ',
$default_author,
$replace_author,
$fields['author']
);
}
if( isset($fields['email']) ) {
$fields['email'] = str_replace(
'<input id="email" ',
'<input id="email" placeholder="' . esc_attr($placeholders['email']) . '" ',
$default_email,
$replace_email,
$fields['email']
);
}
if( isset($fields['url']) ) {
$fields['url'] = str_replace(
'<input id="url" ',
'<input id="url" placeholder="' . esc_attr($placeholders['url']) . '" ',
$default_url,
$replace_url,
$fields['url']
);
}
Expand All @@ -223,10 +236,13 @@ function siteorigin_north_filter_comment_form_default_fields( $fields ){

function siteorigin_north_filter_comment_form_defaults( $defaults ){
$comment_placeholder = __('Enter your message', 'siteorigin-north');
$default_comment = array('<label for="comment"', '<textarea id="comment" ');
$replace_comment = array('<label for="comment" class="screen-reader-text"', '<textarea id="comment" placeholder="' . esc_attr($comment_placeholder) . '" ');

if( !empty( $defaults['comment_field'] ) ) {
$defaults['comment_field'] = str_replace(
'<textarea id="comment" ',
'<textarea id="comment" placeholder="' . esc_attr($comment_placeholder) . '" ',
$default_comment,
$replace_comment,
$defaults['comment_field']
);
$defaults['comment_field'] = '<div class="clear"></div>' . $defaults['comment_field'];
Expand Down
23 changes: 16 additions & 7 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@

<a href="#menu" id="mobile-menu-button">
<?php siteorigin_north_display_icon('menu') ?>
<?php echo esc_html( siteorigin_setting('responsive_menu_text') ) ?>
<?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
Expand All @@ -55,17 +59,14 @@
) );
?>

<?php if( siteorigin_setting('navigation_search') ) : ?>
<span class="north-icon-search"></span>
<?php endif; ?>

<?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 _e( ' View Cart ', 'siteorigin-north' ); ?></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">
Expand All @@ -75,6 +76,10 @@
</ul>
<?php endif; ?>

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

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

Expand All @@ -83,8 +88,12 @@
<?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>
<?php get_search_form() ?>
<?php siteorigin_north_display_icon('close'); ?>
<a id="close-search">
<span class="screen-reader-text"><?php esc_html_e( 'Close search bar', 'siteorigin-north' ); ?></span>
<?php siteorigin_north_display_icon('close'); ?>
</a>
</div>
</div>
<?php endif; ?>
Expand Down
9 changes: 9 additions & 0 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,12 @@ function siteorigin_north_render_title() {
}
add_action( 'wp_head', 'siteorigin_north_render_title' );
endif;

/* Have a uniform size for the tag cloud */
function siteorigin_north_tag_cloud_widget($args) {
$args['largest'] = 0.8; //largest tag
$args['smallest'] = 0.8; //smallest tag
$args['unit'] = 'em'; //tag font unit
return $args;
}
add_filter( 'widget_tag_cloud_args', 'siteorigin_north_tag_cloud_widget' );
2 changes: 1 addition & 1 deletion inc/panels-lite
2 changes: 1 addition & 1 deletion inc/settings
21 changes: 13 additions & 8 deletions inc/settings.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

function siteorigin_settings_localize( $loc ){
function siteorigin_north_settings_localize( $loc ){
return wp_parse_args( array(
'section_title' => __('Theme Settings', 'siteorigin-north'),
'section_description' => __('Change settings for your theme.', 'siteorigin-north'),
Expand All @@ -15,7 +15,7 @@ function siteorigin_settings_localize( $loc ){
'meta_box' => __('Page settings', 'siteorigin-north'),
), $loc);
}
add_filter('siteorigin_settings_localization', 'siteorigin_settings_localize');
add_filter('siteorigin_settings_localization', 'siteorigin_north_settings_localize');

/**
* Initialize the settings
Expand Down Expand Up @@ -223,6 +223,11 @@ function siteorigin_north_settings_init(){
'label' => __('Scroll to top', 'siteorigin-north'),
'description' => __('Display a scroll to top button', 'siteorigin-north'),
),
'smooth_scroll' => array(
'type' => 'checkbox',
'label' => __('Smooth scroll', 'siteorigin-north'),
'description' => __('Smooth scroll for internal anchor links', 'siteorigin-north'),
)
),
),

Expand Down Expand Up @@ -496,7 +501,7 @@ function siteorigin_north_settings_custom_css($css){
'.breadcrumbs a:hover {' . "\n" .
'color: ${branding_accent_dark};' . "\n" .
'}' . "\n" .
'.tags-list a:hover {' . "\n" .
'.tags-list a:hover,.tagcloud a:hover {' . "\n" .
'background: ${branding_accent_dark};' . "\n" .
'}' . "\n" .
'.more-link {' . "\n" .
Expand Down Expand Up @@ -663,6 +668,7 @@ function siteorigin_north_settings_defaults( $defaults ){
$defaults['navigation_resize_logo'] = true;
$defaults['navigation_post'] = true;
$defaults['navigation_scroll_to_top'] = true;
$defaults['navigation_smooth_scroll'] = true;

// Responsive settings
$defaults['responsive_disabled'] = false;
Expand All @@ -687,15 +693,14 @@ function siteorigin_north_settings_defaults( $defaults ){
$defaults['footer_top_padding'] = '40px';
$defaults['footer_side_padding'] = '40px';
$defaults['footer_top_margin'] = '30px';

// WooCommerce defaults
$defaults['woocommerce_display_cart'] = true;

return $defaults;
}
add_filter('siteorigin_settings_defaults', 'siteorigin_north_settings_defaults');

function siteorigin_north_custom_css( $css ) {
$css .= '';
return $css;
}
add_filter('siteorigin_settings_custom_css', 'siteorigin_north_custom_css');

/**
* Setup Page Settings for SiteOrigin North
Expand Down
Loading

0 comments on commit 76072d8

Please sign in to comment.