Skip to content

Commit

Permalink
Merge branch 'release/1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregpriday committed May 24, 2016
2 parents bdb9442 + e44045d commit 1c8800f
Show file tree
Hide file tree
Showing 25 changed files with 262 additions and 132 deletions.
Binary file added admin/about/github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/about/north-logo-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/about/north-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions admin/about/page-customize.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h3><?php _e( 'Unlimited Customization', 'siteorigin-north' ) ?></h3>
<p>
<?php printf( __( "North is easy to customize, right inside the %sWordPress Customizer%s.", 'siteorigin-north' ), '<a href="' . admin_url( 'customize.php' ) . '">', '</a>' ) ?>
<?php printf( __( "If there's something else you need to customize, then try out our free %sSiteOrigin CSS%s plugin.", 'siteorigin-north' ), '<a href="https://wordpress.org/plugins/so-css/">', '</a>' ) ?>
</p>
5 changes: 5 additions & 0 deletions admin/about/page-free.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h3><?php _e( 'Forever Free', 'siteorigin-north' ) ?></h3>
<p>
<?php _e( "North is a completely free WordPress theme.", 'siteorigin-north' ) ?>
<?php _e( "We'll continue developing and enhancing it for years to come.", 'siteorigin-north' ) ?>
</p>
6 changes: 6 additions & 0 deletions admin/about/page-github.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<h3><?php _e( 'Developed on Github', 'siteorigin-north' ) ?></h3>
<img src="<?php echo get_template_directory_uri() ?>/admin/about/github.png" class="about-image-right about-image-no-text-below" />
<p>
<?php printf( __( "North is actively %sdeveloped on Github%s.", 'siteorigin-north' ), '<a href="https://github.com/siteorigin/siteorigin-north">', '</a>' ) ?>
<?php _e( "You can watch what's happening with its development and even make contributions yourself.", 'siteorigin-north' ) ?>
</p>
5 changes: 5 additions & 0 deletions admin/about/page-page-builder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h3><?php _e( 'Enhanced by Page Builder', 'siteorigin-north' ) ?></h3>
<p>
<?php printf( __( "North integrates, beautifully, with our %sfree Page Builder%s plugin.", 'siteorigin-north' ), '<a href="https://siteorigin.com/page-builder/">', '</a>' ) ?>
<?php _e( 'This powerful plugin gives you full drag and drop capabilities right inside North.', 'siteorigin-north' ) ?>
</p>
4 changes: 4 additions & 0 deletions admin/about/page-support.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h3><?php _e( 'Support and Documentation', 'siteorigin-north' ) ?></h3>
<p>
<?php printf( __( "Our dedicated support team is ready to help you over on our %sfree support forums%s.", 'siteorigin-north' ), '<a href="https://siteorigin.com/thread/">', '</a>' ) ?>
</p>
Binary file added admin/about/video-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/about/video-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/about/video-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build
Submodule build updated 2 files
+53 −26 gulpfile.js
+2 −1 package.json
4 changes: 2 additions & 2 deletions build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
'!{tmp,tmp/**}' // Ignore tmp/ and contents if any
],
format: 'php',
skipCommits: [ ],
skipCommits: [],
excludeEmails: [
'77e88891e4965161953320ec66623cbc', // Remove [email protected]
]
Expand Down Expand Up @@ -63,7 +63,7 @@ module.exports = {
},
copy: {
src: [
'**/!(*.js|*.scss|*.md|style.css|woocommerce.css)', // Everything except .js and .scss files
'**/!(*.js|*.scss|*.md|style.css|woocommerce.css|woocommerce-rtl.css|woocommerce-smallscreen-rtl.css)', // Everything except .js and .scss files and the output of LESS/CSS tasks
'!{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
Expand Down
10 changes: 10 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
= 1.2.1 - May 24 2016 =
* Updated settings framework.
* Added about page.
* Fixed post thumbnail size.
* Added logo migration code.
* Fixed search input on iOS.
* Improved WooCommerce cart design on mobile.
* Disabled sticky menu on mobile devices until all issues can be resolved.
* Standardised jquery handles.

= 1.2 - May 6 2016 =
* Fixes to RTL layout.
* Styled various WooCommerce widgets.
Expand Down
7 changes: 3 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

// The settings manager
include get_template_directory() . '/inc/settings/settings.php';
include get_template_directory() . '/inc/settings/page-settings.php';

if ( ! function_exists( 'siteorigin_north_setup' ) ) :
/**
Expand Down Expand Up @@ -41,7 +40,7 @@ function siteorigin_north_setup() {
*/
add_theme_support( 'post-thumbnails' );

set_post_thumbnail_size( 720, 380 );
set_post_thumbnail_size( 650, 650 );

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
Expand Down Expand Up @@ -185,7 +184,7 @@ 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( 'siteorigin-north-transit', get_template_directory_uri() . '/js/jquery.transit' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
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' ) );

Expand All @@ -194,7 +193,7 @@ function siteorigin_north_scripts() {
) );

if ( siteorigin_setting( 'responsive_fitvids' ) ) {
wp_enqueue_script( 'fitvids', get_template_directory_uri() . '/js/jquery.fitvids' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
wp_enqueue_script( 'jquery-fitvids', get_template_directory_uri() . '/js/jquery.fitvids' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ) );
}

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
Expand Down
4 changes: 4 additions & 0 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ function siteorigin_north_body_classes( $classes ) {
if( !empty( $page_settings['hide_footer_widgets'] ) ) $classes[] = 'page-layout-hide-footer-widgets';
}

if( wp_is_mobile() ) {
$classes[] = 'is-mobile-device';
}

if( !is_active_sidebar('main-sidebar') ) {
$classes[] = 'no-active-sidebar';
}
Expand Down
123 changes: 64 additions & 59 deletions inc/settings.php
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
<?php

if ( ! function_exists( 'siteorigin_north_settings_localize' ) ) :
/**
* The default settings labels.
*/
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' ),
'premium_only' => __( 'Available in Premium', 'siteorigin-north' ),
'premium_url' => 'https://siteorigin.com/premium/?target=theme_north',
// For the controls
'variant' => __( 'Variant', 'siteorigin-north' ),
'subset' => __( 'Subset', 'siteorigin-north' ),

// For the settings metabox
'meta_box' => __( 'Page settings', 'siteorigin-north' ),

// For archives section
'page_section_title' => __( 'Page Template Settings', 'siteorigin-north' ),
'page_section_description' => __( 'Change layouts for various pages on your site.', 'siteorigin-north' ),

// For all the different temples and template types
'template_home' => __( 'Blog Page', 'siteorigin-north' ),
'template_search' => __( 'Search Results', 'siteorigin-north' ),
'template_date' => __( 'Date Archives', 'siteorigin-north' ),
'template_404' => __( 'Not Found', 'siteorigin-north' ),
'template_author' => __( 'Author Archives', 'siteorigin-north' ),
'templates_post_type' => __( 'Type', 'siteorigin-north' ),
'templates_taxonomy' => __( 'Taxonomy', 'siteorigin-north' ),
), $loc );
}
endif;
add_filter('siteorigin_settings_localization', 'siteorigin_north_settings_localize');

if ( ! function_exists( 'siteorigin_north_settings_init' ) ) :
/**
* Initialize the settings
Expand Down Expand Up @@ -152,8 +118,7 @@ function siteorigin_north_settings_init(){
'fields' => array(
'sidebar_width' => array(
'label' => __( 'Sidebar Width', 'siteorigin-north' ),
'type' => 'text',
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'type' => 'measurement',
'live' => true,
)
)
Expand Down Expand Up @@ -190,21 +155,18 @@ function siteorigin_north_settings_init(){
'live' => true,
),
'border_width' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Border Width', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => true,
),
'padding' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Padding', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => false,
),
'bottom_margin' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Bottom Margin', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => true,
),
)
Expand Down Expand Up @@ -340,27 +302,23 @@ function siteorigin_north_settings_init(){
'live' => true,
),
'border_width' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Border Width', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => true,
),
'top_padding' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Top Padding', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => true,
),
'side_padding' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Side Padding', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => true,
),
'top_margin' => array(
'type' => 'text',
'type' => 'measurement',
'label' => __( 'Top Margin', 'siteorigin-north' ),
'sanitize_callback' => array( 'SiteOrigin_Settings_Value_Sanitize', 'measurement' ),
'live' => true,
),
),
Expand Down Expand Up @@ -772,18 +730,16 @@ function siteorigin_north_settings_custom_css($css){
.woocommerce table.shop_table .cart_totals .amount {
color: ${branding_accent};
}
.woocommerce table.shop_table button {
.woocommerce table.shop_table .button {
.font( ${fonts_headings} );
border: 1px solid ${fonts_text_dark};
color: ${fonts_text_dark};
}
.woocommerce table.shop_table button.checkout-button {
.woocommerce table.shop_table .button.checkout-button {
background: ${branding_accent};
border: 1px solid ${branding_accent};
}
.woocommerce table.shop_table button.button,.woocommerce table.shop_table button.button-continue-shopping {
border: 1px solid ${fonts_text_dark};
color: ${fonts_text_dark};
}
.woocommerce table.shop_table button:hover {
.woocommerce table.shop_table .button:hover {
background: ${branding_accent_dark};
border-color: ${branding_accent_dark};
}
Expand All @@ -800,10 +756,10 @@ function siteorigin_north_settings_custom_css($css){
background: ${branding_accent_dark};
}
.main-navigation .shopping-cart:hover .shopping-cart-count {
background: ${branding_accent_dark};
background: ${branding_accent_dark} padding-box;
}
.main-navigation .shopping-cart .shopping-cart-count {
background: ${branding_accent};
background: ${branding_accent} padding-box;
}
.widget_shopping_cart_content .cart_list .mini_cart_item .mini_cart_details .mini_cart_product {
color: ${fonts_text_dark};
Expand Down Expand Up @@ -1132,3 +1088,52 @@ function siteorigin_north_page_settings_panels_defaults( $settings ){
}
endif;
add_filter('siteorigin_page_settings_panels_home_defaults', 'siteorigin_north_page_settings_panels_defaults');

if( !function_exists('siteorigin_north_siteorigin_setting_update_image') ) :
/**
* Convert URL based images into IDs
*
* @param $mods
*
* @return mixed
*/
function siteorigin_north_siteorigin_setting_update_image( $mods ) {
foreach ( array( 'branding_logo', 'branding_retina_logo' ) as $key ) {
if( ! empty( $mods[ 'theme_settings_' . $key ] ) && ! is_numeric( $mods[ 'theme_settings_' . $key ] ) ) {
$mods[ 'theme_settings_' . $key ] = SiteOrigin_Settings::get_image_id( $mods[ 'theme_settings_' . $key ] );
}
}

return $mods;
}
endif;
add_filter( 'option_theme_mods_siteorigin-north', 'siteorigin_north_siteorigin_setting_update_image' );

if( !function_exists( 'siteorigin_north_about_page' ) ) :
/**
* Adds everything we need for the North about page.
*/
function siteorigin_north_about_page( $about ){
$about['title_image'] = get_template_directory_uri() . '/admin/about/north-logo-small.png';
$about['title_image_2x'] = get_template_directory_uri() . '/admin/about/north-logo-large.png';

$about['video_thumbnail'] = array(
get_template_directory_uri() . '/admin/about/video-1.jpg',
get_template_directory_uri() . '/admin/about/video-2.jpg',
get_template_directory_uri() . '/admin/about/video-3.jpg',
);

$about['description'] = __( 'SiteOrigin North is a simple, customizable WordPress theme. Check out this video to get an idea of what it has to offer.', 'siteorigin-north' );

$about['sections'] = array(
'free',
'customize',
'page-builder',
'support',
'github',
);

return $about;
}
endif;
add_filter( 'siteorigin_about_page', 'siteorigin_north_about_page' );
25 changes: 21 additions & 4 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
function siteorigin_north_display_logo(){
$logo = siteorigin_setting( 'branding_logo' );
if( !empty($logo) ) {
$logo_id = attachment_url_to_postid( $logo );
$attrs = apply_filters( 'siteorigin_north_logo_attributes', array() );

?><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php
echo wp_get_attachment_image( $logo_id, 'full', false, $attrs );
echo wp_get_attachment_image( $logo, 'full', false, $attrs );
?></a><?php

}
Expand All @@ -35,10 +34,28 @@ function siteorigin_north_display_logo(){
function siteorigin_north_display_retina_logo( $attr ){
$logo = siteorigin_setting( 'branding_logo' );
$retina = siteorigin_setting( 'branding_retina_logo' );

if( !empty($retina) ) {
$attr['srcset'] = $logo . ' 1x,' . $retina . ' 2x';
return $attr;

$srcset = array();

$logo_src = wp_get_attachment_image_src( $logo, 'full' );
$retina_src = wp_get_attachment_image_src( $retina, 'full' );

if( !empty( $logo_src ) ) {
$srcset[] = $logo_src[0] . ' 1x';
}

if( !empty( $logo_src ) ) {
$srcset[] = $retina_src[0] . ' 2x';
}

if( ! empty( $srcset ) ) {
$attr['srcset'] = implode( ',', $srcset );
}
}

return $attr;
}
endif;
add_filter( 'siteorigin_north_logo_attributes', 'siteorigin_north_display_retina_logo', 10, 1 );
Expand Down
Loading

0 comments on commit 1c8800f

Please sign in to comment.