HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/blog.tar
assets/banner.svg000064400000002013151541346030010032 0ustar00<svg fill="none" height="120" viewBox="0 0 120 120" width="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h120v120h-120z"/></clipPath><g clip-path="url(#a)"><path d="m0 0h120v120h-120z" fill="#1880b6"/><g stroke="#324249" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m45.9758 42.5242h46.0242v32.5h-46.0242z" fill="#86d7f2"/><g fill="#f0eed5"><path d="m45.9758 29h46.0242v5.4516h-46.0242z"/><path d="m71.9758 57.2016-17.9274 17.8226h37.9516v-5.4516l-12.4758-12.371c-1.992-2.0968-5.5565-2.0968-7.5484 0z"/><path d="m58.1371 58.7742c2.2581 0 4.0887-1.8306 4.0887-4.0887 0-2.2582-1.8306-4.0887-4.0887-4.0887-2.2582 0-4.0887 1.8305-4.0887 4.0887 0 2.2581 1.8305 4.0887 4.0887 4.0887z"/></g><path d="m45.9758 91.2742h5.4516"/><path d="m56.7742 91.2742h35.2258"/><path d="m45.9758 83.2016h21.7016"/><path d="m73.0242 83.2016h13.5242"/><path d="m29.7258 58.7742h5.4516"/><path d="m27 42.5242h10.7984v10.7984h-10.7984z" fill="#f0eed5"/></g></g></svg>assets/icon.svg000064400000001741151541346030007524 0ustar00<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m5.0791 11.45459h3.20508v1.5h-3.20508z"/><path d="m5.0791 14.71045h3.20508v1.5h-3.20508z"/><path d="m5.0791 17.68164h13.8418v1.5h-13.8418z"/><path d="m18.59961 8.36719h-7.83105c-.41406 0-.75.33594-.75.75v6.34326c0 .41406.33594.75.75.75h7.83105c.41406 0 .75-.33594.75-.75v-6.34326c0-.41406-.33594-.75-.75-.75zm-.75 1.5v2.5047l-.80566-.33429c-.16895-.06982-.3584-.07617-.53125-.0166l-1.25098.43018-1.65137-1.16602c-.26465-.18604-.61914-.18262-.87793.00977l-1.21387.89716v-2.32489h6.33105zm-6.33106 4.84326v-.65399l1.66895-1.23322 1.52246 1.07471c.19531.13818.44629.17383.67676.09668l1.34473-.4624 1.11816.46375v.71448h-6.33105z"/><path d="m20.1709 2.07959h-16.8418c-.68945 0-1.25.56055-1.25 1.25v17.34082c0 .68945.56055 1.25 1.25 1.25h17.3418c.68945 0 1.25-.56055 1.25-1.25v-16.84082c0-.96484-.78516-1.75-1.75-1.75zm0 1.5c.1377 0 .25.1123.25.25v1.76221h-16.8418v-2.01221zm-16.5918 16.84082v-13.32861h16.8418v13.32861z"/></svg>blog.php000064400000172140151541346030006207 0ustar00<?php
/*
Widget Name: Blog
Description: Showcase blog content in personalized list or grid layouts with flexible design and display settings.
Author: SiteOrigin
Author URI: https://siteorigin.com
Documentation: https://siteorigin.com/widgets-bundle/blog-widget/
*/

class SiteOrigin_Widget_Blog_Widget extends SiteOrigin_Widget {
	public function __construct() {
		parent::__construct(
			'sow-blog',
			__( 'SiteOrigin Blog', 'so-widgets-bundle' ),
			array(
				'description' => __( 'Showcase blog content in personalized list or grid layouts with flexible design and display settings.', 'so-widgets-bundle' ),
				'help' => 'https://siteorigin.com/widgets-bundle/blog-widget/',
				'instance_storage' => true,
				'panels_title' => false,
			),
			array(),
			false,
			plugin_dir_path( __FILE__ )
		);
	}

	public function initialize() {
		add_action( 'wp_loaded', array( $this, 'register_image_sizes' ) );
		$this->register_frontend_styles(
			array(
				array(
					'sow-blog',
					plugin_dir_url( __FILE__ ) . 'css/style.css',
				),
			)
		);
		$this->register_frontend_scripts(
			array(
				array(
					'sow-blog',
					plugin_dir_url( __FILE__ ) . 'js/blog' . SOW_BUNDLE_JS_SUFFIX . '.js',
					array( 'jquery' ),
					SOW_BUNDLE_VERSION
				),
			)
		);

		add_action( 'siteorigin_widgets_enqueue_frontend_scripts_sow-blog', array( $this, 'localize_scrollto' ), 10, 2 );

		add_action( 'wp_enqueue_scripts', array( $this, 'register_template_assets' ) );
		add_filter( 'siteorigin_widgets_blog_query', array( $this, 'portfolio_filter_posts' ), 8, 2 );
	}

	public function register_image_sizes() {
		$image_sizes = apply_filters( 'siteorigin_widgets_blog_image_sizes', array(
			'portfolio' => array(
				375,
				375,
			),
			'grid' => array(
				720,
				480,
			),
			'alternate' => array(
				950,
				630,
			),
		) );

		foreach ( $image_sizes as $k => $size ) {
			add_image_size( 'sow-blog-' . $k, (int) $size[0], (int) $size[1], true );
		}
	}

	public function get_widget_form() {
		$templates = apply_filters( 'siteorigin_widgets_blog_templates', json_decode( file_get_contents( plugin_dir_path( __FILE__ ) . 'data/templates.json' ), true ) );

		return $this->dynamic_preset_state_handler(
			'active_template',
			$templates,
			array(
				'title' => array(
					'type' => 'text',
					'label' => __( 'Title', 'so-widgets-bundle' ),
				),
				'template' => array(
					'type' => 'presets',
					'label' => __( 'Template', 'so-widgets-bundle' ),
					'default_preset' => 'standard',
					'options' => $templates,
					'state_emitter' => array(
						'callback' => 'select',
						'args' => array( 'active_template' ),
					),
				),
				'settings' => array(
					'type' => 'section',
					'label' => __( 'Settings', 'so-widgets-bundle' ),
					'hide' => true,
					'fields' => array(
						'columns' => array(
							'type' => 'number',
							'label' => __( 'Column Count', 'so-widgets-bundle' ),
						),
						'featured_image' => array(
							'type' => 'checkbox',
							'label' => __( 'Featured Image', 'so-widgets-bundle' ),
							'default' => true,
							'state_emitter' => array(
								'callback' => 'conditional',
								'args' => array(
									'featured_image[show]: val',
									'featured_image[hide]: ! val',
								),
							),
						),
						'featured_image_empty' => array(
							'type' => 'checkbox',
							'label' => __( 'Skip Post if No Featured Image', 'so-widgets-bundle' ),
							'default' => true,
							'state_handler' => array(
								'active_template[portfolio]' => array( 'slideDown' ),
								'_else[active_template]' => array( 'slideUp' ),
							),
						),
						'featured_image_size' => array(
							'type' => 'image-size',
							'label' => __( 'Featured Image Size', 'so-widgets-bundle' ),
							'custom_size' => true,
							'state_handler' => array(
								'featured_image[show]' => array( 'show' ),
								'featured_image[hide]' => array( 'hide' ),
							),
						),
						'tag' => array(
							'type' => 'select',
							'label' => __( 'Post Title HTML Tag', 'so-widgets-bundle' ),
							'default' => 'h2',
							'options' => array(
								'h1' => __( 'H1', 'so-widgets-bundle' ),
								'h2' => __( 'H2', 'so-widgets-bundle' ),
								'h3' => __( 'H3', 'so-widgets-bundle' ),
								'h4' => __( 'H4', 'so-widgets-bundle' ),
								'h5' => __( 'H5', 'so-widgets-bundle' ),
								'h6' => __( 'H6', 'so-widgets-bundle' ),
								'p' => __( 'Paragraph', 'so-widgets-bundle' ),
							)
						),
						'content' => array(
							'type' => 'select',
							'label' => __( 'Post Content ', 'so-widgets-bundle' ),
							'description' => __( 'Choose how to display your post content. Select Full Post Content if using the "more" quicktag.', 'so-widgets-bundle' ),
							'default' => 'full',
							'options' => array(
								'excerpt' => __( 'Post Excerpt', 'so-widgets-bundle' ),
								'full' => __( 'Full Post Content', 'so-widgets-bundle' ),
							),
							'state_emitter' => array(
								'callback' => 'select',
								'args' => array( 'content_type' ),
							),
							'state_handler' => array(
								'active_template[standard,masonry,grid,offset,alternate]' => array( 'slideDown' ),
								'_else[active_template]' => array( 'slideUp' ),
							),
						),
						'trim_manual_excerpt' => array(
							'type' => 'checkbox',
							'label' => __( 'Trim Manual Excerpt', 'so-widgets-bundle' ),
							'description' => __( 'Trim the excerpt length even if a manual excerpt has been added to the post.', 'so-widgets-bundle' ),
							'state_handler' => array(
								'content_type[excerpt]' => array( 'show' ),
								'_else[content_type]' => array( 'hide' ),
							),
						),
						'read_more' => array(
							'type' => 'checkbox',
							'label' => __( 'Post Excerpt Read More Link', 'so-widgets-bundle' ),
							'description' => __( 'Display the Read More link below the post excerpt.', 'so-widgets-bundle' ),
							'state_handler' => array(
								'content_type[excerpt]' => array( 'show' ),
								'_else[content_type]' => array( 'hide' ),
							),
						),
						'excerpt_length' => array(
							'type' => 'number',
							'label' => __( 'Excerpt Length', 'so-widgets-bundle' ),
							'default' => 55,
							'state_handler' => array(
								'content_type[excerpt]' => array( 'show' ),
								'_else[content_type]' => array( 'hide' ),
							),
						),
						'date' => array(
							'type' => 'checkbox',
							'label' => __( 'Post Date', 'so-widgets-bundle' ),
							'default' => true,
						),
						'author' => array(
							'type' => 'checkbox',
							'label' => __( 'Post Author', 'so-widgets-bundle' ),
							'default' => true,
						),
						'filter_categories' => array(
							'type' => 'checkbox',
							'label' => __( 'Filter Categories ', 'so-widgets-bundle' ),
							'state_emitter' => array(
								'callback' => 'conditional',
								'args' => array(
									'filter_categories[show]: val',
									'filter_categories[hide]: ! val',
								),
							),
						),
						'categories' => array(
							'type' => 'checkbox',
							'label' => __( 'Post Categories', 'so-widgets-bundle' ),
							'default' => true,
						),
						'tags' => array(
							'type' => 'checkbox',
							'label' => __( 'Post Tags', 'so-widgets-bundle' ),
							'default' => false,
						),
						'comment_count' => array(
							'type' => 'checkbox',
							'label' => __( 'Post Comment Count', 'so-widgets-bundle' ),
							'default' => true,
						),
					),
				),

				'design' => array(
					'type' => 'section',
					'label' => __( 'Design', 'so-widgets-bundle' ),
					'hide' => true,
					'fields' => array(
						'post' => array(
							'type' => 'section',
							'label' => __( 'Post', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'border' => array(
									'type' => 'color',
									'label' => __( 'Border Color', 'so-widgets-bundle' ),
									'default' => '#e6e6e6',
								),
								'background' => array(
									'type' => 'color',
									'label' => __( 'Background Color', 'so-widgets-bundle' ),
									'default' => '#fff',
								),
							),
						),
						'title' => array(
							'type' => 'section',
							'label' => __( 'Post Title', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '24px',
								),
								'color' => array(
									'type' => 'color',
									'label' => __( 'Color', 'so-widgets-bundle' ),
									'default' => '#2d2d2d',
								),
								'color_hover' => array(
									'type' => 'color',
									'label' => __( 'Hover Color', 'so-widgets-bundle' ),
									'default' => '#626262',
								),
							),
						),

						'meta' => array(
							'type' => 'section',
							'label' => __( 'Post Meta', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '13px',
								),
								'color' => array(
									'type' => 'color',
									'label' => __( 'Color', 'so-widgets-bundle' ),
									'default' => '#929292',
								),
								'color_hover' => array(
									'type' => 'color',
									'label' => __( 'Hover Color', 'so-widgets-bundle' ),
									'default' => '#f14e4e',
								),
							),
						),

						'offset_post_meta' => array(
							'type' => 'section',
							'label' => __( 'Offset Post Meta', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '13px',
								),
								'color' => array(
									'type' => 'color',
									'label' => __( 'Color', 'so-widgets-bundle' ),
									'default' => '#929292',
								),
								'link_color' => array(
									'type' => 'color',
									'label' => __( 'Link Color', 'so-widgets-bundle' ),
									'default' => '#2d2d2d',
								),
								'link_color_hover' => array(
									'type' => 'color',
									'label' => __( 'Link Color Hover', 'so-widgets-bundle' ),
									'default' => '#f14e4e',
								),
								'link_font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Link Font Size', 'so-widgets-bundle' ),
									'default' => '14px',
								),
							),
						),

						'overlay_post_category' => array(
							'type' => 'section',
							'label' => __( 'Overlay Post Category', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '11px',
								),
								'color' => array(
									'type' => 'color',
									'label' => __( 'Color', 'so-widgets-bundle' ),
									'default' => '#fff',
								),
								'color_hover' => array(
									'type' => 'color',
									'label' => __( 'Hover Color', 'so-widgets-bundle' ),
									'default' => '#fff',
								),
								'background' => array(
									'type' => 'color',
									'label' => __( 'Background', 'so-widgets-bundle' ),
									'default' => 'rgba(0,0,0,0.7)',
									'alpha' => true,
								),
								'background_hover' => array(
									'type' => 'color',
									'label' => __( 'Hover Background', 'so-widgets-bundle' ),
									'default' => 'rgba(0,0,0,0.75)',
									'alpha' => true,
								),
							),
						),

						'content' => array(
							'type' => 'section',
							'label' => __( 'Post Content', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '15px',
								),
								'color' => array(
									'type' => 'color',
									'label' => __( 'Color', 'so-widgets-bundle' ),
									'default' => '#626262',
								),
								'link_color' => array(
									'type' => 'color',
									'label' => __( 'Link Color', 'so-widgets-bundle' ),
									'default' => '#f14e4e',
								),
								'link_color_hover' => array(
									'type' => 'color',
									'label' => __( 'Link Hover Color', 'so-widgets-bundle' ),
									'default' => '#626262',
								),
							),
						),

						'filter_categories' => array(
							'type' => 'section',
							'label' => __( 'Filter Categories', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '11px',
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
								'text_transform' => array(
									'type' => 'checkbox',
									'label' => __( 'Capitalize Categories', 'so-widgets-bundle' ),
									'default' => true,
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
								'color' => array(
									'type' => 'color',
									'label' => __( 'Color', 'so-widgets-bundle' ),
									'default' => '#929292',
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
								'color_hover' => array(
									'type' => 'color',
									'label' => __( 'Hover Color', 'so-widgets-bundle' ),
									'default' => '#2d2d2d',
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
								'selected_border_color' => array(
									'type' => 'color',
									'label' => __( 'Selected Border Color', 'so-widgets-bundle' ),
									'default' => '#2d2d2d',
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
								'selected_border_thickness' => array(
									'type' => 'measurement',
									'label' => __( 'Selected Border Thickness', 'so-widgets-bundle' ),
									'default' => '2px',
									'state_handler' => array(
										'filter_categories[show]' => array( 'show' ),
										'filter_categories[hide]' => array( 'hide' ),
									),
								),
							),
						),

						'featured_image' => array(
							'type' => 'section',
							'label' => __( 'Featured Image', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'border_color' => array(
									'type' => 'color',
									'label' => __( 'Border Color', 'so-widgets-bundle' ),
									'default' => '#929292',
								),
								'hover_overlay_color' => array(
									'type' => 'color',
									'label' => __( 'Hover Overlay Color', 'so-widgets-bundle' ),
									'default' => 'rgba(255,255,255,0.9)',
									'alpha' => true,
								),
								'post_title_font' => array(
									'type' => 'font',
									'label' => __( 'Post Title Font', 'so-widgets-bundle' ),
								),
								'post_title_font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Post Title Font Size', 'so-widgets-bundle' ),
									'default' => '15px',
								),
								'post_title_color' => array(
									'type' => 'color',
									'label' => __( 'Post Title Color', 'so-widgets-bundle' ),
									'default' => '#2d2d2d',
								),
								'divider_border_color' => array(
									'type' => 'color',
									'label' => __( 'Divider Border Color', 'so-widgets-bundle' ),
									'default' => '#2d2d2d',
								),
								'divider_border_thickness' => array(
									'type' => 'measurement',
									'label' => __( 'Divider Border Thickness', 'so-widgets-bundle' ),
									'default' => '1px',
								),
								'divider_border_margin' => array(
									'type' => 'measurement',
									'label' => __( 'Divider Border Margin', 'so-widgets-bundle' ),
									'default' => '13px',
								),
								'post_meta_font' => array(
									'type' => 'font',
									'label' => __( 'Post Meta Font', 'so-widgets-bundle' ),
								),
								'post_meta_font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Post Meta Font Size', 'so-widgets-bundle' ),
									'default' => '11px',
								),
								'post_meta_color' => array(
									'type' => 'color',
									'label' => __( 'Post Meta Color', 'so-widgets-bundle' ),
									'default' => '#929292',
								),
							),
						),

						'pagination' => array(
							'type' => 'section',
							'label' => __( 'Pagination', 'so-widgets-bundle' ),
							'hide' => true,
							'fields' => array(
								'top_margin' => array(
									'type' => 'measurement',
									'label' => __( 'Top Margin', 'so-widgets-bundle' ),
									'default' => '30px',
								),
								'link_margin' => array(
									'type' => 'measurement',
									'label' => __( 'Link Margin', 'so-widgets-bundle' ),
									'default' => '8px',
								),
								'border_color' => array(
									'type' => 'color',
									'label' => __( 'Border Color', 'so-widgets-bundle' ),
									'default' => '#626262',
								),
								'border_color_hover' => array(
									'type' => 'color',
									'label' => __( 'Border Hover Color', 'so-widgets-bundle' ),
									'default' => '#f14e4e',
								),
								'background' => array(
									'type' => 'color',
									'label' => __( 'Background', 'so-widgets-bundle' ),
								),
								'background_hover' => array(
									'type' => 'color',
									'label' => __( 'Hover Background', 'so-widgets-bundle' ),
								),
								'border_radius' => array(
									'type' => 'slider',
									'label' => __( 'Border Radius', 'so-widgets-bundle' ),
									'max' => 50,
									'min' => 0,
									'step' => 1,
								),
								'font' => array(
									'type' => 'font',
									'label' => __( 'Font', 'so-widgets-bundle' ),
								),
								'font_size' => array(
									'type' => 'measurement',
									'label' => __( 'Font Size', 'so-widgets-bundle' ),
									'default' => '14px',
								),
								'link_color' => array(
									'type' => 'color',
									'label' => __( 'Link Color', 'so-widgets-bundle' ),
									'default' => '#626262',
								),
								'link_color_hover' => array(
									'type' => 'color',
									'label' => __( 'Link Hover Color', 'so-widgets-bundle' ),
									'default' => '#f14e4e',
								),
								'dots_color' => array(
									'type' => 'color',
									'label' => __( 'Dots Color', 'so-widgets-bundle' ),
									'default' => '#626262',
								),
								'width' => array(
									'type' => 'measurement',
									'label' => __( 'Width', 'so-widgets-bundle' ),
									'units' => array( 'px', 'vh', 'vw', 'vmin', 'vmax' ),
									'default' => '40px',
								),
								'height' => array(
									'type' => 'measurement',
									'label' => __( 'Height', 'so-widgets-bundle' ),
									'units' => array( 'px', 'vh', 'vw', 'vmin', 'vmax' ),
									'default' => '43px',
								),
							),
						),
					),
				),

				'posts' => array(
					'type' => 'posts',
					'label' => __( 'Posts Query', 'so-widgets-bundle' ),
					'hide' => true,
				),
			)
		);
	}

	public function get_settings_form() {
		return array(
			'responsive_breakpoint' => array(
				'type'        => 'measurement',
				'label'       => __( 'Responsive Breakpoint', 'so-widgets-bundle' ),
				'default'     => '780px',
				'description' => __( 'Device width, in pixels, to collapse into a mobile view.', 'so-widgets-bundle' ),
			),
			'scrollto' => array(
				'type'        => 'checkbox',
				'label'       => __( 'Scroll Top', 'so-widgets-bundle' ),
				'default'     => true,
				'description' => __( 'Scroll the user to the top of the Blog Widget after pagination links are clicked.', 'so-widgets-bundle' ),
			),
		);
	}

	public function register_template_assets() {
		wp_register_script( 'sow-blog-template-masonry', plugin_dir_url( __FILE__ ) . 'js/masonry' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery', 'jquery-isotope' ) );
		wp_register_script( 'sow-blog-template-portfolio', plugin_dir_url( __FILE__ ) . 'js/portfolio' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery', 'jquery-isotope' ) );

		wp_register_script( 'jquery-isotope', plugin_dir_url( SOW_BUNDLE_BASE_FILE ) . 'js/lib/isotope.pkgd' . SOW_BUNDLE_JS_SUFFIX . '.js', array( 'jquery' ), '3.0.4', true );

		do_action( 'siteorigin_widgets_blog_template_stylesheets' );
	}

	public function localize_scrollto( $instance, $widget ) {
		$global_settings = $this->get_global_settings();
		wp_localize_script(
			'sow-blog',
			'soBlogWidget',
			array(
				'scrollto' => ! empty( $global_settings['scrollto'] ),
				'scrollto_offset' => ( int ) apply_filters( 'siteorigin_widgets_blog_scrollto_offset', 90 ),
			)
		);

	}

	public function get_template_name( $instance ) {
		return 'base';
	}

	public function get_style_name( $instance ) {
		$template = empty( $instance['template'] ) ? 'standard' : $instance['template'];

		// If this template has any assets, load them.
		if ( wp_style_is( 'sow-blog-template-' . $template, 'registered' ) ) {
			wp_enqueue_style( 'sow-blog-template-' . $template );
		}

		if ( wp_script_is( 'sow-blog-template-' . $template, 'registered' ) ) {
			wp_enqueue_script( 'sow-blog-template-' . $template );
		}

		return $template;
	}

	public function get_less_variables( $instance ) {
		if ( empty( $instance ) ) {
			return array();
		}

		$less_vars = array(
			'responsive_breakpoint' => $this->get_global_settings( 'responsive_breakpoint' ),
			'categories' => ! empty( $instance['settings']['categories'] ) ? $instance['settings']['categories'] : false,
			'author' => ! empty( $instance['settings']['author'] ) ? $instance['settings']['author'] : false,
			'columns' => isset( $instance['settings']['columns'] ) && (int) $instance['settings']['columns'] > 0 ? (int) $instance['settings']['columns'] : 1,
		);

		if ( $instance['template'] == 'masonry' ) {
			$less_vars['column_width'] = 100 / $less_vars['columns'] - $less_vars['columns'] * 0.5 . '%';
		} elseif ( $instance['template'] == 'grid' && $less_vars['columns'] > 2 ) {
			$less_vars['column_spacing'] = $less_vars['columns'] * 0.5 . '%';
		}

		if ( $instance['template'] != 'portfolio' ) {
			// Post.
			$less_vars['post_border_color'] = ! empty( $instance['design']['post']['border'] ) ? $instance['design']['post']['border'] : '';
			$less_vars['post_background'] = ! empty( $instance['design']['post']['background'] ) ? $instance['design']['post']['background'] : '';

			// Post Title.
			if ( ! empty( $instance['design']['title']['font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['title']['font'] );
				$less_vars['title_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['title_font_style'] = $font['style'];
					$less_vars['title_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['title_font_size'] = ! empty( $instance['design']['title']['font_size'] ) ? $instance['design']['title']['font_size'] : '';
			$less_vars['title_color'] = ! empty( $instance['design']['title']['color'] ) ? $instance['design']['title']['color'] : '';
			$less_vars['title_color_hover'] = ! empty( $instance['design']['title']['color_hover'] ) ? $instance['design']['title']['color_hover'] : '';

			// Post Meta.
			if ( ! empty( $instance['design']['meta']['font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['meta']['font'] );
				$less_vars['meta_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['meta_font_style'] = $font['style'];
					$less_vars['meta_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['meta_font_size'] = ! empty( $instance['design']['meta']['font_size'] ) ? $instance['design']['meta']['font_size'] : '';
			$less_vars['meta_color'] = ! empty( $instance['design']['meta']['color'] ) ? $instance['design']['meta']['color'] : '';
			$less_vars['meta_color_hover'] = ! empty( $instance['design']['meta']['color_hover'] ) ? $instance['design']['meta']['color_hover'] : '';

			if ( $instance['template'] == 'offset' ) {
				// Offset Post Meta.
				if ( ! empty( $instance['design']['offset_post_meta']['font'] ) ) {
					$font = siteorigin_widget_get_font( $instance['design']['offset_post_meta']['font'] );
					$less_vars['offset_post_meta_font'] = $font['family'];

					if ( ! empty( $font['weight'] ) ) {
						$less_vars['offset_post_meta_font_style'] = $font['style'];
						$less_vars['offset_post_meta_font_weight'] = $font['weight_raw'];
					}
				}
				$less_vars['offset_post_meta_font_size'] = ! empty( $instance['design']['offset_post_meta']['font_size'] ) ? $instance['design']['offset_post_meta']['font_size'] : '';
				$less_vars['offset_post_meta_color'] = ! empty( $instance['design']['offset_post_meta']['color'] ) ? $instance['design']['offset_post_meta']['color'] : '';
				$less_vars['offset_post_meta_link_color'] = ! empty( $instance['design']['offset_post_meta']['link_color'] ) ? $instance['design']['offset_post_meta']['link_color'] : '';
				$less_vars['offset_post_meta_link_color_hover'] = ! empty( $instance['design']['offset_post_meta']['link_color_hover'] ) ? $instance['design']['offset_post_meta']['link_color_hover'] : '';
				$less_vars['offset_post_meta_link_font_size'] = ! empty( $instance['design']['offset_post_meta']['link_font_size'] ) ? $instance['design']['offset_post_meta']['link_font_size'] : '';
			}

			// Content.
			if ( ! empty( $instance['design']['content']['font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['content']['font'] );
				$less_vars['content_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['content_font_style'] = $font['style'];
					$less_vars['content_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['content_font_size'] = ! empty( $instance['design']['content']['font_size'] ) ? $instance['design']['content']['font_size'] : '';
			$less_vars['content_color'] = ! empty( $instance['design']['content']['color'] ) ? $instance['design']['content']['color'] : '';
			$less_vars['content_link'] = ! empty( $instance['design']['content']['link_color'] ) ? $instance['design']['content']['link_color'] : '';
			$less_vars['content_link_hover'] = ! empty( $instance['design']['content']['link_color_hover'] ) ? $instance['design']['content']['link_color_hover'] : '';
		} else {
			global $_wp_additional_image_sizes;
			if ( ! empty( $instance['settings']['featured_image_size'] ) ) {
				$less_vars['image_size'] = $instance['settings']['featured_image_size'] == 'custom_size' ? $instance['settings']['featured_image_size_width'] : $instance['settings']['featured_image_size'];
				if ( isset( $_wp_additional_image_sizes[ $less_vars['image_size'] ] ) ) {
					$less_vars['image_size'] = $_wp_additional_image_sizes[ $less_vars['image_size'] ]['width'] . 'px';
				}
			}

			$less_vars['column_width'] = number_format( 98.8333 / $less_vars['columns'], 2 ) . '%';

			if ( empty( $less_vars['categories'] ) && ! empty( $instance['settings']['filter_categories'] ) ) {
				$less_vars['categories'] = 1;
			}
		}

		// Pagination.
		$less_vars['pagination_top_margin'] = ! empty( $instance['design']['pagination']['top_margin'] ) ? $instance['design']['pagination']['top_margin'] : '';
		$less_vars['pagination_link_margin'] = ! empty( $instance['design']['pagination']['link_margin'] ) ? $instance['design']['pagination']['link_margin'] : '';
		$less_vars['pagination_link_margin_offset'] = ! empty( $instance['design']['pagination']['link_margin'] ) ? '-' . $instance['design']['pagination']['link_margin'] : '';
		$less_vars['pagination_border_color'] = ! empty( $instance['design']['pagination']['border_color'] ) ? $instance['design']['pagination']['border_color'] : '';
		$less_vars['pagination_border_color_hover'] = ! empty( $instance['design']['pagination']['border_color_hover'] ) ? $instance['design']['pagination']['border_color_hover'] : '';
		$less_vars['pagination_background'] = ! empty( $instance['design']['pagination']['background'] ) ? $instance['design']['pagination']['background'] : '';
		$less_vars['pagination_background_hover'] = ! empty( $instance['design']['pagination']['background_hover'] ) ? $instance['design']['pagination']['background_hover'] : '';
		$less_vars['pagination_border_radius'] = ! empty( $instance['design']['pagination']['border_radius'] ) ? $instance['design']['pagination']['border_radius'] . 'px' : '';

		if ( ! empty( $instance['design']['pagination']['font'] ) ) {
			$font = siteorigin_widget_get_font( $instance['design']['pagination']['font'] );
			$less_vars['pagination_font'] = $font['family'];

			if ( ! empty( $font['weight'] ) ) {
				$less_vars['pagination_font_style'] = $font['style'];
				$less_vars['pagination_font_weight'] = $font['weight_raw'];
			}
		}
		$less_vars['pagination_font_size'] = ! empty( $instance['design']['pagination']['font_size'] ) ? $instance['design']['pagination']['font_size'] : '';
		$less_vars['pagination_link_color'] = ! empty( $instance['design']['pagination']['link_color'] ) ? $instance['design']['pagination']['link_color'] : '';
		$less_vars['pagination_link_color_hover'] = ! empty( $instance['design']['pagination']['link_color_hover'] ) ? $instance['design']['pagination']['link_color_hover'] : '';
		$less_vars['pagination_dots_color'] = ! empty( $instance['design']['pagination']['dots_color'] ) ? $instance['design']['pagination']['dots_color'] : '';
		$less_vars['pagination_width'] = ! empty( $instance['design']['pagination']['width'] ) ? $instance['design']['pagination']['width'] : '';
		$less_vars['pagination_height'] = ! empty( $instance['design']['pagination']['height'] ) ? $instance['design']['pagination']['height'] : '';

		if ( $instance['template'] == 'masonry' ) {
			// Overlay Post Category.
			if ( ! empty( $instance['design']['overlay_post_category']['font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['overlay_post_category']['font'] );
				$less_vars['overlay_post_category_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['overlay_post_category_font_style'] = $font['style'];
					$less_vars['overlay_post_category_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['overlay_post_category_font_size'] = ! empty( $instance['design']['overlay_post_category']['font_size'] ) ? $instance['design']['overlay_post_category']['font_size'] : '';
			$less_vars['overlay_post_category_color'] = ! empty( $instance['design']['overlay_post_category']['color'] ) ? $instance['design']['overlay_post_category']['color'] : '';
			$less_vars['overlay_post_category_color_hover'] = ! empty( $instance['design']['overlay_post_category']['color_hover'] ) ? $instance['design']['overlay_post_category']['color_hover'] : '';

			$less_vars['overlay_post_category_background'] = ! empty( $instance['design']['overlay_post_category']['background'] ) ? $instance['design']['overlay_post_category']['background'] : 'rgba(0,0,0,0.80)';

			$less_vars['overlay_post_category_background_hover'] = ! empty( $instance['design']['overlay_post_category']['background_hover'] ) ? $instance['design']['overlay_post_category']['background_hover'] : 'rgba(0,0,0,0.75)';
		}

		if ( $instance['template'] == 'portfolio' ) {
			// Filter Categories.
			if ( ! empty( $instance['design']['filter_categories']['font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['filter_categories']['font'] );
				$less_vars['filter_categories_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['filter_categories_font_style'] = $font['style'];
					$less_vars['filter_categories_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['filter_categories_font_size'] = ! empty( $instance['design']['filter_categories']['font_size'] ) ? $instance['design']['filter_categories']['font_size'] : '';
			$less_vars['filter_categories_color'] = ! empty( $instance['design']['filter_categories']['color'] ) ? $instance['design']['filter_categories']['color'] : '';
			$less_vars['filter_categories_color_hover'] = ! empty( $instance['design']['filter_categories']['color_hover'] ) ? $instance['design']['filter_categories']['color_hover'] : '';
			$less_vars['filter_categories_text_transform'] = ! empty( $instance['design']['filter_categories']['text_transform'] ) ? 'uppercase' : '';
			$less_vars['filter_categories_selected_border_color'] = ! empty( $instance['design']['filter_categories']['selected_border_color'] ) ? $instance['design']['filter_categories']['selected_border_color'] : '';
			$less_vars['filter_categories_selected_border_thickness'] = ! empty( $instance['design']['filter_categories']['selected_border_thickness'] ) ? $instance['design']['filter_categories']['selected_border_thickness'] : '';

			// Featured Images.
			$less_vars['featured_image_border_color'] = ! empty( $instance['design']['featured_image']['border_color'] ) ? $instance['design']['featured_image']['border_color'] : '';
			$less_vars['featured_image_hover_overlay_color'] = ! empty( $instance['design']['featured_image']['hover_overlay_color'] ) ? $instance['design']['featured_image']['hover_overlay_color'] : '';


			if ( ! empty( $instance['design']['featured_image']['post_title_font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['featured_image']['post_title_font'] );
				$less_vars['featured_image_post_title_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['featured_image_post_title_font_style'] = $font['style'];
					$less_vars['featured_image_post_title_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['featured_image_post_title_font_size'] = ! empty( $instance['design']['featured_image']['post_title_font_size'] ) ? $instance['design']['featured_image']['post_title_font_size'] : '';
			$less_vars['featured_image_post_title_color'] = ! empty( $instance['design']['featured_image']['post_title_color'] ) ? $instance['design']['featured_image']['post_title_color'] : '';
			$less_vars['featured_image_divider_border_color'] = ! empty( $instance['design']['featured_image']['divider_border_color'] ) ? $instance['design']['featured_image']['divider_border_color'] : '';
			$less_vars['featured_image_divider_border_thickness'] = ! empty( $instance['design']['featured_image']['divider_border_thickness'] ) ? $instance['design']['featured_image']['divider_border_thickness'] : '';
			$less_vars['featured_image_divider_border_margin'] = ! empty( $instance['design']['featured_image']['divider_border_margin'] ) ? $instance['design']['featured_image']['divider_border_margin'] : '';

			if ( ! empty( $instance['design']['featured_image']['post_meta_font'] ) ) {
				$font = siteorigin_widget_get_font( $instance['design']['featured_image']['post_meta_font'] );
				$less_vars['featured_image_post_meta_font'] = $font['family'];

				if ( ! empty( $font['weight'] ) ) {
					$less_vars['featured_image_post_meta_font_style'] = $font['style'];
					$less_vars['featured_image_post_meta_font_weight'] = $font['weight_raw'];
				}
			}
			$less_vars['featured_image_post_meta_font_size'] = ! empty( $instance['design']['featured_image']['post_meta_font_size'] ) ? $instance['design']['featured_image']['post_meta_font_size'] : '';
			$less_vars['featured_image_post_meta_color'] = ! empty( $instance['design']['featured_image']['post_meta_color'] ) ? $instance['design']['featured_image']['post_meta_color'] : '';
		}

		return $less_vars;
	}

	/**
	 * Get terms for a given taxonomy.
	 *
	 * This method retrieves the terms for a given taxonomy. If a post ID is provided,
	 * it retrieves the terms associated with that post. Otherwise, it retrieves
	 * all terms for the taxonomy.
	 *
	 * @param string $taxonomy The taxonomy to retrieve terms for.
	 * @param int $post_id The post ID. Defaults to 0.
	 * @param bool $error_check Whether to check for errors. Defaults to true.
	 *
	 * @return array|false The terms for the taxonomy or false if an error occurs.
	 */
	public static function get_terms_for_taxonomy( $taxonomy, $post_id = 0, $error_check = true ) {
		$terms = $post_id ? get_the_terms( (int) $post_id, $taxonomy ) : get_terms( $taxonomy );

		set_query_var( 'siteorigin_widgets_portfolio_taxonomy', $taxonomy );

		if ( $error_check && ( empty( $terms ) || is_wp_error( $terms ) ) ) {
			return false;
		}

		return $terms;
	}

	/**
	 * Legacy method to get the terms for the portfolio.
	 *
	 * This method retrieves the terms for a given query. It is the legacy version of
	 * `get_query_terms`, and ideally should be replaced with the newer method.
	 *
	 * @param array $instance The instance settings.
	 * @param int $post_id Optional. The post ID to retrieve terms for. Default is 0.
	 *
	 * @return array The terms for the query.
	 */
	public static function portfolio_get_terms( $instance, $post_id = 0 ) {
		$query = wp_parse_args( siteorigin_widget_post_selector_process_query( $instance['posts'] ) );

		return self::get_query_terms( $instance, $query, $post_id );
	}

	/**
	 * Get query terms for the instance.
	 *
	 * This method retrieves the terms for the portfolio based on the instance
	 * and post ID. It checks for developer-set terms, Jetpack Portfolio terms,
	 * and other possible taxonomies. If no terms are found, it uses a fallback term.
	 * The fallback term is `category`. The fallback term can be filtered using
	 * the `siteorigin_widgets_blog_portfolio_fallback_term` filter.
	 *
	* @param array $instance The instance configuration array.
	* @param array $query The Blog query that'll be used to retrieve the posts.
	* @param int $post_id Optional. The post ID to retrieve terms for. Default is 0.
	 *
	 * @return array|false The terms for the portfolio, or false if no terms are found.
	 */
	public static function get_query_terms( $instance, $query, $post_id = 0 ) {
		$terms = array();

		$query['post_type'] = ! empty( $query['post_type'] ) ? $query['post_type'] : array( 'post' );

		if ( ! empty( $post_id ) ) {

			// Check if a developer has set terms for this post type.
			$taxonomy = apply_filters(
				'siteorigin_widgets_blog_portfolio_taxonomy',
				'',
				$instance,
				$query['post_type']
			);
			if ( ! empty( $taxonomy ) && is_array( $taxonomy ) ) {
				return $taxonomy;
			}
		}

		// Has user set terms? If so, let's use that if a post id hasn't be set.
		// Individual posts should use their terms, rather than one set in the widget.
		if (
			empty( $post_id ) &&
			! empty( $query ) &&
			! empty( $query['tax_query'] )
		 ) {
			foreach ( $query['tax_query'] as $tax ) {
				if ( isset( $tax['terms'] ) ) {
					$terms[] = $tax['terms'];
				}
			}

			// We need to set a taxonomy so we can hide/show terms.
			// Let's use the first term's taxonomy.
			if (
				! empty( $terms ) &&
				! empty( $query['tax_query'][1] ) &&
				! empty( $query['tax_query'][1]['taxonomy'] )
			) {
				set_query_var( 'siteorigin_widgets_portfolio_taxonomy',
					$query['tax_query'][1]['taxonomy']
				);
			}

			return $terms;
		}

		// Check for Jetpack Portfolio terms.
		if (
			post_type_exists( 'jetpack-portfolio' ) &&
			$query['post_type'] === 'jetpack-portfolio'
		) {
			$terms = self::get_terms_for_taxonomy(
				'jetpack-portfolio-type',
				$post_id
			);

			if ( $terms ) {
				return $terms;
			}
		}

		// Check for terms in other possible taxonomies.
		$possible_tax = get_object_taxonomies( $query['post_type'] );
		foreach ( $possible_tax as $tax ) {
			$terms = self::get_terms_for_taxonomy( $tax, $post_id );

			if ( $terms ) {
				return $terms;
			}
		}

		// Use fallback term if no terms are found.
		$fallback = apply_filters(
			'siteorigin_widgets_blog_portfolio_fallback_term',
			'category',
			$instance
		);

		return self::get_terms_for_taxonomy( $fallback, $post_id, false );
	}

	/**
	 * Retrieves a list of terms for the given instance for the purpose of filtering.
	 *
	 * This method retrieves the terms for the given instance and posts. It first finds
	 * the query terms, ensures that the terms are valid and (optionally) filters out any
	 * terms that aren't associated with the posts.
	 *
	 * @param array $instance The instance configuration array.
	 * @param WP_Query $posts The query object containing the posts.
	 * @param array $query The query array.
	 *
	 * @return array The filtered terms for the instance and posts.
	 */
	private static function get_filter_categories( $instance, $posts, $query ) {
		$terms = self::get_query_terms( $instance, $query );

		if ( ! apply_filters(
			'siteorigin_widgets_blog_portfolio_ensure_valid_terms',
			true
		) ) {
			return $terms;
		}

		if ( empty( $terms ) || is_wp_error( $terms ) ) {
			return $terms;
		}

		$taxonomy = apply_filters(
			'siteorigin_widgets_blog_portfolio_taxonomy_filter',
			get_query_var( 'siteorigin_widgets_portfolio_taxonomy' )
		);

		// Get all of the terms for the posts.
		$all_terms = array();
		foreach ( $posts->posts as $post ) {
			$post_terms = wp_get_post_terms( $post->ID, $taxonomy );

			foreach ( $post_terms as $post_term ) {
				$all_terms[] = $post_term->slug;
			}
		}

		$all_terms = array_unique( $all_terms );

		// Filter out any terms that aren't in the posts.
		$filtered_terms = array();
		foreach ( $terms as $term ) {
			$slug = is_object( $term ) ? $term->slug : $term;

			if ( in_array( $slug, $all_terms ) ) {
				$filtered_terms[] = $term;
			}
		}

		return $filtered_terms;
	}

	public function modify_instance( $instance ) {
		if ( empty( $instance ) || ! is_array( $instance ) ) {
			return array();
		}

		if ( ! isset( $instance['settings'] ) || ! is_array( $instance['settings'] ) ) {
			$instance['settings'] = array();
		}

		if ( ! isset( $instance['settings']['tag'] ) ) {
			$instance['settings']['tag'] = 'h2';
		}

		if ( empty( $instance['template'] ) ) {
			$instance['template'] = 'standard';
		} else {
			$custom_template = apply_filters( 'siteorigin_widgets_blog_custom_template', false, $instance );

			if ( ! $custom_template ) {
				// Ensure selected template is valid.
				switch ( $instance['template'] ) {
					case 'alternate':
					case 'grid':
					case 'masonry':
					case 'offset':
					case 'portfolio':
					case 'standard':
						break;
					default:
						$instance['template'] = 'standard';
						break;
				}
			}
		}

		// Add featured image default for instances of the Blog widget created prior to the Featured Image Size setting.
		if ( ! isset( $instance['settings']['featured_image_size'] ) ) {
			if ( $instance['template'] == 'grid' || $instance['template'] == 'alternate' || $instance['template'] == 'portfolio' ) {
				$instance['settings']['featured_image_size'] = 'sow-blog-' . $instance['template'];
			} else {
				$instance['settings']['featured_image_size'] = 'full';
			}
			$instance['settings']['featured_image_size_width'] = 0;
			$instance['settings']['featured_image_size_height'] = 0;
		}


		// Migrate old opacity fields.
		if ( ! empty( $instance['design']['featured_image']['hover_overlay_opacity'] ) ) {
			$color = ! empty( $instance['design']['featured_image']['hover_overlay_color'] ) ? $instance['design']['featured_image']['hover_overlay_color'] : '#fff';
			$color = ltrim( $instance['design']['featured_image']['hover_overlay_color'], '#' );
			$rgb = array_map( 'hexdec', str_split( $color , strlen( $color ) == 6 ? 2 : 1 ) );
			$opacity = ! empty( $instance['design']['featured_image']['hover_overlay_opacity'] ) ? $instance['design']['featured_image']['hover_overlay_opacity'] : 0.9;
			$instance['design']['featured_image']['hover_overlay_color'] = "rgba( $rgb[0], $rgb[1], $rgb[2], $opacity )";
			unset( $instance['design']['featured_image']['hover_overlay_opacity'] );
		}

		if ( ! empty( $instance['design']['overlay_post_category']['background_opacity'] ) ) {
			$color = ! empty( $instance['design']['overlay_post_category']['background'] ) ? $instance['design']['overlay_post_category']['background'] : '#000';
			$color = ltrim( $color, '#' );
			$rgb = array_map( 'hexdec', str_split( $color , strlen( $color ) == 6 ? 2 : 1 ) );
			$opacity = $instance['design']['overlay_post_category']['background_opacity'];
			$instance['design']['overlay_post_category']['background'] = "rgba( $rgb[0], $rgb[1], $rgb[2], $opacity )";
			unset( $instance['design']['overlay_post_category']['background_opacity'] );
		}

		if ( ! empty( $instance['design']['overlay_post_category']['background_opacity_hover'] ) ) {
			$color = ! empty( $instance['design']['overlay_post_category']['background_hover'] ) ? $instance['design']['overlay_post_category']['background_hover'] : '#000';
			$color = ltrim( $color, '#' );
			$rgb = array_map( 'hexdec', str_split( $color , strlen( $color ) == 6 ? 2 : 1 ) );
			$opacity = $instance['design']['overlay_post_category']['background_opacity_hover'];
			$instance['design']['overlay_post_category']['background_hover'] = "rgba( $rgb[0], $rgb[1], $rgb[2], $opacity )";
			unset( $instance['design']['overlay_post_category']['background_opacity_hover'] );
		}

		$instance['paged_id'] = $this->get_style_hash( $instance );

		// Ensure Filter Categories is disabled for templates that
		// don't support it.
		if (
			$instance['template'] !== 'portfolio' &&
			$instance['template'] !== 'masonry'
		) {
			$instance['settings']['filter_categories'] = false;
		}

		// Prevent WAF PHP function block.
		if (
			is_array( $instance['settings'] ) &&
			isset( $instance['settings']['date_format'] )
		) {
			$instance['settings']['date_output_format'] = $instance['settings']['date_format'];
			unset( $instance['settings']['date_format'] );
		}

		return $instance;
	}

	public static function get_template( $instance ) {
		$template_file = plugin_dir_path( __FILE__ ) . 'tpl/' . sanitize_file_name( $instance['template'] ) . '.php';

		$override_file = apply_filters(
			'siteorigin_widgets_blog_template_file',
			$template_file,
			$instance
		);

		// If any of the below checks fail, return the default template.
		// Otherwise, allow the override.
		if ( empty( $override_file ) ) {
			return $template_file;
		}

		// File name must end in '-sow-blog.php'
		if ( substr( $override_file, -13 ) != '-sow-blog.php' ) {
			return $template_file;
		}

		if ( ! file_exists( $override_file ) ) {
			return $template_file;
		}

		return $override_file;
	}

	public function get_template_variables( $instance, $args ) {
		if ( ! isset( $instance['paged'] ) ) {
			$instance['paged'] = ! empty( $_GET['sow-' . $instance['paged_id'] ] ) ? (int) $_GET['sow-' . $instance['paged_id'] ] : 1;
		}
		$query = wp_parse_args(
			array(
				'paged' => $instance['paged'],
			),
			siteorigin_widget_post_selector_process_query( $instance['posts'] )
		);

		// If the user has set an offset, account for it after the first page.
		if ( isset( $query['offset'] ) && $instance['paged'] > 1 ) {
			$query['offset'] = $offset = ( $query['paged'] - 1 ) * $query['posts_per_page'] + $query['offset'];
		}

		if ( $instance['template'] == 'portfolio' && ! empty( $instance['featured_image_fallback'] ) ) {
			// The portfolio template relies on each post having an image so exclude any posts that don't.
			$query['meta_query'] = array(
				array(
					'key' => '_thumbnail_id',
					'compare' => 'EXISTS',
				),
			);
		}

		// Add template specific settings.
		$template_settings = array(
			'date_output_format' => isset( $instance['settings']['date_output_format'] ) ? $instance['settings']['date_output_format'] : null,
		);

		if ( $instance['template'] == 'offset' ) {
			if ( $instance['settings']['date'] ) {
				if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
					$template_settings['time_string'] = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
				} else {
					$template_settings['time_string'] = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
				}
			}
		}

		$posts = new WP_Query( apply_filters( 'siteorigin_widgets_blog_query', $query, $instance ) );

		$template_settings['filter_categories'] = ! empty( $instance['settings']['filter_categories'] );
		if ( $template_settings['filter_categories'] === true ) {
			$template_settings['terms'] = self::get_filter_categories( $instance, $posts, $query );
		}

		// Add the current template to the settings array to allow for easier referencing.
		$instance['settings']['template'] = $instance['template'];

		return array(
			'title' => $instance['title'],
			'settings' => $instance['settings'],
			'template_settings' => $template_settings,
			'posts' => $posts,
			'query' => $query,
		);
	}

	public function portfolio_filter_posts( $query, $instance ) {
		if (
			$instance['template'] == 'portfolio' &&
			! empty( $instance['settings']['featured_image_empty'] ) &&
			empty( $instance['settings']['featured_image_fallback'] )
		) {
			$query['meta_query'] = array(
				array(
					'key' => '_thumbnail_id',
					'compare' => 'EXISTS',
				),
			);
		}

		return $query;
	}

	public static function post_meta( $settings ) {
		ob_start();
		if ( is_sticky() ) {
			?>
			<span class="sow-featured-post"><?php esc_html_e( 'Sticky', 'so-widgets-bundle' ); ?></span>
			<?php
		}

		if ( $settings['date'] ) {
			$date_output_format = isset( $settings['date_output_format'] ) ? $settings['date_output_format'] : null;
			?>
			<span class="sow-entry-date">
				<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">
					<time class="published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>">
						<?php echo esc_html( get_the_date( $date_output_format ) ); ?>
					</time>
					<time class="updated" datetime="<?php echo esc_attr( get_the_modified_date( 'c' ) ); ?>">
						<?php echo esc_html( get_the_modified_date() ); ?>
					</time>
				</a>
			</span>
		<?php } ?>

		<?php if ( $settings['author'] ) { ?>
			<span class="sow-entry-author-link byline">
				<?php if ( function_exists( 'coauthors_posts_links' ) ) { ?>
					<?php coauthors_posts_links(); ?>
				<?php } else { ?>
					<span class="sow-author author vcard">
						<a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
							<?php echo esc_html( get_the_author() ); ?>
						</a>
					</span>
				<?php } ?>
			</span>
		<?php } ?>

		<?php
		if ( $settings['categories'] && has_category() ) {

			$categories = get_the_terms( get_the_ID(), 'category' );
			$categories = apply_filters(
				'siteorigin_widgets_blog_filter_categories_output',
				$categories,
				$settings
			);

			if ( ! empty( $categories ) ) {
				echo '<span class="sow-entry-categories">';
				$category_links = [];

				foreach ( $categories as $category ) {
					$category_link = get_category_link( $category->term_id );
					$category_links[] = '<a href="' . esc_url( $category_link ) . '">' .
						esc_html__( $category->name, 'so-widgets-bundle' ) . '</a>';
				}

				/* translators: used between list items, there is a space after the comma */
				echo implode( esc_html__( ', ', 'so-widgets-bundle' ), $category_links );
				echo '</span>';
			}
		}

		if ( ! empty( $settings['tags'] ) && has_tag() ) {
			?>
			<span class="sow-entry-tags">
				<?php the_tags( '' ); ?>
			</span>
		<?php } ?>

		<?php if ( comments_open() && $settings['comment_count'] ) { ?>
			<span class="sow-entry-comments">
				<?php
			comments_popup_link(
				esc_html__( 'Leave a comment', 'so-widgets-bundle' ),
				esc_html__( 'One Comment', 'so-widgets-bundle' ),
				esc_html__( '% Comments', 'so-widgets-bundle' )
			);
			?>
			</span>
		<?php
		}

		$post_meta = ob_get_clean();

		echo apply_filters( 'siteorigin_widgets_blog_post_meta', $post_meta, $settings );
	}

	static public function post_featured_image( $settings, $categories = false, $size = 'full' ) {
		if ( $settings['featured_image'] ) {
			if ( ! has_post_thumbnail() && ! empty( $settings['featured_image_fallback'] ) ) {
				$featured_image = apply_filters( 'siteorigin_widgets_blog_featured_image_fallback', false, $settings );
			}
			if ( has_post_thumbnail() || ! empty( $featured_image ) ) {
				ob_start();
				?>
				<div class="sow-entry-thumbnail">
					<?php if ( $categories && $settings['categories'] && has_category() ) { ?>
						<div class="sow-thumbnail-meta">
							<?php echo get_the_category_list(); ?>
						</div>
					<?php } ?>
					<a href="<?php echo esc_url( get_the_permalink() ); ?>">
						<?php
						if ( has_post_thumbnail() ) {
							if ( ! empty( $settings['featured_image_size'] ) ) {
								$size = $settings['featured_image_size'] == 'custom_size' ? array( $settings['featured_image_size_width'], $settings['featured_image_size_height'] ) : $settings['featured_image_size'];
							} else {
								// Check if this template has a different default image size.
								if (
									$size == 'full' &&
									has_image_size( 'sow-blog-' . $settings['template'] )
								) {
									$size = 'sow-blog-' . $settings['template'];
								}
							}
							the_post_thumbnail( $size );
						} elseif( ! empty( $featured_image ) ) {
							echo $featured_image;
						}
						?>
					</a>
				</div>
				<?php
				echo apply_filters( 'siteorigin_widgets_blog_featured_image_markup', ob_get_clean(), $settings, $categories = false, $size = 'full' );
			}
		}
	}

	static public function generate_post_title( $settings ) {
		$tag = siteorigin_widget_valid_tag(
			$settings['tag'],
			'h2'
		);

		the_title(
			'<' . $tag  . ' class="sow-entry-title" style="margin: 0 0 5px;"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">',
			'</a></' . $tag  . '>'
		);
	}

	public function override_read_more( $settings, $setup = true ) {
		// Read More Override.
		if ( $settings['content'] == 'full' && apply_filters( 'siteorigin_widgets_blog_full_content_read_more', true ) ) {
			if ( $setup ) {
				set_query_var( 'siteorigin_blog_read_more', ! empty( $settings['read_more_text'] ) ? $settings['read_more_text'] : __( 'Continue reading', 'so-widgets-bundle' ) );
				add_filter( 'the_content_more_link', array( $this, 'alter_read_more_link' ) );
			} else {
				remove_filter( 'the_content_more_link', array( $this, 'alter_read_more_link' ) );
			}
		}

		if ( $setup ) {
			set_query_var(
				'siteorigin_blog_excerpt_length',
				apply_filters( 'siteorigin_widgets_blog_excerpt_length', isset( $settings['excerpt_length'] ) ? $settings['excerpt_length'] : 55 )
			);
			add_filter( 'excerpt_length', array( $this, 'alter_excerpt_length' ), 1000 );
			add_filter( 'excerpt_more', array( $this, 'alter_excerpt_more_indicator' ) );
		} else {
			remove_filter( 'excerpt_length', array( $this, 'alter_excerpt_length' ), 1000 );
			remove_filter( 'the_content_more_link', array( $this, 'alter_excerpt_more_indicator' ) );
		}
	}

	public function alter_read_more_link( $link ) {
		return '<a class="sow-more-link" href="' . esc_url( get_permalink() ) . '"> ' . esc_html( get_query_var( 'siteorigin_blog_read_more' ) ) . '<span class="sow-more-link-arrow">&rarr;</span></a>';
	}

	public function alter_excerpt_more_indicator( $indicator ) {
		return apply_filters( 'siteorigin_widgets_blog_excerpt_trim', get_query_var( 'siteorigin_blog_excerpt_length' ) == 0 ? '' : '...' );
	}

	public function alter_excerpt_length( $length = 55 ) {
		return get_query_var( 'siteorigin_blog_excerpt_length' );
	}

	public static function output_content( $settings, $space_above = 20 ) {
		if ( apply_filters( 'siteorigin_widgets_blog_show_content', true, $settings ) ) {
			?>
			<div
				class="sow-entry-content"
				style="margin-top: <?php echo (int) $space_above; ?>px;"
			>
				<?php
				if ( $settings['content'] == 'full' ) {
					the_content();
				} else {
					self::generate_excerpt( $settings );
				}
				?>
			</div>
			<?php
		}
	}

	public static function content_wrapper( $settings, $styles = array() ) {
		$styles = apply_filters( 'siteorigin_widgets_blog_content_wrapper_styles', $styles, $settings );
		?>
		<div class="sow-blog-content-wrapper"
		<?php
		if ( ! empty( $styles ) ) {
			echo ' style="';
			foreach ( $styles as $key => $val ) {
				echo siteorigin_sanitize_attribute_key( $key ) . ': ' . esc_attr( $val ) . ';';
			}
			echo '"';
		}
		?>>
		<?php
	}

	/**
	 * Checks if a read more link should be displayed.
	 *
	 * Determines display by checking:
	 * 1. Read more enabled in widget settings.
	 * 2. Filter to override default behavior (true).
	 * 3. Post has manual excerpt or auto-excerpt exceeds word limit
	 *
	 * @param array $settings The current Blog widget settings.
	 * @return bool True if read more link should be displayed, false otherwise.
	 */
	private static function maybe_add_read_more( $settings ): bool {
		if ( ! $settings['read_more'] ) {
			return false;
		}

		if ( apply_filters( 'siteorigin_widgets_blog_always_add_read_more', false ) ) {
			return true;
		}

		return has_excerpt() ||
			count( preg_split( '~[^\p{L}\p{N}\']+~u', get_the_excerpt() ) ) >= get_query_var( 'siteorigin_blog_excerpt_length' );
	}

	public static function generate_excerpt( $settings ) {
		$length = get_query_var( 'siteorigin_blog_excerpt_length' );
		$excerpt = get_the_excerpt();

		if (
			! has_excerpt() ||
			! empty( $settings['trim_manual_excerpt'] )
		) {
			$excerpt = wp_trim_words(
				$excerpt,
				$length,
				apply_filters( 'siteorigin_widgets_blog_excerpt_trim', '...' )
			);
		}

		if ( self::maybe_add_read_more( $settings ) ) {
			$read_more_text = ! empty( $settings['read_more_text'] ) ?
				$settings['read_more_text'] :
				__( 'Continue reading', 'so-widgets-bundle' );

			$read_more_text = '<a class="sow-more-link more-link excerpt" href="' .
				esc_url( get_permalink() ) . '">' .
				esc_html( $read_more_text ) .
				'<span class="sow-more-link-arrow">&rarr;</span></a>';

			$excerpt .= $read_more_text;
		}

		echo '<p>' . wp_kses_post( $excerpt ) . '</p>';
	}

	public function paginate_links( $settings, $posts, $instance ) {
		$addon_active = class_exists( 'SiteOrigin_Premium' ) && ! empty( SiteOrigin_Premium::single()->get_active_addons()['plugin/blog'] );

		if ( $addon_active ) {
			$pagination_markup = apply_filters( 'siteorigin_widgets_blog_pagination_markup', false, $settings, $posts, $instance );
		}

		if ( empty( $pagination_markup ) ) {
			if ( $addon_active && isset( $settings['pagination_reload'] ) && $settings['pagination_reload'] == 'ajax' ) {
				$current = 99999;
				$show_all_prev_next = true;
			} else {
				$current = max( 1, $posts->query['paged'] );
				$show_all_prev_next = false;
			}

			wp_reset_query();

			$pagination_markup = paginate_links( array(
				'format' => '?sow-' . $instance['paged_id'] . '=%#%',
				'total' => $posts->max_num_pages,
				'current' => $current,
				'show_all' => $show_all_prev_next,
				'prev_next' => ! $show_all_prev_next,
				'prev_text' => is_rtl() ? '&rarr;' : '&larr;',
				'next_text' => is_rtl() ? '&larr;' : '&rarr;',
				// Prevent multiple Blog widgets from "stacking" pagination.
				'base' => get_the_permalink() . '%_%',
			) );
		}

		if (
			! empty( $pagination_markup ) &&
			$settings['pagination'] != 'disabled'
		) {
			// To resolve a potential issue with the Block Editor, we need to override REST URLs with the actual permalink.
			if (
				defined( 'REST_REQUEST' ) &&
				strpos( $pagination_markup, 'sowb/v1/widgets/previews' ) !== false
			) {
				$pagination_markup = str_replace(
					// All non-standard pagination won't have the full URL present so what we replace changes.
					strpos( $pagination_markup, rest_url() ) !== false ? esc_url_raw( rest_url() ) . 'sowb/v1/widgets/previews/' : '/wp-json/sowb/v1/widgets/previews',
					get_the_permalink(),
					$pagination_markup
				);
			}
			?>
			<nav class="sow-post-navigation">
				<h3 class="screen-reader-text"><?php esc_html_e( 'Pagination', 'so-widgets-bundle' ); ?></h3>
				<div class="sow-nav-links<?php if ( ! empty( $settings['pagination'] ) ) {
					echo ' sow-post-pagination-' . esc_attr( $settings['pagination'] );
				} ?>">
					<?php echo $pagination_markup; ?>
				</div>
			</nav>
			<?php
		}
	}

	public function total_pages( $posts ) {
		// WP Query's max_num_pages doesn't account for offset, so let's do that now.
		if (
			! empty( $posts->query['offset'] ) &&
			is_numeric( $posts->query['offset'] )
		) {
			return ceil( max( $posts->found_posts - $posts->query['offset'], 1 ) / $posts->query['posts_per_page'] );
		} else {
			return $posts->max_num_pages;
		}
	}

	public function get_form_teaser() {
		if ( class_exists( 'SiteOrigin_Premium' ) ) {
			return false;
		}

		return array(
			sprintf(
				__( 'Get more pagination themes and Ajax reloading with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
				'<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/blog" target="_blank" rel="noopener noreferrer">',
				'</a>'
			),
			sprintf(
				__( 'Adjust the post Read More link text and choose a custom post date format with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
				'<a href="https://siteorigin.com/downloads/premium/?featured_addon=plugin/blog" target="_blank" rel="noopener noreferrer">',
				'</a>'
			),
		);
	}
}

siteorigin_widget_register( 'sow-blog', __FILE__, 'SiteOrigin_Widget_Blog_Widget' );
css/style.css000064400000012252151541346030007212 0ustar00.sow-blog.sow-blog-layout-alternate .sow-blog-posts,.sow-blog.sow-blog-layout-masonry .sow-blog-posts{display:flex;flex-wrap:wrap;justify-content:space-between}.sow-blog .sow-blog-posts article{border:none;box-sizing:border-box;margin:0;padding:0}.sow-blog article .sow-entry-thumbnail a{display:block;line-height:0;text-align:center}.sow-blog article .sow-entry-header .sow-entry-title{font-weight:600;line-height:normal}.sow-blog article .sow-entry-header .sow-entry-title a{text-decoration:none}.sow-blog article .sow-entry-meta{line-height:normal}.sow-blog article .sow-entry-meta span a{text-decoration:none}.sow-blog article .sow-entry-meta span:not(:last-child)::after{content:"\007c";padding:0 2px;vertical-align:top}.sow-blog article .sow-entry-meta .updated:not(.published){display:none}.sow-blog article .sow-blog-content-wrapper{overflow:auto}.sow-blog article p:last-child,.sow-blog article p:only-child{margin-bottom:0}.sow-blog article .sow-more-link{background:none;border:none;box-shadow:none;display:block;float:none;font-size:1em;font-weight:normal;margin-top:26px;padding:0;text-decoration:none}.sow-blog article .sow-more-link:focus,.sow-blog article .sow-more-link:hover{text-decoration:none}.sow-blog article .sow-more-link .more-text{display:block}.sow-blog article .sow-more-link .more-text span{display:inline-block;padding-left:3px;vertical-align:middle}.sow-blog article .sow-more-link .sow-more-link-arrow{display:inline-block;font-size:1.1em;padding-bottom:2px;padding-left:4px;vertical-align:middle}.sow-blog .sow-post-navigation{clear:both;width:100%}.sow-blog .sow-post-navigation .sow-nav-links{display:flex;flex-direction:row;justify-content:center}.sow-blog .sow-post-navigation .page-numbers,.sow-blog .sow-post-navigation .current{display:inline-block;line-height:normal;margin-bottom:4px;text-decoration:none;transition:.3s;vertical-align:top}.sow-blog .sow-post-navigation .page-numbers .prev,.sow-blog .sow-post-navigation .page-numbers .next{line-height:1;padding-left:14px;padding-right:14px}.sow-blog .sow-post-navigation .dots{border:none;line-height:normal;transition:.3s;vertical-align:top}.sow-blog .sow-post-navigation .dots:hover{background:none;color:inherit}.sow-blog.sow-blog-layout-standard article .sow-entry-thumbnail{margin-bottom:-1px}.sow-blog.sow-blog-layout-grid article .sow-entry-thumbnail{margin:-1px}.sow-blog.sow-blog-layout-offset article .sow-blog-entry-offset div{margin-bottom:12px}.sow-blog.sow-blog-layout-offset article .sow-blog-entry-offset span{display:block;line-height:normal;margin-bottom:2px}.sow-blog.sow-blog-layout-offset article .sow-entry-thumbnail{margin-bottom:-1px}.sow-blog.sow-blog-layout-alternate article .sow-entry-thumbnail a{margin:-1px}.sow-blog.sow-blog-layout-alternate article .sow-blog-content-wrapper{box-sizing:border-box;padding:25px 30px 33px}.sow-blog.sow-blog-layout-alternate article .sow-blog-content-wrapper .sow-entry-content p:last-of-type{margin:0}.sow-blog.sow-blog-layout-alternate article .sow-blog-content-wrapper .sow-entry-content p:only-of-type{margin:0}.sow-blog.sow-blog-layout-alternate article.sow-no-thumbnail .sow-blog-content-wrapper{width:100%}.sow-blog.sow-blog-layout-masonry .sow-blog-posts{clear:both;margin:0 -15px}.sow-blog.sow-blog-layout-masonry .sow-blog-posts article{margin-bottom:30px;padding:0 15px}.sow-blog.sow-blog-layout-masonry .sow-blog-posts article .sow-entry-thumbnail{margin-bottom:-1px;position:relative}.sow-blog.sow-blog-layout-portfolio .sow-blog-posts{margin-left:-1.1667%;margin-right:-1.1667%}.sow-blog.sow-blog-layout-portfolio .sow-portfolio-filter-terms button{cursor:pointer}.sow-blog.sow-blog-layout-portfolio .sow-portfolio-filter-terms:hover,.sow-blog.sow-blog-layout-portfolio .sow-portfolio-filter-terms:focus{background:transparent}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail{align-items:center;display:flex;justify-content:center;position:relative;text-align:center}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail:hover .sow-entry-content{opacity:1;visibility:visible}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-link-overlay{bottom:0;left:0;position:absolute;right:0;text-decoration:none;top:0;z-index:1}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-overlay{height:100%;position:absolute;transition:.3s;width:100%;z-index:0}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-content{align-items:center;display:flex;flex-direction:column;opacity:0;position:absolute;transition:.3s;visibility:hidden;width:100%}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-content .sow-entry-title{line-height:normal;text-align:center;width:100%}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-content .sow-entry-title a{position:relative;z-index:2}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-content .sow-entry-divider{width:30px}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .sow-entry-content .sow-entry-project-type{display:block;text-align:center;width:100%}.sow-blog.sow-blog-layout-portfolio article .sow-entry-thumbnail .wp-post-image{border:0;box-shadow:none;height:auto;max-width:100%;width:100%}data/templates.json000064400000020061151541346030010347 0ustar00{
	"standard": {
		"label": "Standard",
		"values": {
			"settings": {
				"featured_image": true,
				"content": "full",
				"read_more": true,
				"excerpt_length": "55",
				"date": true,
				"author": true,
				"categories": true,
				"tags": false,
				"comment_count": true,
				"featured_image_size": "full",
				"filter_categories": false
			},
			"design": {
				"post":{
					"background": "#fff",
					"border": "#e6e6e6"
				},
				"title": {
					"color": "#2d2d2d",
					"color_hover": "#626262",
					"font": "default",
					"font_size": "24"
				},
				"meta":{
					"color": "#929292",
					"color_hover": "#f14e4e",
					"font": "default",
					"font_size": "13"
				},
				"content":{
					"color": "#626262",
					"color_hover": "",
					"font": "default",
					"font_size": "15",
					"link_color": "#f14e4e",
					"link_color_hover": "#626262"
				},
				"pagination":{
					"background": "",
					"background_hover": "",
					"border_color": "#626262",
					"border_color_hover": "#f14e4e",
					"border_radius": "0",
					"font": "default",
					"font_size": "14",
					"height":"43",
					"link_color": "#626262",
					"link_color_hover": "#f14e4e",
					"dots_color": "#626262",
					"link_margin": "8",
					"top_margin": "30",
					"width": "44"
				}
			}
		}
	},
	"grid": {
		"label": "Grid",
		"values": {
			"settings": {
				"columns": 2,
				"featured_image": true,
				"content": "excerpt",
				"read_more": true,
				"excerpt_length": "55",
				"date": true,
				"author": true,
				"categories": true,
				"tags": false,
				"comment_count": true,
				"featured_image_size": "sow-blog-grid",
				"filter_categories": false
			},
			"design": {
				"post":{
					"background": "#fff",
					"border": "#e6e6e6"
				},
				"title": {
					"color": "#2d2d2d",
					"color_hover": "#626262",
					"font": "default",
					"font_size": "16"
				},
				"meta":{
					"color": "#929292",
					"color_hover": "#f14e4e",
					"font": "default",
					"font_size": "13"
				},
				"content":{
					"color": "#626262",
					"color_hover": "",
					"font": "default",
					"font_size": "14",
					"link_color": "#f14e4e",
					"link_color_hover": "#626262"
				},
				"pagination":{
					"background": "",
					"background_hover": "",
					"border_color": "#626262",
					"border_color_hover": "#f14e4e",
					"border_radius": "0",
					"font": "default",
					"font_size": "14",
					"height":"43",
					"link_color": "#626262",
					"link_color_hover": "#f14e4e",
					"dots_color": "#626262",
					"link_margin": "8",
					"top_margin": "30",
					"width": "44"
				}
			}
		}
	},
	"offset": {
		"label": "Offset",
		"values": {
			"settings": {
				"featured_image": true,
				"content": "full",
				"read_more": true,
				"excerpt_length": "55",
				"date": true,
				"author": true,
				"categories": true,
				"tags": false,
				"comment_count": true,
				"featured_image_size": "full",
				"filter_categories": false
			},
			"design": {
				"post":{
					"border": "#e6e6e6",
					"background": "#fff"
				},
				"title": {
					"color": "#2d2d2d",
					"color_hover": "#626262",
					"font": "default",
					"font_size": "24"
				},
				"meta":{
					"color": "#929292",
					"color_hover": "#f14e4e",
					"font": "default",
					"font_size": "13"
				},
				"offset_post_meta":{
					"color": "#929292",
					"font": "default",
					"font_size": "13",
					"link_color": "#2d2d2d",
					"link_color_hover": "#f14e4e",
					"link_font_size": "14"
				},
				"content":{
					"color": "#626262",
					"color_hover": "",
					"font": "default",
					"font_size": "15",
					"link_color": "#f14e4e",
					"link_color_hover": "#626262"
				},
				"pagination":{
					"background": "",
					"background_hover": "",
					"border_color": "#626262",
					"border_color_hover": "#f14e4e",
					"border_radius": "0",
					"font": "default",
					"font_size": "14",
					"height":"43",
					"link_color": "#626262",
					"link_color_hover": "#f14e4e",
					"dots_color": "#626262",
					"link_margin": "8",
					"top_margin": "30",
					"width": "44"
				}
			}
		}
	},
	"alternate": {
		"label": "Alternate",
		"values": {
			"settings": {
				"featured_image": true,
				"content": "excerpt",
				"read_more": true,
				"excerpt_length": "55",
				"date": true,
				"author": true,
				"categories": true,
				"tags": false,
				"comment_count": true,
				"featured_image_size": "sow-blog-alternate",
				"filter_categories": false
			},
			"design": {
				"post":{
					"border": "#e6e6e6",
					"background": "#fff"
				},
				"title": {
					"font": "default",
					"font_size": "16",
					"color": "#2d2d2d",
					"color_hover": "#626262"
				},
				"meta":{
					"color": "#929292",
					"color_hover": "#f14e4e",
					"font": "default",
					"font_size": "13"
				},
				"content":{
					"color": "#626262",
					"color_hover": "",
					"font": "default",
					"font_size": "15",
					"link_color": "#f14e4e",
					"link_color_hover": "#626262"
				},
				"pagination":{
					"background": "",
					"background_hover": "",
					"border_color": "#626262",
					"border_color_hover": "#f14e4e",
					"border_radius": "0",
					"font": "default",
					"font_size": "14",
					"height":"43",
					"link_color": "#626262",
					"link_color_hover": "#f14e4e",
					"dots_color": "#626262",
					"link_margin": "8",
					"top_margin": "30",
					"width": "44"
				}
			}
		}
	},
	"masonry": {
		"label": "Masonry",
		"values": {
			"settings": {
				"columns": 2,
				"featured_image": true,
				"content": "excerpt",
				"read_more": true,
				"excerpt_length": "55",
				"date": true,
				"author": true,
				"categories": true,
				"tags": false,
				"comment_count": true,
				"featured_image_size": "full",
				"filter_categories": false
			},
			"design": {
				"post":{
					"border": "#e6e6e6",
					"background": "#fff"
				},
				"title": {
					"color": "#2d2d2d",
					"color_hover": "#626262",
					"font": "default",
					"font_size": "16"
				},
				"meta":{
					"color": "#929292",
					"color_hover": "#f14e4e",
					"font": "default",
					"font_size": "13"
				},
				"overlay_post_category": {
					"background": "rgba(0,0,0,0.7)",
					"background_hover": "rgba(0,0,0,0.75)",
					"color": "#fff",
					"color_hover": "#fff",
					"font": "default",
					"font_size": "11"
				},
				"content":{
					"color": "#626262",
					"color_hover": "",
					"font": "default",
					"font_size": "14",
					"link_color": "#f14e4e",
					"link_color_hover": "#626262"
				},
				"pagination":{
					"background": "",
					"background_hover": "",
					"border_color": "#626262",
					"border_color_hover": "#f14e4e",
					"border_radius": "0",
					"font": "default",
					"font_size": "14",
					"height":"43",
					"link_color": "#626262",
					"link_color_hover": "#f14e4e",
					"link_margin": "8",
					"top_margin": "30",
					"width": "44"
				}
			}
		}
	},
	"portfolio": {
		"label": "Portfolio",
		"values": {
			"settings": {
				"content": "full",
				"columns": 3,
				"filter_categories": true,
				"categories": true,
				"featured_image_size": "sow-blog-portfolio"
			},
			"design": {
				"filter_categories":{
					"color": "#929292",
					"color_hover": "#2d2d2d",
					"font": "default",
					"font_size": "11",
					"text_transform": "true",
					"selected_border_color": "#2d2d2d",
					"selected_border_thickness": "2"
				},
				"featured_image":{
					"border_color": "#929292",
					"divider_border_color": "#2d2d2d",
					"divider_border_thickness": "1",
					"divider_border_margin": "13",
					"hover_overlay_color": "rgba(255,255,255,0.9)",
					"post_meta_font": "default",
					"post_meta_font_size": "11",
					"post_meta_color": "#929292",
					"post_title_color": "#2d2d2d",
					"post_title_font": "default",
					"post_title_font_size": "15"
				},
				"pagination":{
					"background": "",
					"background_hover": "",
					"border_color": "#626262",
					"border_color_hover": "#f14e4e",
					"border_radius": "0",
					"font": "default",
					"font_size": "14",
					"height":"43",
					"link_color": "#626262",
					"link_color_hover": "#f14e4e",
					"dots_color": "#626262",
					"link_margin": "8",
					"top_margin": "30",
					"width": "44"
				}
			}
		}
	}
}
js/blog.js000064400000001014151541346030006437 0ustar00/* globals jQuery */

jQuery( function ( $ ) {
	if ( soBlogWidget.scrollto ) {
		// Detect if there's a Blog Widget in the URL, and scroll to it.
		if ( window.location.search && window.location.search.includes( 'sow-' ) ) {
			const blogId = window.location.search.match( /sow-([0-9a-f]+)/ )[1];
			const blogWidget = $( `[data-paging-id="${ blogId }"]` );
			if ( blogWidget.length ) {
				$( 'html, body' ).animate( {
					scrollTop: blogWidget.offset().top - soBlogWidget.scrollto_offset,
				}, 200 );
			}
		}
	}
} );
js/blog.min.js000064400000000450151541346030007224 0ustar00jQuery((function(o){if(soBlogWidget.scrollto&&window.location.search&&window.location.search.includes("sow-")){const t=o(`[data-paging-id="${window.location.search.match(/sow-([0-9a-f]+)/)[1]}"]`);t.length&&o("html, body").animate({scrollTop:t.offset().top-soBlogWidget.scrollto_offset},200)}}));js/masonry.js000064400000000651151541346030007212 0ustar00/* globals jQuery, sowb */

var sowb = window.sowb || {};

jQuery( function ( $ ) {

	sowb.setupBlogMasonry = function () {
		$( '.sow-blog-layout-masonry .sow-blog-posts' ).each( function () {
			$( this ).masonry( {
				itemSelector: '.sow-masonry-item',
				columnWidth: '.sow-masonry-item',
			} );
		} );
	};

	sowb.setupBlogMasonry();

	$( sowb ).on( 'setup_widgets', sowb.setupBlogMasonry );
} );

window.sowb = sowb;
js/masonry.min.js000064400000000503151541346030007770 0ustar00var sowb=window.sowb||{};jQuery((function(o){sowb.setupBlogMasonry=function(){o(".sow-blog-layout-masonry .sow-blog-posts").each((function(){o(this).masonry({itemSelector:".sow-masonry-item",columnWidth:".sow-masonry-item"})}))},sowb.setupBlogMasonry(),o(sowb).on("setup_widgets",sowb.setupBlogMasonry)})),window.sowb=sowb;js/portfolio.js000064400000001477151541346030007546 0ustar00/* globals jQuery, sowb */

var sowb = window.sowb || {};

jQuery( function ( $ ) {

	sowb.setupBlogPortfolio = function () {
		$( '.sow-blog-layout-portfolio' ).each( function () {
			var $$ = $( this ),
				$buttons = $$.find( '.sow-portfolio-filter-terms button' ),
				$container = $$.find( '.sow-blog-posts' );

			$container.isotope( {
				itemSelector: '.sow-portfolio-item',
				filter: '*',
				layoutMode: 'fitRows',
				resizable: true,
			} );

			$buttons.on( 'click', function() {
				var selector = $( this ).attr( 'data-filter' );
				$container.isotope( {
					filter: selector,
				} );
				$buttons.removeClass( 'active' );
				$( this ).addClass( 'active' );
				return false;
			} );
		} );
	};

	sowb.setupBlogPortfolio();

	$( sowb ).on( 'setup_widgets', sowb.setupBlogPortfolio );
} );

window.sowb = sowb;
js/portfolio.min.js000064400000001056151541346030010321 0ustar00var sowb=window.sowb||{};jQuery((function(o){sowb.setupBlogPortfolio=function(){o(".sow-blog-layout-portfolio").each((function(){var t=o(this),i=t.find(".sow-portfolio-filter-terms button"),s=t.find(".sow-blog-posts");s.isotope({itemSelector:".sow-portfolio-item",filter:"*",layoutMode:"fitRows",resizable:!0}),i.on("click",(function(){var t=o(this).attr("data-filter");return s.isotope({filter:t}),i.removeClass("active"),o(this).addClass("active"),!1}))}))},sowb.setupBlogPortfolio(),o(sowb).on("setup_widgets",sowb.setupBlogPortfolio)})),window.sowb=sowb;styles/alternate.less000064400000010501151541346030010735 0ustar00@responsive_breakpoint: 780px;

// Post.
@post_border_color: default;
@post_background: default;

// Post Title.
@title_color: default;
@title_color_hover: default;
@title_font: default;
@title_font_style: default;
@title_font_weight: default;
@title_font_size: default;

// Meta.
@meta_color: default;
@meta_color_hover: default;
@meta_font: default;
@meta_font_style: default;
@meta_font_size: default;
@meta_font_weight: default;

// Content.
@content_color: default;
@content_font: default;
@content_font_style: default;
@content_font_weight: default;
@content_font_size: default;
@content_link: default;
@content_link_hover: default;

// Pagination.
@pagination_background: default;
@pagination_background_hover: default;
@pagination_border_color: default;
@pagination_border_color_hover: default;
@pagination_border_radius: default;
@pagination_font: default;
@pagination_font_size: default;
@pagination_font_style: default;
@pagination_font_weight: default;
@pagination_height: default;
@pagination_link_color: default;
@pagination_link_margin: default;
@pagination_link_margin_offset: default;
@pagination_link_color_hover: default;
@pagination_dots_color: default;
@pagination_top_margin: default;
@pagination_width: default;

.sow-blog-layout-alternate {

	.sow-blog-posts article {
		background: @post_background;
		border: 1px solid @post_border_color;
		margin-left: 0;
		margin-right: 0;
		margin-top: 0;
		width: 100%;

		@media (max-width: @responsive_breakpoint) {
			flex-direction: column;

			& > img,
			.sow-entry-thumbnail,
			.sow-entry-thumbnail .wp-post-image {
				flex: 1;
				height: auto;
				width: 100%;
			}
		}

		// Alternating featured image alignment.
		@media (min-width: @responsive_breakpoint) {
			& > img,
			.sow-entry-thumbnail {
				flex: 1;
				width: 41.5006%;

				a {
					align-items: center;
					display: flex;
					height: 100%;
					margin: 0;
					text-align: left;
				}
			}

			&:nth-of-type(2n) {
				flex-direction: row-reverse;
			}

			&:nth-of-type(2n) .sow-entry-thumbnail a {
				justify-content: end;
				text-align: right;
			}
		}

		.sow-blog-content-wrapper {
			flex: 1;
			width: 58.4994%;

			@media (max-width: @responsive_breakpoint) {
				width: auto;
			}

			.sow-entry-header {

				.sow-entry-title {
					font-family: @title_font;
					font-size: @title_font_size;
					font-style: @title_font_style;
					font-weight: @title_font_weight;

					a {
						color: @title_color;

						&:hover,
						&:focus {
							color: @title_color_hover;
						}
					}
				}

				.sow-entry-meta {
					font-family: @meta_font;
					font-size: @meta_font_size;
					font-style: @meta_font_style;
					font-weight: @meta_font_weight;

					span {
						color: @meta_color;

						a {
							color: @meta_color;

							&:hover,
							&:focus {
								color: @meta_color_hover;
							}
						}
					}

					&:not(:last-child)::after {
						font-size: @meta_font_size;
					}
				}
			}

			.sow-entry-content {
				color: @content_color;
				font-family: @content_font;
				font-size: @content_font_size;
				font-style: @content_font_style;
				font-weight: @content_font_weight;

				a {
					color: @content_link;

					&:hover,
					&:focus {
						color: @content_link_hover;
					}
				}
			}

			.sow-more-link {
				font-family: @content_font;
				font-size: @content_font_size;
				font-style: @content_font_style;
				font-weight: @content_font_weight;
			}
		}
	}

	.sow-post-navigation {

		.sow-nav-links {
			margin-top: @pagination_top_margin;
		}

		.page-numbers {
			align-items: center;
			display: flex;
			height: @pagination_height;
			justify-content: center;
			width: @pagination_width;

			&:not(.dots) {
				background: @pagination_background;
				border: 1px solid @pagination_border_color;
				border-radius: @pagination_border_radius;
				color: @pagination_link_color;
				font-family: @pagination_font;
				font-size: @pagination_font_size;
				font-style: @pagination_font_style;
				font-weight: @pagination_font_weight;
				margin-right: @pagination_link_margin;

				&:last-child {
					margin-right: 0;
				}

				&.current,
				&:hover,
				&:focus {
					background: @pagination_background_hover;
					color: @pagination_link_color_hover;
					border-color: @pagination_border_color_hover;
				}
			}
		}

		.dots {
			color: @pagination_dots_color;
			margin-left: @pagination_link_margin_offset;
		}
	}
}
styles/grid.less000064400000007254151541346030007716 0ustar00@columns: 2;
@column_spacing: 3.5%;
@responsive_breakpoint: 780px;

// Post.
@post_border_color: default;
@post_background: default;

// Post Title.
@title_color: default;
@title_color_hover: default;
@title_font: default;
@title_font_style: default;
@title_font_weight: default;
@title_font_size: default;

// Meta.
@meta_color: default;
@meta_color_hover: default;
@meta_font: default;
@meta_font_style: default;
@meta_font_size: default;
@meta_font_weight: default;

// Content.
@content_color: default;
@content_font: default;
@content_font_style: default;
@content_font_weight: default;
@content_font_size: default;
@content_link: default;
@content_link_hover: default;

// Pagination.
@pagination_background: default;
@pagination_background_hover: default;
@pagination_border_color: default;
@pagination_border_color_hover: default;
@pagination_border_radius: default;
@pagination_font: default;
@pagination_font_size: default;
@pagination_font_style: default;
@pagination_font_weight: default;
@pagination_height: default;
@pagination_link_color: default;
@pagination_link_margin: default;
@pagination_link_margin_offset: default;
@pagination_link_color_hover: default;
@pagination_dots_color: default;
@pagination_top_margin: default;
@pagination_width: default;

.sow-blog-layout-grid {

	.sow-blog-posts {
		column-gap: @column_spacing;
		display: grid;
		grid-template-columns: repeat( @columns, 1fr );

		@media (max-width: @responsive_breakpoint) {
			display: block;
		}

		article {
			background: @post_background;
			border: 1px solid @post_border_color;

			.sow-entry-header {

				.sow-entry-title {
					font-family: @title_font;
					font-size: @title_font_size;
					font-style: @title_font_style;
					font-weight: @title_font_weight;

					a {
						color: @title_color;

						&:hover,
						&:focus {
							color: @title_color_hover;
						}
					}
				}

				.sow-entry-meta {
					font-family: @meta_font;
					font-size: @meta_font_size;
					font-style: @meta_font_style;
					font-weight: @meta_font_weight;

					span {
						color: @meta_color;

						a {
							color: @meta_color;

							&:hover,
							&:focus {
								color: @meta_color_hover;
							}
						}
					}

					&:not(:last-child)::after {
						font-size: @meta_font_size;
					}
				}
			}

			.sow-entry-content {
				color: @content_color;
				font-family: @content_font;
				font-size: @content_font_size;
				font-style: @content_font_style;
				font-weight: @content_font_weight;

				a {
					color: @content_link;

					&:hover,
					&:focus {
						color: @content_link_hover;
					}
				}
			}

			.sow-more-link {
				font-family: @content_font;
				font-size: @content_font_size;
				font-style: @content_font_style;
				font-weight: @content_font_weight;
			}
		}
	}

	.sow-post-navigation {

		.sow-nav-links {
			margin-top: @pagination_top_margin;
		}

		.page-numbers {
			align-items: center;
			display: flex;
			height: @pagination_height;
			justify-content: center;
			width: @pagination_width;

			&:not(.dots) {
				background: @pagination_background;
				border: 1px solid @pagination_border_color;
				border-radius: @pagination_border_radius;
				color: @pagination_link_color;
				font-family: @pagination_font;
				font-size: @pagination_font_size;
				font-style: @pagination_font_style;
				font-weight: @pagination_font_weight;
				margin-right: @pagination_link_margin;

				&:last-child {
					margin-right: 0;
				}

				&.current,
				&:hover,
				&:focus {
					background: @pagination_background_hover;
					color: @pagination_link_color_hover;
					border-color: @pagination_border_color_hover;
				}
			}
		}

		.dots {
			color: @pagination_dots_color;
			margin-left: @pagination_link_margin_offset;
		}
	}
}
styles/masonry.less000064400000012055151541346030010454 0ustar00@categories: default;
@column_width: 50%;
@responsive_breakpoint: 780px;

// Post.
@post_border_color: default;
@post_background: default;

// Post Title.
@title_color: default;
@title_color_hover: default;
@title_font: default;
@title_font_style: default;
@title_font_weight: default;
@title_font_size: default;

// Meta.
@meta_color: default;
@meta_color_hover: default;
@meta_font: default;
@meta_font_style: default;
@meta_font_size: default;
@meta_font_weight: default;

// Content.
@content_color: default;
@content_font: default;
@content_font_style: default;
@content_font_weight: default;
@content_font_size: default;
@content_link: default;
@content_link_hover: default;

// Pagination.
@pagination_background: default;
@pagination_background_hover: default;
@pagination_border_color: default;
@pagination_border_color_hover: default;
@pagination_border_radius: default;
@pagination_font: default;
@pagination_font_size: default;
@pagination_font_style: default;
@pagination_font_weight: default;
@pagination_height: default;
@pagination_link_color: default;
@pagination_link_margin: default;
@pagination_link_margin_offset: default;
@pagination_link_color_hover: default;
@pagination_dots_color: default;
@pagination_top_margin: default;
@pagination_width: default;

// Overlay Post Category.
@overlay_post_category_font: default;
@overlay_post_category_font_size: default;
@overlay_post_category_font_style: default;
@overlay_post_category_font_weight: default;
@overlay_post_category_color: default;
@overlay_post_category_color_hover: default;
@overlay_post_category_background: default;
@overlay_post_category_background_hover: default;

.sow-blog-layout-masonry {

	.sow-blog-posts article {
		width: @column_width;

		@media (max-width: @responsive_breakpoint) {
			width: 100%;
		}

		.sow-blog-content-wrapper {
			background: @post_background;
			border: 1px solid @post_border_color;
		}

		& when( @categories = 1 ) {

			.sow-entry-thumbnail {

				.sow-thumbnail-meta {
					display: block;
					left: 10px;
					position: absolute;
					top: 10px;
					z-index: 1;

					ul {
						display: inline-block;
						list-style: none;
						margin: 0 5px 0 0;
						padding: 0;

						li {
							background: @overlay_post_category_background;
							display: inline-block;
							margin: 0 0 3px;
							text-transform: uppercase;
							transition: all 300ms ease-in-out;

							&:hover,
							&:focus {
								background: @overlay_post_category_background_hover;
							}
						}

						a {
							color: @overlay_post_category_color;
							display: block;
							font-family: @overlay_post_category_font;
							font-size: @overlay_post_category_font_size;
							font-style: @overlay_post_category_font_style;
							font-weight: @overlay_post_category_font_weight;
							letter-spacing: 1px;
							line-height: normal;
							padding: 5.5px 12px 5px;
							text-decoration: none;

							&:hover,
							&:focus {
								color: @overlay_post_category_color_hover;
							}
						}
					}
				}
			}
		}

		.sow-entry-header {

			.sow-entry-title {
				font-family: @title_font;
				font-size: @title_font_size;
				font-style: @title_font_style;
				font-weight: @title_font_weight;

				a {
					color: @title_color;

					&:hover,
					&:focus {
						color: @title_color_hover;
					}
				}
			}

			.sow-entry-meta {
				font-family: @meta_font;
				font-size: @meta_font_size;
				font-style: @meta_font_style;
				font-weight: @meta_font_weight;

				span {
					color: @meta_color;

					a {
						color: @meta_color;

						&:hover,
						&:focus {
							color: @meta_color_hover;
						}
					}

					&:not(:last-child)::after {
						font-size: @meta_font_size;
					}
				}
			}
		}

		.sow-entry-content {
			color: @content_color;
			font-family: @content_font;
			font-size: @content_font_size;
			font-style: @content_font_style;
			font-weight: @content_font_weight;

			a {
				color: @content_link;

				&:hover,
				&:focus {
					color: @content_link_hover;
				}
			}
		}

		.sow-more-link {
			font-family: @content_font;
			font-size: @content_font_size;
			font-style: @content_font_style;
			font-weight: @content_font_weight;
		}
	}

	.sow-post-navigation {

		.sow-nav-links {
			margin-top: @pagination_top_margin;
		}

		.page-numbers {
			align-items: center;
			display: flex;
			height: @pagination_height;
			justify-content: center;
			width: @pagination_width;

			&:not(.dots) {
				background: @pagination_background;
				border: 1px solid @pagination_border_color;
				border-radius: @pagination_border_radius;
				color: @pagination_link_color;
				font-family: @pagination_font;
				font-size: @pagination_font_size;
				font-style: @pagination_font_style;
				font-weight: @pagination_font_weight;
				margin-right: @pagination_link_margin;

				&:last-child {
					margin-right: 0;
				}

				&.current,
				&:hover,
				&:focus {
					background: @pagination_background_hover;
					color: @pagination_link_color_hover;
					border-color: @pagination_border_color_hover;
				}
			}
		}

		.dots {
			color: @pagination_dots_color;
			margin-left: @pagination_link_margin_offset;
		}
	}
}
styles/offset.less000064400000011205151541346040010247 0ustar00@responsive_breakpoint: 780px;
@author: default;

// Post.
@post_border_color: default;
@post_background: default;

// Post Title.
@title_color: default;
@title_color_hover: default;
@title_font: default;
@title_font_style: default;
@title_font_weight: default;
@title_font_size: default;

// Meta.
@meta_color: default;
@meta_color_hover: default;
@meta_font: default;
@meta_font_style: default;
@meta_font_size: default;
@meta_font_weight: default;

// Content.
@content_color: default;
@content_font: default;
@content_font_style: default;
@content_font_weight: default;
@content_font_size: default;
@content_link: default;
@content_link_hover: default;

// Pagination.
@pagination_background: default;
@pagination_background_hover: default;
@pagination_border_color: default;
@pagination_border_color_hover: default;
@pagination_border_radius: default;
@pagination_font: default;
@pagination_font_size: default;
@pagination_font_style: default;
@pagination_font_weight: default;
@pagination_height: default;
@pagination_link_color: default;
@pagination_link_margin: default;
@pagination_link_margin_offset: default;
@pagination_link_color_hover: default;
@pagination_dots_color: default;
@pagination_top_margin: default;
@pagination_width: default;

// Offset Post Meta.
@offset_post_meta_color: default;
@offset_post_meta_font: default;
@offset_post_meta_font_size: default;
@offset_post_meta_font_style: default;
@offset_post_meta_font_weight: default;
@offset_post_meta_link_color: default;
@offset_post_meta_link_color_hover: default;
@offset_post_meta_link_font_size: default;

.sow-blog-layout-offset {

	.sow-blog-posts article {

		.sow-blog-entry-offset {
			color: @offset_post_meta_color;
			font-family: @offset_post_meta_font;
			font-size: @offset_post_meta_font_size;
			font-style: @offset_post_meta_font_style;
			font-weight: @offset_post_meta_font_weight;

			@media (max-width: @responsive_breakpoint) {
				margin-bottom: 15px;
				width: 100% !important;
			}

			a {
				color: @offset_post_meta_link_color;
				font-size: @offset_post_meta_link_font_size;

				&:hover,
				&:focus {
					color: @offset_post_meta_link_color_hover;
				}
			}

			& when( @author = 1 ) {

				.sow-entry-author-avatar {
					display: block;
					line-height: 0;

					.avatar {
						border-radius: 50%;
						height: auto;
						max-width: 100%;
						width: 70px;
					}
				}
			}
		}

		.sow-blog-entry {

			@media (max-width: @responsive_breakpoint) {
				width: 100% !important;
			}
		}

		.sow-blog-content-wrapper {
			background: @post_background;
			border: 1px solid @post_border_color;
		}

		.sow-entry-header {

			.sow-entry-title {
				font-family: @title_font;
				font-size: @title_font_size;
				font-style: @title_font_style;
				font-weight: @title_font_weight;

				a {
					color: @title_color;

					&:hover,
					&:focus {
						color: @title_color_hover;
					}
				}
			}

			.sow-entry-meta {
				font-family: @meta_font;
				font-size: @meta_font_size;
				font-style: @meta_font_style;
				font-weight: @meta_font_weight;

				span {
					color: @meta_color;

					a {
						color: @meta_color;

						&:hover,
						&:focus {
							color: @meta_color_hover;
						}
					}
				}

				&:not(:last-child)::after {
					font-size: @meta_font_size;
				}
			}
		}

		.sow-entry-content {
			color: @content_color;
			font-family: @content_font;
			font-size: @content_font_size;
			font-style: @content_font_style;
			font-weight: @content_font_weight;

			a {
				color: @content_link;

				&:hover,
				&:focus {
					color: @content_link_hover;
				}
			}
		}

		.sow-more-link {
			font-family: @content_font;
			font-size: @content_font_size;
			font-style: @content_font_style;
			font-weight: @content_font_weight;
		}
	}

	.sow-post-navigation {

		.sow-nav-links {
			margin-top: @pagination_top_margin;
		}

		.page-numbers {
			align-items: center;
			display: flex;
			height: @pagination_height;
			justify-content: center;
			width: @pagination_width;

			&:not(.dots) {
				background: @pagination_background;
				border: 1px solid @pagination_border_color;
				border-radius: @pagination_border_radius;
				color: @pagination_link_color;
				font-family: @pagination_font;
				font-size: @pagination_font_size;
				font-style: @pagination_font_style;
				font-weight: @pagination_font_weight;
				margin-right: @pagination_link_margin;

				&:last-child {
					margin-right: 0;
				}

				&.current,
				&:hover,
				&:focus {
					background: @pagination_background_hover;
					color: @pagination_link_color_hover;
					border-color: @pagination_border_color_hover;
				}
			}
		}

		.dots {
			color: @pagination_dots_color;
			margin-left: @pagination_link_margin_offset;
		}
	}
}
styles/portfolio.less000064400000011602151541346040010777 0ustar00@categories: default;
@columns: 3;
@column_width: 50%;
@image_size: 375px;
@responsive_breakpoint: 780px;

// Pagination.
@pagination_background: default;
@pagination_background_hover: default;
@pagination_border_color: default;
@pagination_border_color_hover: default;
@pagination_border_radius: default;
@pagination_font: default;
@pagination_font_size: default;
@pagination_font_style: default;
@pagination_font_weight: default;
@pagination_height: default;
@pagination_link_color: default;
@pagination_link_margin: default;
@pagination_link_margin_offset: default;
@pagination_link_color_hover: default;
@pagination_dots_color: default;
@pagination_top_margin: default;
@pagination_width: default;

// Filter Categories.
@filter_categories_font: default;
@filter_categories_font_size: default;
@filter_categories_font_style: default;
@filter_categories_font_weight: 600;
@filter_categories_color: default;
@filter_categories_color_hover: default;
@filter_categories_text_transform: default;
@filter_categories_selected_border_color: default;
@filter_categories_selected_border_thickness: default;

// Featured Image.
@featured_image_border_color: default;
@featured_image_hover_overlay_color: default;
@featured_image_post_title_font: default;
@featured_image_post_title_font_size: default;
@featured_image_post_title_font_style: default;
@featured_image_post_title_font_weight: 700;
@featured_image_post_title_color: default;
@featured_image_divider_border_color: default;
@featured_image_divider_border_thickness: default;
@featured_image_divider_border_margin: default;
@featured_image_post_meta_font: default;
@featured_image_post_meta_font_size: default;
@featured_image_post_meta_font_style: default;
@featured_image_post_meta_font_weight: 600;
@featured_image_post_meta_color: default;

.sow-blog-layout-portfolio {

	.sow-blog-posts {
		column-gap: 1.1667%;
		display: grid;
		grid-template-columns: repeat( @columns, 1fr );

		article {
			margin-bottom: 30px;
			padding: 0 1.1667%;
			width: @column_width;

			@media (max-width: @responsive_breakpoint) {
				width: 100%;
			}

			.sow-entry-thumbnail {
				max-width: 100%;
				width: @image_size;

				&:hover .sow-entry-overlay {
					background: @featured_image_hover_overlay_color;
					border: 2px solid @featured_image_border_color;
				}

				.sow-entry-title {
					color: @featured_image_post_title_color;
					font-family: @featured_image_post_title_font;
					font-size: @featured_image_post_title_font_size;
					font-style: @featured_image_post_title_font_style;
					font-weight: @featured_image_post_title_font_weight;
				}

				& when( @categories = 1 ) {
					.sow-entry-divider {
						margin: @featured_image_divider_border_margin 0;
						border: @featured_image_divider_border_thickness solid @featured_image_divider_border_color;
					}

					.sow-entry-project-type {
						color: @featured_image_post_meta_color;
						font-family: @featured_image_post_meta_font;
						font-size: @featured_image_post_meta_font_size;
						font-style: @featured_image_post_meta_font_style;
						font-weight: @featured_image_post_meta_font_weight;
						letter-spacing: 1px;
						line-height: 1.7333;
						text-transform: uppercase;
					}
				}
			}
		}
	}

	& when( @categories = 1 ) {

		.sow-portfolio-filter-terms {

			button {
				border: none;
				border-bottom: @filter_categories_selected_border_thickness solid transparent;
				border-radius: 0;
				color: @filter_categories_color;
				font-family: @filter_categories_font;
				font-size: @filter_categories_font_size;
				font-style: @filter_categories_font_style;
				font-weight: @filter_categories_font_weight;
				letter-spacing: 1px;
				line-height: normal;
				text-transform: @filter_categories_text_transform;

				@media (max-width: @responsive_breakpoint) {
					margin: 0 10px 5px 0;
				}

				&:hover,
				&:focus {
					color: @filter_categories_color_hover;
				}

				&.active {
					border-bottom-color: @filter_categories_selected_border_color;
				}
			}
		}
	}

	.sow-post-navigation {

		.sow-nav-links {
			margin-top: @pagination_top_margin;
		}

		.page-numbers {
			align-items: center;
			display: flex;
			height: @pagination_height;
			justify-content: center;
			width: @pagination_width;

			&:not(.dots) {
				background: @pagination_background;
				border: 1px solid @pagination_border_color;
				border-radius: @pagination_border_radius;
				color: @pagination_link_color;
				font-family: @pagination_font;
				font-size: @pagination_font_size;
				font-style: @pagination_font_style;
				font-weight: @pagination_font_weight;
				margin-right: @pagination_link_margin;

				&:last-child {
					margin-right: 0;
				}

				&.current,
				&:hover,
				&:focus {
					background: @pagination_background_hover;
					color: @pagination_link_color_hover;
					border-color: @pagination_border_color_hover;
				}
			}
		}

		.dots {
			color: @pagination_dots_color;
			margin-left: @pagination_link_margin_offset;
		}
	}
}
styles/standard.less000064400000006624151541346040010572 0ustar00// Post.
@post_border_color: default;
@post_background: default;

// Post Title
@title_color: default;
@title_color_hover: default;
@title_font: default;
@title_font_style: default;
@title_font_weight: default;
@title_font_size: default;

// Meta.
@meta_color: default;
@meta_color_hover: default;
@meta_font: default;
@meta_font_style: default;
@meta_font_size: default;
@meta_font_weight: default;

// Content.
@content_color: default;
@content_font: default;
@content_font_style: default;
@content_font_weight: default;
@content_font_size: default;
@content_link: default;
@content_link_hover: default;

// Pagination.
@pagination_background: default;
@pagination_background_hover: default;
@pagination_border_color: default;
@pagination_border_color_hover: default;
@pagination_border_radius: default;
@pagination_font: default;
@pagination_font_size: default;
@pagination_font_style: default;
@pagination_font_weight: default;
@pagination_height: default;
@pagination_link_color: default;
@pagination_link_margin: default;
@pagination_link_margin_offset: default;
@pagination_link_color_hover: default;
@pagination_dots_color: default;
@pagination_top_margin: default;
@pagination_width: default;

.sow-blog-layout-standard {

	.sow-blog-posts article {

		.sow-blog-content-wrapper {
			background: @post_background;
			border: 1px solid @post_border_color;
		}

		.sow-entry-header {

			.sow-entry-title a {
				font-family: @title_font;
				font-size: @title_font_size;
				font-style: @title_font_style;
				font-weight: @title_font_weight;
				color: @title_color;

				&:hover,
				&:focus {
					color: @title_color_hover;
				}
			}

			.sow-entry-meta {
				font-family: @meta_font;
				font-size: @meta_font_size;
				font-style: @meta_font_style;
				font-weight: @meta_font_weight;

				span {
					color: @meta_color;

					a {
						color: @meta_color;

						&:hover,
						&:focus {
							color: @meta_color_hover;
						}
					}
				}

				&:not(:last-child)::after {
					font-size: @meta_font_size;
				}
			}
		}

		.sow-entry-content {
			color: @content_color;
			font-family: @content_font;
			font-size: @content_font_size;
			font-style: @content_font_style;
			font-weight: @content_font_weight;

			a {
				color: @content_link;

				&:hover,
				&:focus {
					color: @content_link_hover;
				}
			}
		}

		.sow-more-link {
			font-family: @content_font;
			font-size: @content_font_size;
			font-style: @content_font_style;
			font-weight: @content_font_weight;
		}
	}

	.sow-post-navigation {

		.sow-nav-links {
			margin-top: @pagination_top_margin;
		}

		.page-numbers {
			align-items: center;
			display: flex;
			height: @pagination_height;
			justify-content: center;
			width: @pagination_width;

			&:not(.dots) {
				background: @pagination_background;
				border: 1px solid @pagination_border_color;
				border-radius: @pagination_border_radius;
				color: @pagination_link_color;
				font-family: @pagination_font;
				font-size: @pagination_font_size;
				font-style: @pagination_font_style;
				font-weight: @pagination_font_weight;
				margin-right: @pagination_link_margin;

				&:last-child {
					margin-right: 0;
				}

				&.current,
				&:hover,
				&:focus {
					background: @pagination_background_hover;
					color: @pagination_link_color_hover;
					border-color: @pagination_border_color_hover;
				}
			}
		}

		.dots {
			color: @pagination_dots_color;
			margin-left: @pagination_link_margin_offset;
		}
	}
}
tpl/alternate.php000064400000001172151541346040010037 0ustar00<article id="post-<?php the_ID(); ?>" <?php post_class( 'sow-blog-columns' ); ?> style="display: flex; justify-content: space-between; margin-bottom: 30px;">
	<?php SiteOrigin_Widget_Blog_Widget::post_featured_image( $settings ); ?>
	<?php SiteOrigin_Widget_Blog_Widget::content_wrapper( $settings ); ?>
		<header class="sow-entry-header">
			<?php SiteOrigin_Widget_Blog_Widget::generate_post_title( $settings ); ?>
			<div class="sow-entry-meta">
				<?php SiteOrigin_Widget_Blog_Widget::post_meta( $settings ); ?>
			</div>
		</header>

		<?php SiteOrigin_Widget_Blog_Widget::output_content( $settings, 18 ); ?>
	</div>
</article>
tpl/base.php000064400000004226151541346040006775 0ustar00<?php if ( ! empty( $posts ) && $posts->have_posts() ) { ?>
	<?php if ( ! empty( $instance['title'] ) ) { ?>
		<div class="sow-blog-title">
			<?php
			echo $args['before_title'] . wp_kses_post( $instance['title'] ) . $args['after_title'];
			?>
		</div>
		<?php
	}

	$this->override_read_more( $settings );
	?>
	<div
		class="sow-blog sow-blog-layout-<?php echo esc_attr( $instance['template'] ); ?>"
		data-template="<?php echo esc_attr( $instance['template'] ); ?>"
		data-settings="<?php echo esc_attr( json_encode( $settings ) ); ?>"
		data-paged="<?php echo esc_attr( $posts->query['paged'] ); ?>"
		data-paging-id="<?php echo esc_attr( $instance['paged_id'] ); ?>"
		data-total-pages="<?php echo esc_attr( $this->total_pages( $posts ) ); ?>"
		data-hash="<?php echo esc_attr( $storage_hash ); ?>"
	>
		<?php
		do_action( 'siteorigin_widgets_blog_output_before', $settings );

		if (
			$instance['template'] == 'portfolio' &&
			$template_settings['filter_categories'] &&
			! is_wp_error( $template_settings['terms'] )
		) {
			?>
			<div class="sow-portfolio-filter-terms" style="margin-bottom: 25px;">
				<button data-filter="*" class="active" style="background: none; margin-right: 34px; padding: 0 0 6px;">
					<?php esc_html_e( 'All', 'so-widgets-bundle' ); ?>
				</button>
				<?php
				foreach ( $template_settings['terms'] as $tax_term ) {
					$slug = is_object( $tax_term ) ? $tax_term->slug : $tax_term;
					?>
					<button data-filter=".<?php echo esc_attr( $slug ); ?>" style="background: none; box-shadow: none; margin-right: 34px; padding: 0 0 6px;">
						<?php echo esc_html( $slug ); ?>
					</button>
				<?php } ?>
			</div>
		<?php } ?>

		<?php $template = SiteOrigin_Widget_Blog_Widget::get_template( $instance ); ?>
		<?php if ( ! empty( $template ) ) { ?>
			<div class="sow-blog-posts">
				<?php
				while ( $posts->have_posts() ) {
					$posts->the_post();
					include $template;
				}
				?>
			</div>
			<?php $this->paginate_links( $settings, $posts, $instance ); ?>
		<?php } ?>
		<?php do_action( 'siteorigin_widgets_blog_output_after', $settings ); ?>
	</div>
	<?php $this->override_read_more( $settings ); ?>
<?php } ?>
<?php wp_reset_postdata(); ?>
tpl/grid.php000064400000001145151541346040007005 0ustar00<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> style="margin: 0 0 30px;">
	<?php SiteOrigin_Widget_Blog_Widget::post_featured_image( $settings ); ?>
	<?php
	SiteOrigin_Widget_Blog_Widget::content_wrapper(
		$settings,
		array(
			'padding' => '25px 30px 33px',
		)
	);
	?>
		<header class="sow-entry-header">
			<?php SiteOrigin_Widget_Blog_Widget::generate_post_title( $settings ); ?>
			<div class="sow-entry-meta">
				<?php SiteOrigin_Widget_Blog_Widget::post_meta( $settings ); ?>
			</div>
		</header>

		<?php SiteOrigin_Widget_Blog_Widget::output_content( $settings ); ?>
	</div>
</article>
tpl/masonry.php000064400000001137151541346040007551 0ustar00<article id="post-<?php the_ID(); ?>" <?php post_class( 'sow-masonry-item' ); ?>>
	<?php SiteOrigin_Widget_Blog_Widget::post_featured_image( $settings ); ?>
	<?php
	SiteOrigin_Widget_Blog_Widget::content_wrapper(
		$settings,
		array(
			'padding' => '25px 30px 33px',
		)
	);
	?>
		<header class="sow-entry-header">
			<?php SiteOrigin_Widget_Blog_Widget::generate_post_title( $settings ); ?>
			<div class="sow-entry-meta">
				<?php SiteOrigin_Widget_Blog_Widget::post_meta( $settings ); ?>
			</div>
		</header>

		<?php SiteOrigin_Widget_Blog_Widget::output_content( $settings ); ?>
	</div>
</article>
tpl/offset.php000064400000007200151541346040007344 0ustar00<article id="post-<?php the_ID(); ?>" <?php post_class( 'sow-blog-columns' ); ?> style="display: flex; flex-wrap: wrap; justify-content: space-between; margin: 0 0 40px;">
	<div class="sow-blog-entry-offset" style="box-sizing: border-box; padding-right: 30px; width: 22%;">
		<?php if ( $settings['author'] ) { ?>
			<?php if ( function_exists( 'coauthors_posts_links' ) ) { ?>
				<?php $coauthors = get_coauthors(); ?>
				<span class="sow-meta-text">
					<?php echo esc_html( _n( 'Author', 'Authors', count( $coauthors ), 'so-widgets-bundle' ) ); ?>
				</span>
				<?php foreach ( $coauthors as $author ) { ?>
					<div class="sow-entry-author-avatar">
						<a href="<?php echo esc_url( get_author_posts_url( $author->ID ) ); ?>">
							<?php echo get_avatar( $author->ID, 140 ); ?>
						</a>
					</div>
					<div class="sow-entry-author-link">
						<?php echo coauthors_posts_links_single( $author ); ?>
					</div>
				<?php } ?>
			<?php } else { ?>
				<div class="sow-entry-author-avatar">
					<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>">
						<?php echo get_avatar( get_the_author_meta( 'ID' ), 140 ); ?>
					</a>
				</div>
				<div class="sow-entry-author-link">
					<span class="sow-meta-text"><?php esc_html_e( 'Written by', 'so-widgets-bundle' ); ?></span>
					<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>">
						<?php echo esc_html( get_the_author() ) ?>
					</a>
				</div>
			<?php } ?>
		<?php } ?>

		<?php if ( $settings['categories'] ) { ?>
			<div class="sow-entry-categories">
				<span class="sow-meta-text"><?php esc_html_e( 'Posted in', 'so-widgets-bundle' ); ?></span>
				<?php the_category( ', ', '', '' ); ?>
			</div>
		<?php } ?>

		<?php if ( ! empty( $settings['tags'] ) && has_tag() ) { ?>
			<div class="sow-entry-tags">
				<span class="sow-meta-text"><?php esc_html_e( 'Tags', 'so-widgets-bundle' ); ?></span>
				<?php the_tags( '' ); ?>
			</div>
		<?php } ?>

		<?php if ( comments_open() && $settings['comment_count'] ) { ?>
			<div class="sow-entry-comments">
				<span class="sow-meta-text"><?php esc_html_e( 'Comments', 'so-widgets-bundle' ); ?></span>
				<?php
				echo comments_popup_link(
					esc_html__( 'Post a comment', 'so-widgets-bundle' ),
					esc_html__( '1 Comment', 'so-widgets-bundle' ),
					esc_html__( '% Comments', 'so-widgets-bundle' )
				);
				?>
			</div>
		<?php } ?>
	</div>
	<div class="sow-blog-entry" style="width: 78%;">
		<?php SiteOrigin_Widget_Blog_Widget::post_featured_image( $settings ); ?>
		<?php
		SiteOrigin_Widget_Blog_Widget::content_wrapper(
			$settings,
			array(
				'padding' => '25px 30px 33px',
			)
		);
		?>
			<header class="sow-entry-header">
				<?php
				SiteOrigin_Widget_Blog_Widget::generate_post_title( $settings );
				if ( ! empty( $template_settings['time_string'] ) ) {
					$time_string = sprintf(
						$template_settings['time_string'],
						esc_attr( get_the_date( DATE_W3C ) ),
						esc_html( get_the_date( $template_settings['date_output_format'] ) ),
						esc_attr( get_the_modified_date( DATE_W3C ) ),
						esc_html( get_the_modified_date( $template_settings['date_output_format'] ) )
					);
					?>
					<div class="sow-entry-meta">
						<?php
						echo '<span class="sow-posted-on">';
						printf(
							/* translators: %s: post date. */
							esc_html_x( 'Posted on %s', 'post date', 'so-widgets-bundle' ),
							'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
						);
						echo '</span>';
						?>
					</div>
				<?php } ?>
			</header>

			<?php SiteOrigin_Widget_Blog_Widget::output_content( $settings ); ?>
		</div>
	</div>
</article>
tpl/portfolio.php000064400000003262151541346040010077 0ustar00<?php
$types = null;

if ( $settings['categories'] || $template_settings['filter_categories'] ) {
	$terms = SiteOrigin_Widget_Blog_Widget::get_query_terms( $instance, $query, get_the_ID() );

	if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) {
		$filtering_links = array();

		foreach ( $terms as $term ) {
			$filtering_links[] = sanitize_html_class(
				is_object( $term ) ? $term->slug : $term
			);
		}
		$filtering = join( ', ', $filtering_links );
		$types = $filtering ? join( ' ', $filtering_links ) : ' ';
	}
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'sow-portfolio-item ' . $types ); ?>>
	<div class="sow-entry-thumbnail">
		<a href="<?php the_permalink(); ?>" class="sow-entry-link-overlay">&nbsp;</a>
		<span class="sow-entry-overlay">&nbsp;</span>
		<div class="sow-entry-content">
			<?php
			$tag = siteorigin_widget_valid_tag(
				$settings['tag'],
				'h2'
			);

			the_title(
				'<' . $tag . ' class="sow-entry-title" style="margin: 0 0 5px;">',
				'</' . $tag . '>'
			);

			if ( $settings['categories'] ) {
				?>
				<div class="sow-entry-divider"></div>
				<span class="sow-entry-project-type"><?php echo esc_html( $filtering ); ?></span>
			<?php } ?>
		</div>
		<?php
		if ( ! has_post_thumbnail() ) {
			echo apply_filters( 'siteorigin_widgets_blog_featured_image_fallback', false, $settings );
		} else {
			if ( ! empty( $settings['featured_image_size'] ) ) {
				$size = $settings['featured_image_size'] == 'custom_size' ? array( $settings['featured_image_size_width'], $settings['featured_image_size_height'] ) : $settings['featured_image_size'];
			} else {
				$size = 'sow-blog-portfolio';
			}
			the_post_thumbnail( $size );
		}
		?>
	</div>
</article>
tpl/standard.php000064400000001144151541346040007657 0ustar00<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> style="margin: 0 0 40px">
	<?php SiteOrigin_Widget_Blog_Widget::post_featured_image( $settings ); ?>
	<?php
	SiteOrigin_Widget_Blog_Widget::content_wrapper(
		$settings,
		array(
			'padding' => '25px 30px 38px',
		)
	);
	?>
		<header class="sow-entry-header">
			<?php SiteOrigin_Widget_Blog_Widget::generate_post_title( $settings ); ?>
			<div class="sow-entry-meta">
				<?php SiteOrigin_Widget_Blog_Widget::post_meta( $settings ); ?>
			</div>
		</header>

		<?php SiteOrigin_Widget_Blog_Widget::output_content( $settings ); ?>
	</div>
</article>