diff --git a/README.md b/README.md index 497e9599..8a520e6b 100755 --- a/README.md +++ b/README.md @@ -75,6 +75,14 @@ Change Log View full release information on [Github](https://github.com/siteorigin/vantage/releases). +#### 1.5.4 +* Added header widget area. +* Applied read more setting to circle and grid archive loops. +* Added WPML config file. +* Added columns setting for circle icon loop archives. +* Always show mobile menu when mobile menu collapse set to 0. +* Disabled force PB styles fullwidth by default. + #### 1.5.3 * Update to latest settings framework. * Added notice for premium users downgraded to free version. diff --git a/content.php b/content.php index b6f1bda2..53d4ebe7 100755 --- a/content.php +++ b/content.php @@ -10,7 +10,7 @@
> - +
@@ -21,7 +21,7 @@
- +
@@ -43,7 +43,8 @@
- + + ' . esc_html( siteorigin_setting( 'blog_read_more' ) ) .'' : '' ); ?> '' ) ); ?>
diff --git a/functions.php b/functions.php index 6e62ba71..c88f9de0 100755 --- a/functions.php +++ b/functions.php @@ -120,6 +120,10 @@ function vantage_setup() { add_filter( 'infinite_scroll_settings', 'vantage_infinite_scroll_settings' ); + // Allowing use of shortcodes in taxonomy descriptions + add_filter( 'term_description', 'shortcode_unautop'); + add_filter( 'term_description', 'do_shortcode' ); + add_theme_support( 'infinite-scroll', array( 'container' => $container, 'footer' => 'page', @@ -241,6 +245,7 @@ function vantage_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'vantage' ), 'id' => 'sidebar-1', + 'description' => __( 'Displays to the right or left of the content area.', 'vantage' ), 'before_widget' => '', 'before_title' => '

', @@ -251,6 +256,7 @@ function vantage_widgets_init() { register_sidebar( array( 'name' => __( 'Shop', 'vantage' ), 'id' => 'shop', + 'description' => __( 'Displays on WooCommerce pages.', 'vantage' ), 'before_widget' => '', 'before_title' => '

', @@ -261,6 +267,7 @@ function vantage_widgets_init() { register_sidebar( array( 'name' => __( 'Footer', 'vantage' ), 'id' => 'sidebar-footer', + 'description' => __( 'Displays below the content area.', 'vantage' ), 'before_widget' => '', 'before_title' => '

', @@ -270,6 +277,17 @@ function vantage_widgets_init() { register_sidebar( array( 'name' => __( 'Header', 'vantage' ), 'id' => 'sidebar-header', + 'description' => __( 'Displays to the right of the logo.', 'vantage' ), + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) ); + + register_sidebar( array( + 'name' => __( 'Masthead', 'vantage' ), + 'id' => 'sidebar-masthead', + 'description' => __( 'Replaces the logo and header widget area.', 'vantage' ), 'before_widget' => '', 'before_title' => '

', @@ -287,17 +305,17 @@ function vantage_widgets_init() { function vantage_print_styles(){ if( !siteorigin_setting('layout_responsive') ) return; - // Create the footer widget CSS + // Create the footer and masthead widget CSS $sidebars_widgets = wp_get_sidebars_widgets(); - $count = isset($sidebars_widgets['sidebar-footer']) ? count($sidebars_widgets['sidebar-footer']) : 1; - $count = max($count,1); + $footer_count = isset( $sidebars_widgets['sidebar-footer'] ) ? count( $sidebars_widgets['sidebar-footer'] ) : 1; + $footer_count = max( $footer_count, 1 ); + $masthead_count = isset( $sidebars_widgets['sidebar-masthead'] ) ? count( $sidebars_widgets['sidebar-masthead'] ) : 1; + $masthead_count = max( $masthead_count, 1 ); ?> __('Mobile Menu', 'vantage'), 'priority' => 60, ), + 'vantage_buttons' => array( + 'title' => __('Buttons', 'vantage'), + 'priority' => 65, + ), 'vantage_widgets' => array( 'title' => __('Widgets', 'vantage'), 'priority' => 70, @@ -450,7 +454,67 @@ function vantage_customizer_init(){ 'property' => 'border-color', ), ), + 'vantage_buttons' => array( + 'button_background' => array( + 'type' => 'color', + 'title' => __('Button Background Color', 'vantage'), + 'default' => '#dfdfdf', + 'callback' => 'vantage_customizer_callback_button_background', + ), + 'button_color' => array( + 'type' => 'color', + 'title' => __('Button Color', 'vantage'), + 'default' => '#646464', + 'selector' => 'a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, .woocommerce #respond input#submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce input.button:disabled, .woocommerce input.button:disabled[disabled], .woocommerce input.button:disabled:hover, .woocommerce input.button:disabled[disabled]:hover, #infinite-handle span button', + 'property' => 'color', + ), + 'button_border' => array( + 'type' => 'color', + 'title' => __('Button Border Color', 'vantage'), + 'default' => '#c3c3c3', + 'callback' => 'vantage_customizer_callback_button_border', + ), + 'button_text_shadow' => array( + 'type' => 'checkbox', + 'title' => __('Button Text Shadow', 'vantage'), + 'default' => true, + 'callback' => 'vantage_customizer_callback_button_text_shadow', + ), + 'button_shadow' => array( + 'type' => 'checkbox', + 'title' => __('Button Shadow', 'vantage'), + 'default' => true, + 'callback' => 'vantage_customizer_callback_button_shadow', + ), + 'secondary_button_background' => array( + 'type' => 'color', + 'title' => __('Checkout Button Background Color', 'vantage'), + 'default' => '#00bcff', + 'callback' => 'vantage_customizer_callback_button_woo_background', + ), + 'secondary_button_color' => array( + 'type' => 'color', + 'title' => __('Checkout Button Color', 'vantage'), + 'default' => '#ffffff', + 'selector' => '.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit.alt:focus, .woocommerce a.button.alt:focus, .woocommerce button.button.alt:focus, .woocommerce input.button.alt:focus', + 'property' => 'color', + ), + 'secondary_button_border' => array( + 'type' => 'color', + 'title' => __('Checkout Button Border Color', 'vantage'), + 'default' => '#646464', + 'selector' => '.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover, .woocommerce #respond input#submit.alt:focus, .woocommerce a.button.alt:focus, .woocommerce button.button.alt:focus, .woocommerce input.button.alt:focus', + 'property' => 'border-color', + ), + ), 'vantage_widgets' => array( + 'masthead' => array( + 'type' => 'color', + 'title' => __(' Masthead Sidebar Widget Titles', 'vantage'), + 'default' => '#3b3b3b', + 'selector' => '#masthead-widgets .widget .widget-title', + 'property' => 'color', + ), 'circle_icon_bg' => array( 'type' => 'color', 'title' => __('Circle Icon Widget Background', 'vantage'), @@ -627,6 +691,10 @@ function vantage_customizer_init(){ ), ) ); + if( !class_exists( 'WooCommerce' ) ) { + unset( $settings['vantage_buttons']['secondary_button_background'], $settings['vantage_buttons']['secondary_button_color'], $settings['vantage_buttons']['secondary_button_border'] ); + } + // Include all the SiteOrigin customizer classes global $siteorigin_vantage_customizer; $siteorigin_vantage_customizer = new SiteOrigin_Customizer_Helper($settings, $sections, 'vantage'); @@ -755,6 +823,83 @@ function vantage_customizer_callback_heading_color($builder, $val, $setting){ } return $builder; } +/** + * @param SiteOrigin_Customizer_CSS_Builder $builder + * @param mixed $val + * @param array $setting + * + * @return SiteOrigin_Customizer_CSS_Builder + */ +function vantage_customizer_callback_button_background($builder, $val, $setting){ + if( $val ) { + $builder->add_css('a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, #infinite-handle span', 'background', $val); + $builder->add_css('a.button:hover, button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, .post-navigation a:hover, #image-navigation a:hover, article.post .more-link:hover, article.page .more-link:hover, .paging-navigation a:hover, .woocommerce #page-wrapper .button:hover, .woocommerce a.button:hover, .woocommerce .checkout-button:hover, .woocommerce input.button:hover, .woocommerce input.button:disabled:hover, .woocommerce input.button:disabled[disabled]:hover, #infinite-handle span:hover', 'background', $val); + $builder->add_css('a.button:hover, button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, .post-navigation a:hover, #image-navigation a:hover, article.post .more-link:hover, article.page .more-link:hover, .paging-navigation a:hover, .woocommerce #page-wrapper .button:hover, .woocommerce a.button:hover, .woocommerce .checkout-button:hover, .woocommerce input.button:hover, #infinite-handle span:hover', 'opacity', '0.75'); + $builder->add_css('a.button:focus, button:focus, html input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, .post-navigation a:focus, #image-navigation a:focus, article.post .more-link:focus, article.page .more-link:focus, .paging-navigation a:focus, .woocommerce #page-wrapper .button:focus, .woocommerce a.button:focus, .woocommerce .checkout-button:focus, .woocommerce input.button:focus, .woocommerce input.button:disabled:focus, .woocommerce input.button:disabled[disabled]:focus, #infinite-handle span:focus', 'background', $val); + $builder->add_css('a.button:focus, button:focus, html input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, .post-navigation a:focus, #image-navigation a:focus, article.post .more-link:focus, article.page .more-link:focus, .paging-navigation a:focus, .woocommerce #page-wrapper .button:focus, .woocommerce a.button:focus, .woocommerce .checkout-button:focus, .woocommerce input.button:focus, #infinite-handle span:focus', 'opacity', '0.75'); + } + return $builder; +} +/** + * @param SiteOrigin_Customizer_CSS_Builder $builder + * @param mixed $val + * @param array $setting + * + * @return SiteOrigin_Customizer_CSS_Builder + */ +function vantage_customizer_callback_button_border($builder, $val, $setting){ + if( $val ) { + $builder->add_css('a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, #infinite-handle span', 'border-color', $val); + $builder->add_css('a.button:hover, button:hover, html input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, .post-navigation a:hover, #image-navigation a:hover, article.post .more-link:hover, article.page .more-link:hover, .paging-navigation a:hover, .woocommerce #page-wrapper .button:hover, .woocommerce a.button:hover, .woocommerce .checkout-button:hover, .woocommerce input.button:hover, #infinite-handle span:hover', 'border-color', $val); + $builder->add_css('a.button:focus, button:focus, html input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, .post-navigation a:focus, #image-navigation a:focus, article.post .more-link:focus, article.page .more-link:focus, .paging-navigation a:focus, .woocommerce #page-wrapper .button:focus, .woocommerce a.button:focus, .woocommerce .checkout-button:focus, .woocommerce input.button:focus, #infinite-handle span:focus', 'border-color', $val); + } + return $builder; +} +/** + * @param SiteOrigin_Customizer_CSS_Builder $builder + * @param mixed $val + * @param array $setting + * + * @return SiteOrigin_Customizer_CSS_Builder + */ +function vantage_customizer_callback_button_text_shadow($builder, $val, $setting){ + if( !$val ) { + $builder->add_css('a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, #infinite-handle span button', 'text-shadow', 'none'); + } + return $builder; +} +/** + * @param SiteOrigin_Customizer_CSS_Builder $builder + * @param mixed $val + * @param array $setting + * + * @return SiteOrigin_Customizer_CSS_Builder + */ +function vantage_customizer_callback_button_shadow($builder, $val, $setting){ + if( !$val ) { + $builder->add_css('a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, #infinite-handle span', '-webkit-box-shadow', 'none'); + $builder->add_css('a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, #infinite-handle span', '-moz-box-shadow', 'none'); + $builder->add_css('a.button, button, html input[type="button"], input[type="reset"], input[type="submit"], .post-navigation a, #image-navigation a, article.post .more-link, article.page .more-link, .paging-navigation a, .woocommerce #page-wrapper .button, .woocommerce a.button, .woocommerce .checkout-button, .woocommerce input.button, .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, #infinite-handle span', 'box-shadow', 'none'); + } + return $builder; +} +/** + * @param SiteOrigin_Customizer_CSS_Builder $builder + * @param mixed $val + * @param array $setting + * + * @return SiteOrigin_Customizer_CSS_Builder + */ +function vantage_customizer_callback_button_woo_background($builder, $val, $setting){ + if( $val ) { + $builder->add_css('.woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt', 'background', $val); + $builder->add_css('.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover', 'background', $val); + $builder->add_css('.woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover', 'opacity', '0.75'); + $builder->add_css('.woocommerce #respond input#submit.alt:focus, .woocommerce a.button.alt:focus, .woocommerce button.button.alt:focus, .woocommerce input.button.alt:focus', 'background', $val); + $builder->add_css('.woocommerce #respond input#submit.alt:focus, .woocommerce a.button.alt:focus, .woocommerce button.button.alt:focus, .woocommerce input.button.alt:focus', 'opacity', '0.75'); + } + return $builder; +} /** * @param SiteOrigin_Customizer_CSS_Builder $builder * @param mixed $val diff --git a/inc/extras.php b/inc/extras.php index b893a562..d6b70d46 100755 --- a/inc/extras.php +++ b/inc/extras.php @@ -153,3 +153,13 @@ function vantage_footer_widget_style(){ } endif; add_action('wp_head', 'vantage_footer_widget_style', 15); + +if ( ! function_exists( 'vantage_excerpt_length' ) ) : +/* + * Filter the except length + */ +function vantage_excerpt_length( $length ) { + return siteorigin_setting( 'blog_excerpt_length' ); +} +endif; +add_filter( 'excerpt_length', 'vantage_excerpt_length', 10 ); diff --git a/inc/metaslider.php b/inc/metaslider.php index dad68f79..61256523 100644 --- a/inc/metaslider.php +++ b/inc/metaslider.php @@ -122,7 +122,7 @@ function vantage_metaslider_page_setting_save($post_id){ if( defined('DOING_AJAX') ) return; update_post_meta($post_id, 'vantage_metaslider_slider', $_POST['vantage_page_metaslider']); - $slider_stretch = filter_input(INPUT_POST, 'vantage_page_metaslider_stretch') == "on"; + $slider_stretch = !empty( $_POST['vantage_page_metaslider_stretch'] ); update_post_meta($post_id, 'vantage_metaslider_slider_stretch', $slider_stretch ); // If we're on the home page update the 'home_slider' theme setting as well. if ( $post_id == get_option( 'page_on_front' ) ) { diff --git a/inc/mobilenav/mobilenav.php b/inc/mobilenav/mobilenav.php index 00259266..f82e70be 100755 --- a/inc/mobilenav/mobilenav.php +++ b/inc/mobilenav/mobilenav.php @@ -84,12 +84,16 @@ function siteorigin_mobilenav_nav_filter($nav_menu, $args){ function siteorigin_mobilenav_nav_menu_css(){ $mobile_resolution = apply_filters('siteorigin_mobilenav_resolution', 480); - ?> - - + + + + __('Choose how to display posts on post archive when using default blog layout.', 'vantage'), )); + $settings->add_field('blog', 'excerpt_length', 'number', __('Excerpt Length', 'vantage'), array( + '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 Post Content setting.', 'vantage'), + 'sanitize_callback' => 'absint' + ) ); + $settings->add_field('blog', 'featured_image_type', 'select', __('Featured Image Type', 'vantage'), array( 'options' => array( 'large' => __('Large', 'vantage'), @@ -236,8 +241,27 @@ function vantage_theme_settings(){ 'sanitize_callback' => 'wp_kses_post', )); + $settings->add_field('blog', 'read_more_button', 'checkbox', __('Read More Button', 'vantage'), array( + 'label' => __('Display', 'vantage'), + 'description' => __('Show read more button when Post Excerpt is chosen.', 'vantage') + )); + $settings->add_field('blog', 'read_more', 'text', __('Read More Text', 'vantage'), array( - 'description' => __('The link displayed when post content is split using the "more" quicktag.', 'vantage') + 'description' => __('The link displayed when post content is split using the "more" quicktag or when the read more button is enabled.', 'vantage') + )); + + $settings->add_field('blog', 'circle_column_count', 'range', __('Circle Icon Archive Column Count', 'vantage'), array( + 'description' => __('The number of columns to display when the circle icon archive layout is set.', 'vantage'), + 'min' => 2, + 'max' => 6, + 'step' => 1 + )); + + $settings->add_field('blog', 'grid_column_count', 'range', __('Grid Archive Column Count', 'vantage'), array( + 'description' => __('The number of columns to display when the grid archive layout is set.', 'vantage'), + 'min' => 2, + 'max' => 6, + 'step' => 1 )); /** @@ -280,54 +304,58 @@ function vantage_theme_settings(){ * @since vantage 1.0 */ function vantage_theme_setting_defaults($defaults){ - $defaults['logo_image'] = false; - $defaults['logo_image_retina'] = false; + $defaults['logo_image'] = false; + $defaults['logo_image_retina'] = false; $defaults['logo_in_menu_constrain'] = true; - $defaults['logo_with_text'] = false; - $defaults['logo_header_text'] = __('Call me! Maybe?', 'vantage'); + $defaults['logo_with_text'] = false; + $defaults['logo_header_text'] = __('Call me! Maybe?', 'vantage'); $defaults['logo_no_widget_overlay'] = false; - $defaults['layout_responsive'] = true; - $defaults['layout_fitvids'] = true; - $defaults['layout_bound'] = 'full'; - $defaults['layout_masthead'] = ''; - $defaults['layout_footer'] = ''; - $defaults['layout_force_panels_full'] = true; + $defaults['layout_responsive'] = true; + $defaults['layout_fitvids'] = true; + $defaults['layout_bound'] = 'full'; + $defaults['layout_masthead'] = ''; + $defaults['layout_footer'] = ''; + $defaults['layout_force_panels_full'] = false; - $defaults['navigation_responsive_menu'] = true; + $defaults['navigation_responsive_menu'] = true; $defaults['navigation_responsive_menu_collapse'] = 480; - $defaults['navigation_responsive_menu_text'] = ''; - $defaults['navigation_responsive_menu_search'] = true; + $defaults['navigation_responsive_menu_text'] = ''; + $defaults['navigation_responsive_menu_search'] = true; - $defaults['navigation_use_sticky_menu'] = true; - $defaults['navigation_mobile_navigation'] = false; - $defaults['navigation_menu_search'] = true; + $defaults['navigation_use_sticky_menu'] = true; + $defaults['navigation_mobile_navigation'] = false; + $defaults['navigation_menu_search'] = true; $defaults['navigation_display_scroll_to_top'] = true; - $defaults['navigation_post_nav'] = true; - $defaults['navigation_home_icon'] = false; - $defaults['navigation_yoast_breadcrumbs'] = true; + $defaults['navigation_post_nav'] = true; + $defaults['navigation_home_icon'] = false; + $defaults['navigation_yoast_breadcrumbs'] = true; - $defaults['home_slider'] = 'demo'; + $defaults['home_slider'] = 'demo'; $defaults['home_slider_stretch'] = true; - $defaults['blog_archive_layout'] = 'blog'; - $defaults['blog_archive_content'] = 'full'; - $defaults['blog_featured_image'] = true; + $defaults['blog_archive_layout'] = 'blog'; + $defaults['blog_archive_content'] = 'full'; + $defaults['blog_excerpt_length'] = 55; + $defaults['blog_featured_image'] = true; $defaults['blog_featured_image_type'] = 'large'; - $defaults['blog_post_metadata'] = true; - $defaults['blog_post_date'] = true; - $defaults['blog_post_author'] = true; - $defaults['blog_post_comment_count'] = false; - $defaults['blog_post_categories'] = true; - $defaults['blog_post_tags'] = true; - $defaults['blog_author_box'] = false; - $defaults['blog_comment_author'] = ''; - $defaults['blog_read_more'] = __('Continue reading', 'vantage'); + $defaults['blog_post_metadata'] = true; + $defaults['blog_post_date'] = true; + $defaults['blog_post_author'] = true; + $defaults['blog_post_comment_count'] = false; + $defaults['blog_post_categories'] = true; + $defaults['blog_post_tags'] = true; + $defaults['blog_author_box'] = false; + $defaults['blog_comment_author'] = ''; + $defaults['blog_read_more_button'] = false; + $defaults['blog_read_more'] = __('Continue reading', 'vantage'); + $defaults['blog_circle_column_count'] = 3; + $defaults['blog_grid_column_count'] = 4; $defaults['social_ajax_comments'] = true; - $defaults['general_site_info_text'] = ''; - $defaults['general_attribution'] = true; + $defaults['general_site_info_text'] = ''; + $defaults['general_attribution'] = true; $defaults['general_js_enqueue_footer'] = false; return $defaults; @@ -360,14 +388,11 @@ function vantage_blog_layout_options(){ if( !function_exists('vantage_siteorigin_settings_home_slider_update_post_meta') ) : function vantage_siteorigin_settings_home_slider_update_post_meta( $new_value, $old_value ) { - - if( !isset( $new_value['home_slider'] ) || ! isset( $new_value['home_slider_stretch'] ) ) return $new_value; - //Update home slider post meta. $home_id = get_option( 'page_on_front' ); if ( $home_id != 0 ) { - update_post_meta( $home_id, 'vantage_metaslider_slider', $new_value['home_slider'] ); - update_post_meta( $home_id, 'vantage_metaslider_slider_stretch', $new_value['home_slider_stretch'] ); + update_post_meta( $home_id, 'vantage_metaslider_slider', siteorigin_setting( 'home_slider' ) ); + update_post_meta( $home_id, 'vantage_metaslider_slider_stretch', siteorigin_setting( 'home_slider_stretch' ) ); } return $new_value; } diff --git a/inc/template-tags.php b/inc/template-tags.php index 9966f1e1..79af4659 100755 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -511,7 +511,7 @@ function vantage_pagination($pages = '', $range = 2) { * Filter the read more link. */ function vantage_read_more_link() { - return '' . esc_html( siteorigin_setting('blog_read_more') ) .'' . esc_html( siteorigin_setting('blog_read_more') ) .''; } add_filter( 'the_content_more_link', 'vantage_read_more_link' ); endif; diff --git a/js/jquery.theme-main.js b/js/jquery.theme-main.js index 05ef5110..4e3431e2 100644 --- a/js/jquery.theme-main.js +++ b/js/jquery.theme-main.js @@ -210,7 +210,7 @@ jQuery(function($){ } ); // Hover for the menu widget in the header - $('#header-sidebar .widget_nav_menu') + $( '#header-sidebar .widget_nav_menu', '#masthead-widgets .widget_nav_menu' ) .on('mouseenter', 'ul.menu li', function(){ var $$ = $(this); var $ul = $$.find('> ul'); @@ -233,14 +233,14 @@ jQuery(function($){ }); // Aligning menu elements - var mhHeight = $('.masthead-logo-in-menu').height(), - menuItemHeight = $('.masthead-logo-in-menu .menu > .menu-item').outerHeight(), - logoHeight = $('.masthead-logo-in-menu .logo').outerHeight(); + var mhHeight = $( '.masthead-logo-in-menu' ).height(), + menuItemHeight = $( '.masthead-logo-in-menu .menu > .menu-item' ).outerHeight(), + logoHeight = $( '.masthead-logo-in-menu .logo' ).outerHeight(); if( mhHeight > menuItemHeight ){ - $('.masthead-logo-in-menu .menu > .menu-item').css('margin-top', (mhHeight - menuItemHeight) / 2); + $( '.masthead-logo-in-menu .menu > .menu-item' ).css( 'margin-top', ( mhHeight - menuItemHeight ) / 2); } if( mhHeight > logoHeight ){ - $('.masthead-logo-in-menu .logo').css('margin-top', (mhHeight - logoHeight) / 2); + $( '.masthead-logo-in-menu .logo' ).css( 'margin-top', ( mhHeight - logoHeight ) / 2); } $(document) diff --git a/less/loops.less b/less/loops.less index be7f97ec..e624827b 100644 --- a/less/loops.less +++ b/less/loops.less @@ -138,11 +138,30 @@ article { float: left; - width: 25%; padding: 0 15px; margin-bottom: 30px; .box-sizing(border-box); + .grid-loop-columns-2& { + width: 50%; + } + + .grid-loop-columns-3& { + width: 33.333%; + } + + .grid-loop-columns-4& { + width: 25%; + } + + .grid-loop-columns-5& { + width: 20%; + } + + .grid-loop-columns-6& { + width: 16.666%; + } + .grid-thumbnail { display: block; padding: 5px; @@ -181,8 +200,6 @@ font-size: 12px; color: #777777; line-height: 1.25em; - height: 1.25em * 2; - overflow: hidden; p { margin: 0; @@ -190,6 +207,31 @@ } border-bottom: none; + + a.more-button { + display: block; + text-decoration: none; + color: #3b3b3b; + font-weight: bold; + font-size: 13px; + margin-top: 10px; + + i { + display: inline-block; + width: 5px; + height: 8px; + margin-left: 3px; + + background: url(images/sprites/more-icon.png) no-repeat; + + @media screen and (-webkit-min-device-pixel-ratio: 2) { + & { + background: url(./images/retina/more-icon.png); + background-size: 5px 8px; + } + } + } + } } .clear { @@ -230,10 +272,29 @@ margin: 0 -20px; .widget_circleicon-widget { - width: 33.333%; float: left; clear: none; + .circleicon-loop-columns-2& { + width: 50%; + } + + .circleicon-loop-columns-3& { + width: 33.333%; + } + + .circleicon-loop-columns-4& { + width: 25%; + } + + .circleicon-loop-columns-5& { + width: 20%; + } + + .circleicon-loop-columns-6& { + width: 16.666%; + } + .circle-icon-box { padding-left: 20px; padding-right: 20px; @@ -243,4 +304,4 @@ .clear { clear:both; } -} \ No newline at end of file +} diff --git a/less/widgets.less b/less/widgets.less index 026761de..b2662e97 100644 --- a/less/widgets.less +++ b/less/widgets.less @@ -37,7 +37,7 @@ /* =Sidebar widget styling ----------------------------------------------- */ -#secondary, #footer-widgets { +#secondary, #footer-widgets, #masthead-widgets { .widget { margin-bottom: 40px; @@ -110,6 +110,29 @@ } } +#masthead-widgets { + .clearfix(); + + .widget { + .box-sizing(border-box); + margin-bottom: 0; + float: left; + padding-right: 25px; + + &:last-child { + padding-right: 0; + } + + .widget-title { + color: #3b3b3b; + font-size: 14px; + font-weight: bold; + margin-bottom: 20px; + } + + } +} + .vertical-footer #footer-widgets .widget { margin-bottom: 25px; width: 100%; @@ -614,7 +637,8 @@ /* =Custom Menu Widget in Header Area ----------------------------------------------- */ -#header-sidebar { +#header-sidebar, +#masthead-widgets { .widget_nav_menu { ul.menu { margin: 0; diff --git a/loops/loop-circleicon.php b/loops/loop-circleicon.php index 4d5ca71a..fa50987a 100644 --- a/loops/loop-circleicon.php +++ b/loops/loop-circleicon.php @@ -5,7 +5,7 @@ ?> -
+
!empty($image[0]) ? $image[0] : false, 'title' => get_the_title(), 'text' => get_the_excerpt(), + 'more' => siteorigin_setting( 'blog_read_more' ), 'more_url' => get_permalink(), 'all_linkable' => true, 'icon_position' => 'top', ) ); - if($i % 3 == 0) : ?>
- \ No newline at end of file + diff --git a/loops/loop-grid.php b/loops/loop-grid.php index 9287eb70..0ee9d42a 100644 --- a/loops/loop-grid.php +++ b/loops/loop-grid.php @@ -5,7 +5,7 @@ ?> -
+
> @@ -21,8 +21,9 @@

+ ' . esc_html( siteorigin_setting( 'blog_read_more' ) ) . ' ' : '' ); ?>
-
+
diff --git a/parts/masthead-logo-in-menu.php b/parts/masthead-logo-in-menu.php index 1f242eab..28d00b1c 100644 --- a/parts/masthead-logo-in-menu.php +++ b/parts/masthead-logo-in-menu.php @@ -8,4 +8,4 @@ -

\ No newline at end of file + diff --git a/parts/masthead.php b/parts/masthead.php index 79d46f0f..4feb672a 100644 --- a/parts/masthead.php +++ b/parts/masthead.php @@ -5,25 +5,37 @@ ?> \ No newline at end of file + diff --git a/style.css b/style.css index adf7d4d2..994d8027 100644 --- a/style.css +++ b/style.css @@ -852,6 +852,16 @@ body.responsive.layout-full #page-wrapper .full-container { margin-left: auto; margin-right: auto; } +/* Make widget layouts vertical below 640px */ +@media screen and (max-width: 640px) { + body.responsive #footer-widgets .widget, + body.responsive #masthead-widgets .widget { + width: auto; + float: none; + padding: 0; + padding-bottom: 25px; + } +} /* =Menu ----------------------------------------------- */ .main-navigation { @@ -2359,17 +2369,20 @@ body.layout-full { /* =Sidebar widget styling ----------------------------------------------- */ #secondary .widget, -#footer-widgets .widget { +#footer-widgets .widget, +#masthead-widgets .widget { margin-bottom: 40px; font-size: 13px; color: #5e5e5e; } #secondary .widget:last-child, -#footer-widgets .widget:last-child { +#footer-widgets .widget:last-child, +#masthead-widgets .widget:last-child { margin-bottom: 0; } #secondary .widget .widget-title, -#footer-widgets .widget .widget-title { +#footer-widgets .widget .widget-title, +#masthead-widgets .widget .widget-title { font-size: 15px; color: #3b3b3b; font-weight: bold; @@ -2377,38 +2390,50 @@ body.layout-full { } #secondary .widget ul, #footer-widgets .widget ul, +#masthead-widgets .widget ul, #secondary .widget ol, -#footer-widgets .widget ol { +#footer-widgets .widget ol, +#masthead-widgets .widget ol { list-style: none; padding: 0; margin: 0; } #secondary .widget ul ul, #footer-widgets .widget ul ul, +#masthead-widgets .widget ul ul, #secondary .widget ol ul, #footer-widgets .widget ol ul, +#masthead-widgets .widget ol ul, #secondary .widget ul ol, #footer-widgets .widget ul ol, +#masthead-widgets .widget ul ol, #secondary .widget ol ol, -#footer-widgets .widget ol ol { +#footer-widgets .widget ol ol, +#masthead-widgets .widget ol ol { margin-left: 1em; } #secondary .widget ul li, #footer-widgets .widget ul li, +#masthead-widgets .widget ul li, #secondary .widget ol li, -#footer-widgets .widget ol li { +#footer-widgets .widget ol li, +#masthead-widgets .widget ol li { padding-bottom: 7px; } #secondary .widget ul li a, #footer-widgets .widget ul li a, +#masthead-widgets .widget ul li a, #secondary .widget ol li a, -#footer-widgets .widget ol li a { +#footer-widgets .widget ol li a, +#masthead-widgets .widget ol li a { text-decoration: none; } #secondary .widget ul li ul.children, #footer-widgets .widget ul li ul.children, +#masthead-widgets .widget ul li ul.children, #secondary .widget ol li ul.children, -#footer-widgets .widget ol li ul.children { +#footer-widgets .widget ol li ul.children, +#masthead-widgets .widget ol li ul.children { padding-top: 7px; margin-bottom: -7px; } @@ -2449,6 +2474,36 @@ body.layout-full { font-weight: bold; margin-bottom: 20px; } +#masthead-widgets { + zoom: 1; +} +#masthead-widgets:before { + content: ''; + display: block; +} +#masthead-widgets:after { + content: ''; + display: table; + clear: both; +} +#masthead-widgets .widget { + -ms-box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin-bottom: 0; + float: left; + padding-right: 25px; +} +#masthead-widgets .widget:last-child { + padding-right: 0; +} +#masthead-widgets .widget .widget-title { + color: #3b3b3b; + font-size: 14px; + font-weight: bold; + margin-bottom: 20px; +} .vertical-footer #footer-widgets .widget { margin-bottom: 25px; width: 100%; @@ -2866,19 +2921,23 @@ body.layout-full { } /* =Custom Menu Widget in Header Area ----------------------------------------------- */ -#header-sidebar .widget_nav_menu ul.menu { +#header-sidebar .widget_nav_menu ul.menu, +#masthead-widgets .widget_nav_menu ul.menu { margin: 0; } -#header-sidebar .widget_nav_menu ul.menu > li { +#header-sidebar .widget_nav_menu ul.menu > li, +#masthead-widgets .widget_nav_menu ul.menu > li { list-style: none; display: inline-block; margin-right: 20px; position: relative; } -#header-sidebar .widget_nav_menu ul.menu > li:last-child { +#header-sidebar .widget_nav_menu ul.menu > li:last-child, +#masthead-widgets .widget_nav_menu ul.menu > li:last-child { margin-right: 0; } -#header-sidebar .widget_nav_menu ul.menu > li > a { +#header-sidebar .widget_nav_menu ul.menu > li > a, +#masthead-widgets .widget_nav_menu ul.menu > li > a { display: block; text-decoration: none; color: #555555; @@ -2886,7 +2945,8 @@ body.layout-full { padding: 0.75em 0; line-height: 1em; } -#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu { +#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu, +#masthead-widgets .widget_nav_menu ul.menu > li ul.sub-menu { display: none; position: absolute; margin: 0; @@ -2899,7 +2959,8 @@ body.layout-full { left: -10px; background: white; } -#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu li { +#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu li, +#masthead-widgets .widget_nav_menu ul.menu > li ul.sub-menu li { position: relative; list-style: none; width: 160px; @@ -2909,20 +2970,24 @@ body.layout-full { box-sizing: border-box; padding: 10px 10px; } -#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu li a { +#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu li a, +#masthead-widgets .widget_nav_menu ul.menu > li ul.sub-menu li a { display: block; text-decoration: none; color: #777777; } -#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu ul { +#header-sidebar .widget_nav_menu ul.menu > li ul.sub-menu ul, +#masthead-widgets .widget_nav_menu ul.menu > li ul.sub-menu ul { display: none; top: -1px; left: 160px; } -#header-sidebar .widget_nav_menu ul.menu > li > ul.sub-menu { +#header-sidebar .widget_nav_menu ul.menu > li > ul.sub-menu, +#masthead-widgets .widget_nav_menu ul.menu > li > ul.sub-menu { border-top: 2px solid #00bcff; } -#header-sidebar .widget_nav_menu ul.menu li:hover > ul.sub-menu { +#header-sidebar .widget_nav_menu ul.menu li:hover > ul.sub-menu, +#masthead-widgets .widget_nav_menu ul.menu li:hover > ul.sub-menu { display: block; } /* =Custom Menu Widget in Footer Area @@ -3146,7 +3211,6 @@ body.layout-full { } .vantage-grid-loop article { float: left; - width: 25%; padding: 0 15px; margin-bottom: 30px; -ms-box-sizing: border-box; @@ -3155,6 +3219,21 @@ body.layout-full { box-sizing: border-box; border-bottom: none; } +.grid-loop-columns-2.vantage-grid-loop article { + width: 50%; +} +.grid-loop-columns-3.vantage-grid-loop article { + width: 33.333%; +} +.grid-loop-columns-4.vantage-grid-loop article { + width: 25%; +} +.grid-loop-columns-5.vantage-grid-loop article { + width: 20%; +} +.grid-loop-columns-6.vantage-grid-loop article { + width: 16.666%; +} .vantage-grid-loop article .grid-thumbnail { display: block; padding: 5px; @@ -3196,12 +3275,31 @@ body.layout-full { font-size: 12px; color: #777777; line-height: 1.25em; - height: 2.5em; - overflow: hidden; } .vantage-grid-loop article .excerpt p { margin: 0; } +.vantage-grid-loop article a.more-button { + display: block; + text-decoration: none; + color: #3b3b3b; + font-weight: bold; + font-size: 13px; + margin-top: 10px; +} +.vantage-grid-loop article a.more-button i { + display: inline-block; + width: 5px; + height: 8px; + margin-left: 3px; + background: url(images/sprites/more-icon.png) no-repeat; +} +@media screen and (-webkit-min-device-pixel-ratio: 2) { + .vantage-grid-loop article a.more-button i { + background: url(images/retina/more-icon.png); + background-size: 5px 8px; + } +} .vantage-grid-loop .clear { clear: both; } @@ -3239,10 +3337,24 @@ body.layout-full { clear: both; } .vantage-circleicon-loop .widget_circleicon-widget { - width: 33.333%; float: left; clear: none; } +.circleicon-loop-columns-2.vantage-circleicon-loop .widget_circleicon-widget { + width: 50%; +} +.circleicon-loop-columns-3.vantage-circleicon-loop .widget_circleicon-widget { + width: 33.333%; +} +.circleicon-loop-columns-4.vantage-circleicon-loop .widget_circleicon-widget { + width: 25%; +} +.circleicon-loop-columns-5.vantage-circleicon-loop .widget_circleicon-widget { + width: 20%; +} +.circleicon-loop-columns-6.vantage-circleicon-loop .widget_circleicon-widget { + width: 16.666%; +} .vantage-circleicon-loop .widget_circleicon-widget .circle-icon-box { padding-left: 20px; padding-right: 20px; diff --git a/style.less b/style.less index b0f21cb3..c48d24dc 100644 --- a/style.less +++ b/style.less @@ -728,6 +728,21 @@ body.responsive { } } +/* Make widget layouts vertical below 640px */ +@media screen and (max-width: 640px) { + body.responsive { + #footer-widgets, + #masthead-widgets { + .widget { + width: auto; + float: none; + padding: 0; + padding-bottom: 25px; + } + } + } +} + /* =Menu ----------------------------------------------- */ diff --git a/wpml-config.xml b/wpml-config.xml new file mode 100644 index 00000000..cc7f185a --- /dev/null +++ b/wpml-config.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + +