Skip to content

Commit

Permalink
Merge branch 'release/1.2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregpriday committed Aug 30, 2016
2 parents 17c8184 + 2b1330d commit cd85752
Show file tree
Hide file tree
Showing 18 changed files with 397 additions and 134 deletions.
17 changes: 17 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
= 1.2.4 - 2 August 2016 =
* Added smooth scroll to mobile menu
* Integrated with SiteOrigin Premium.
* Prefixed all global JS function names.
* Display breadcrumb even without page title.
* Fixed sticky masthead with overlap setting.
* Added page featured image.
* Improved site title SEO.
* Added new featured image size for no-sidebar template.
* Extending smooth scroll sitewide.
* Added settings to use post excerpt in blog archives.
* Added action hook underneath entry author avatar.
* Allowed the use of HTML in the author bio field.
* Changed styling of the author box.
* Reduced padding between list items on account page.
* Fixed default settings.

= 1.2.3 - 15 June 2016 =
* Fix to cart button for latest WooCommerce
* Updated settings framework
Expand Down
2 changes: 2 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

define('SITEORIGIN_THEME_VERSION', 'dev');
define('SITEORIGIN_THEME_JS_PREFIX', '');
define('SITEORIGIN_THEME_PREMIUM_URL', 'https://siteorigin.com/downloads/premium/');

// The settings manager
include get_template_directory() . '/inc/settings/settings.php';
Expand Down Expand Up @@ -41,6 +42,7 @@ function siteorigin_north_setup() {
add_theme_support( 'post-thumbnails' );

set_post_thumbnail_size( 650, 650 );
add_image_size( 'north-thumbnail-no-sidebar', 1040, 650, true );

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
Expand Down
23 changes: 21 additions & 2 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@ function siteorigin_north_body_classes( $classes ) {
$classes[] = 'is-mobile-device';
}

if( !is_active_sidebar('main-sidebar') ) {
if( ! is_active_sidebar( 'main-sidebar' ) ) {
$classes[] = 'no-active-sidebar';
}

if( siteorigin_setting('navigation_sticky') ) {
if( siteorigin_setting( 'navigation_sticky' ) ) {
$classes[] = 'sticky-menu';
}

if( ! siteorigin_setting( 'masthead_text_above' ) ) {
$classes[] = 'no-topbar';
}

return $classes;
}
endif;
Expand Down Expand Up @@ -107,6 +111,11 @@ function siteorigin_north_render_title() {
add_action( 'wp_head', 'siteorigin_north_render_title' );
endif;

/*
* Allow the use of HTML in author bio
*/
remove_filter( 'pre_user_description' , 'wp_filter_kses' );

if ( ! function_exists( 'siteorigin_north_tag_cloud_widget' ) ) :
/*
* Have a uniform size for the tag cloud items
Expand All @@ -119,3 +128,13 @@ function siteorigin_north_tag_cloud_widget($args) {
}
endif;
add_filter( 'widget_tag_cloud_args', 'siteorigin_north_tag_cloud_widget' );

if ( ! function_exists( 'siteorigin_north_excerpt_length' ) ) :
/*
* Filter the except length
*/
function siteorigin_north_excerpt_length( $length ) {
return siteorigin_setting( 'blog_excerpt_length' );
}
endif;
add_filter( 'excerpt_length', 'siteorigin_north_excerpt_length', 999 );
2 changes: 1 addition & 1 deletion inc/settings
2 changes: 1 addition & 1 deletion inc/settings.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// The fonts
'fonts_main' => 'font__main',
'fonts_headings' => 'font__headings',
'fonts_details' => 'font__blockquote',
'fonts_details' => 'font__detail',

// The page structure
'structure_sidebar_width' => 'size__site-sidebar',
Expand Down
118 changes: 99 additions & 19 deletions inc/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ function siteorigin_north_settings_init(){
'label' => __( 'Site Description', 'siteorigin-north' ),
'description' => __( 'Show your site description below your site title or logo.', 'siteorigin-north' )
),
'attribution' => array(
'type' => 'checkbox',
'label' => __('Hide SiteOrigin Attribution', 'siteorigin-north'),
'description' => __('Hide the SiteOrigin link in your footer.', 'siteorigin-north'),
'teaser' => true,
),
'accent' => array(
'type' => 'color',
'label' => __( 'Accent Color', 'siteorigin-north' ),
Expand Down Expand Up @@ -96,7 +102,7 @@ function siteorigin_north_settings_init(){

'menu' => array(
'type' => 'media',
'label' => __('Responsive menu icon', 'siteorigin-north'),
'label' => __('Mobile menu icon', 'siteorigin-north'),
),
'search' => array(
'type' => 'media',
Expand Down Expand Up @@ -207,32 +213,62 @@ function siteorigin_north_settings_init(){
)
),
),
'blog' => array(
'title' => __( 'Blog', 'siteorigin-north' ),
'fields' => array(
'blog' => array(
'title' => __( 'Blog', 'siteorigin-north' ),
'fields' => array(
'featured_archive' => array(
'type' => 'checkbox',
'label' => __( 'Featured image on archive', 'siteorigin-north' ),
'type' => 'checkbox',
'label' => __( 'Featured image on archive', 'siteorigin-north' ),
),
'post_content' => array(
'type' => 'select',
'label' => __( 'Archive Post Content', 'siteorigin-north' ),
'description' => __( 'Choose how to display your post content on blog and archive pages. Select Full Post Content if using the "more" quicktag.', 'siteorigin-north' ),
'options' => array(
'content' => __( 'Full Post Content', 'siteorigin-north' ),
'excerpt' => __( 'Post Excerpt', 'siteorigin-north' ),
)
),
'read_more_text' => array(
'type' => 'text',
'label' => __( 'Read More Text', 'siteorigin-north' ),
'description' => __( 'The button text displayed when posts are split using the "more" quicktag.', 'siteorigin-north' ),
),
'excerpt_length' => array(
'type' => 'number',
'label' => __( 'Excerpt Length', 'siteorigin-north' ),
'description' => __( 'If no manual post excerpt is added one will be generated. How many words should it be? Only applicable if Post Excerpt has been selected from the Archive Post Content setting.', 'siteorigin-north' ),
),
'excerpt_post_link' => array(
'type' => 'checkbox',
'label' => __( 'Post Excerpt Read More Link', 'siteorigin-north' ),
'description' => __( 'Display the Read More Text below the post excerpt. Only applicable if Post Excerpt has been selected from the Archive Post Content setting.', 'siteorigin-north' )
),
'featured_single' => array(
'type' => 'checkbox',
'label' => __( 'Featured image on single', 'siteorigin-north' ),
'type' => 'checkbox',
'label' => __( 'Featured image on single', 'siteorigin-north' ),
),
'display_author_box' => array(
'type' => 'checkbox',
'label' => __( 'Display author box on single', 'siteorigin-north' ),
'type' => 'checkbox',
'label' => __( 'Display author box on single', 'siteorigin-north' ),
),
'display_date' => array(
'type' => 'checkbox',
'label' => __( 'Display date', 'siteorigin-north' ),
'type' => 'checkbox',
'label' => __( 'Display date', 'siteorigin-north' ),
),
'display_author' => array(
'type' => 'checkbox',
'label' => __( 'Display author', 'siteorigin-north' ),
'type' => 'checkbox',
'label' => __( 'Display author', 'siteorigin-north' ),
),
'display_comment_count' => array(
'type' => 'checkbox',
'label' => __( 'Display comment count', 'siteorigin-north' ),
'type' => 'checkbox',
'label' => __( 'Display comment count', 'siteorigin-north' ),
),
'ajax_comments' => array(
'type' => 'checkbox',
'label' => __('Ajax Comments', 'siteorigin-north'),
'description' => __('Keep the conversation flowing with ajax loading comments.', 'siteorigin-north'),
'teaser' => true,
)
)
),
Expand All @@ -245,7 +281,7 @@ function siteorigin_north_settings_init(){
),
'menu_text' => array(
'type' => 'text',
'label' => __( 'Responsive Menu Text', 'siteorigin-north' ),
'label' => __( 'Mobile Menu Text', 'siteorigin-north' ),
),
'menu_breakpoint' => array(
'label' => __( 'Menu Breakpoint', 'siteorigin-north' ),
Expand Down Expand Up @@ -401,6 +437,7 @@ function siteorigin_north_settings_custom_css($css){
color: ${fonts_text_dark};
}
blockquote {
.font( ${fonts_details} );
color: ${branding_accent};
}
::-moz-selection {
Expand All @@ -419,9 +456,11 @@ function siteorigin_north_settings_custom_css($css){
}
input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],textarea {
color: ${fonts_text_medium};
.font( ${fonts_details} );
}
.wpcf7 input.wpcf7-form-control.wpcf7-text,.wpcf7 input.wpcf7-form-control.wpcf7-number,.wpcf7 input.wpcf7-form-control.wpcf7-date,.wpcf7 textarea.wpcf7-form-control.wpcf7-textarea,.wpcf7 select.wpcf7-form-control.wpcf7-select,.wpcf7 input.wpcf7-form-control.wpcf7-quiz {
color: ${fonts_text_medium};
.font( ${fonts_details} );
}
.wpcf7 input.wpcf7-form-control.wpcf7-submit[disabled] {
color: ${fonts_text_light};
Expand Down Expand Up @@ -474,6 +513,9 @@ function siteorigin_north_settings_custom_css($css){
#header-search {
background: ${masthead_background_color};
}
#header-search input[type="search"] {
.font( ${fonts_details} );
}
#mobile-navigation {
background: .rgba( ${responsive_mobile_menu_background_color}, ${responsive_mobile_menu_background_opacity});
}
Expand All @@ -499,6 +541,9 @@ function siteorigin_north_settings_custom_css($css){
#mobile-navigation ul li .dropdown-toggle {
color: ${responsive_mobile_menu_text_color};
}
.search-form .search-field {
.font( ${fonts_details} );
}
.tagcloud a {
background: ${fonts_text_meta};
}
Expand Down Expand Up @@ -528,6 +573,7 @@ function siteorigin_north_settings_custom_css($css){
}
#masthead .site-branding .site-title {
color: ${fonts_text_dark};
.font( ${fonts_headings} );
}
#masthead.layout-centered .site-branding {
margin: 0 auto ${masthead_padding} auto;
Expand Down Expand Up @@ -574,13 +620,17 @@ function siteorigin_north_settings_custom_css($css){
.entry-title {
color: ${fonts_text_dark};
}
.entry-meta {
.font( ${fonts_details} );
}
.entry-meta li,.entry-meta a,.entry-meta .meta-icon {
color: ${fonts_text_meta};
}
.entry-meta li.hovering,.entry-meta li.hovering a,.entry-meta li.hovering .meta-icon {
color: ${branding_accent_dark};
}
.breadcrumbs {
.font( ${fonts_details} );
color: ${fonts_text_light};
}
.breadcrumbs a:hover {
Expand All @@ -607,6 +657,9 @@ function siteorigin_north_settings_custom_css($css){
background: ${branding_accent};
border-color: ${branding_accent};
}
.post-pagination {
.font( ${fonts_details} );
}
.post-pagination a {
color: ${fonts_text_medium};
}
Expand Down Expand Up @@ -640,9 +693,11 @@ function siteorigin_north_settings_custom_css($css){
}
#commentform .comment-form-author input,#commentform .comment-form-email input,#commentform .comment-form-url input {
color: ${fonts_text_medium};
.font( ${fonts_details} );
}
#commentform .comment-form-comment textarea {
color: ${fonts_text_medium};
.font( ${fonts_details} );
}
#commentform .form-allowed-tags,#commentform .comment-notes,#commentform .logged-in-as {
color: ${fonts_text_meta};
Expand Down Expand Up @@ -676,11 +731,13 @@ function siteorigin_north_settings_custom_css($css){
}
.woocommerce .woocommerce-result-count {
color: ${fonts_text_meta};
.font( ${fonts_details} );
}
.woocommerce #main ul.products li.product h3 {
color: ${fonts_text_dark};
}
.woocommerce #main ul.products li.product .price {
.font( ${fonts_details} );
color: ${branding_accent};
}
.woocommerce button.button.alt,.woocommerce #review_form #respond .form-submit input,.woocommerce .woocommerce-message .button,.woocommerce .products .button {
Expand All @@ -696,6 +753,7 @@ function siteorigin_north_settings_custom_css($css){
}
.woocommerce.single #content div.product p.price {
color: ${branding_accent};
.font( ${fonts_details} );
}
.woocommerce.single #content div.product .woocommerce-product-rating .woocommerce-review-link {
color: ${fonts_text_medium};
Expand Down Expand Up @@ -847,6 +905,7 @@ function siteorigin_north_settings_custom_css($css){
}
.woocommerce #quick-view-container .product-content-wrapper .product-info-wrapper .price {
color: ${branding_accent};
.font( ${fonts_details} );
}';
return $css;
}
Expand Down Expand Up @@ -932,7 +991,7 @@ function siteorigin_north_settings_defaults( $defaults ){
$defaults['masthead_layout'] = 'default';
$defaults['masthead_text_above'] = '';
$defaults['masthead_background_color'] = '#fafafa';
$defaults['masthead_top_background_color'] = false;
$defaults['masthead_top_background_color'] = '#f4f4f4';
$defaults['masthead_border_color'] = '#d4d4d4';
$defaults['masthead_border_width'] = '1px';
$defaults['masthead_padding'] = '30px';
Expand All @@ -957,6 +1016,10 @@ function siteorigin_north_settings_defaults( $defaults ){

// Blog settings
$defaults['blog_featured_archive'] = true;
$defaults['blog_post_content'] = 'content';
$defaults['blog_read_more_text'] = __( 'Continue reading', 'siteorigin-north' );
$defaults['blog_excerpt_length'] = 55;
$defaults['blog_excerpt_post_link'] = true;
$defaults['blog_featured_single'] = true;
$defaults['blog_display_author_box'] = false;
$defaults['blog_display_date'] = true;
Expand Down Expand Up @@ -1016,6 +1079,16 @@ function siteorigin_north_page_settings( $settings, $type, $id ){
'description' => __( 'Display the page title on this page.', 'siteorigin-north' )
);

if( $type == 'post' ) $post = get_post( $id );
if( ! empty( $post ) && $post->post_type == 'page' ) {
$settings['featured_image'] = array(
'type' => 'checkbox',
'label' => __( 'Page Featured Image', 'vantage' ),
'checkbox_label' => __( 'display', 'vantage' ),
'description' => __( 'Display the page featured image on this page.', 'vantage' )
);
}

$settings['masthead_margin'] = array(
'type' => 'checkbox',
'label' => __( 'Masthead Bottom Margin', 'siteorigin-north' ),
Expand Down Expand Up @@ -1063,6 +1136,12 @@ function siteorigin_north_setup_page_setting_defaults( $defaults, $type, $id ){
$defaults['hide_masthead'] = false;
$defaults['hide_footer_widgets'] = false;

// Defaults for page only settings
if( $type == 'post' ) $post = get_post( $id );
if( ! empty( $post ) && $post->post_type == 'page' ) {
$defaults['featured_image'] = false;
}

// Specific default settings for different types
if( $type == 'template' && $id == 'home' ) {
$defaults['page_title'] = false;
Expand Down Expand Up @@ -1124,7 +1203,8 @@ function siteorigin_north_about_page( $about ){
get_template_directory_uri() . '/admin/about/video-3.jpg',
);

$about['premium_url'] = false;
$about['documentation_url'] = 'https://siteorigin.com/north-documentation/';
$about['review'] = true;

$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' );

Expand Down
Loading

0 comments on commit cd85752

Please sign in to comment.