<?php
/**
 * SeoHub Framework: return lists
 *
 * @package seohub
 * @since seohub 1.0
 */

// Disable direct call
if ( ! defined( 'ABSPATH' ) ) { exit; }



// Return styles list
if ( !function_exists( 'seohub_get_list_styles' ) ) {
	function seohub_get_list_styles($from=1, $to=2, $prepend_inherit=false) {
		$list = array();
		for ($i=$from; $i<=$to; $i++)
			$list[$i] = sprintf(esc_html__('Style %d', 'seohub'), $i);
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the shortcodes margins
if ( !function_exists( 'seohub_get_list_margins' ) ) {
	function seohub_get_list_margins($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_margins']))
			$list = $SEOHUB_GLOBALS['list_margins'];
		else {
			$list = array(
				'null'		=> esc_html__('0 (No margin)',	'seohub'),
				'tiny'		=> esc_html__('Tiny',		'seohub'),
				'small'		=> esc_html__('Small',		'seohub'),
				'medium'	=> esc_html__('Medium',		'seohub'),
				'large'		=> esc_html__('Large',		'seohub'),
				'huge'		=> esc_html__('Huge',		'seohub'),
				'tiny-'		=> esc_html__('Tiny (negative)',	'seohub'),
				'small-'	=> esc_html__('Small (negative)',	'seohub'),
				'medium-'	=> esc_html__('Medium (negative)',	'seohub'),
				'large-'	=> esc_html__('Large (negative)',	'seohub'),
				'huge-'		=> esc_html__('Huge (negative)',	'seohub')
				);
			$SEOHUB_GLOBALS['list_margins'] = $list = apply_filters('seohub_filter_list_margins', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the animations
if ( !function_exists( 'seohub_get_list_animations' ) ) {
	function seohub_get_list_animations($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_animations']))
			$list = $SEOHUB_GLOBALS['list_animations'];
		else {
			$list = array(
				'none'			=> esc_html__('- None -',	'seohub'),
				'bounced'		=> esc_html__('Bounced',		'seohub'),
				'flash'			=> esc_html__('Flash',		'seohub'),
				'flip'			=> esc_html__('Flip',		'seohub'),
				'pulse'			=> esc_html__('Pulse',		'seohub'),
				'rubberBand'	=> esc_html__('Rubber Band',	'seohub'),
				'shake'			=> esc_html__('Shake',		'seohub'),
				'swing'			=> esc_html__('Swing',		'seohub'),
				'tada'			=> esc_html__('Tada',		'seohub'),
				'wobble'		=> esc_html__('Wobble',		'seohub')
				);
			$SEOHUB_GLOBALS['list_animations'] = $list = apply_filters('seohub_filter_list_animations', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the line styles
if ( !function_exists( 'seohub_get_list_line_styles' ) ) {
	function seohub_get_list_line_styles($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_line_styles']))
			$list = $SEOHUB_GLOBALS['list_line_styles'];
		else {
			$list = array(
				'solid'	=> esc_html__('Solid', 'seohub'),
				'dashed'=> esc_html__('Dashed', 'seohub'),
				'dotted'=> esc_html__('Dotted', 'seohub'),
				'double'=> esc_html__('Double', 'seohub'),
				'image'	=> esc_html__('Image', 'seohub')
				);
			$SEOHUB_GLOBALS['list_line_styles'] = $list = apply_filters('seohub_filter_list_line_styles', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the enter animations
if ( !function_exists( 'seohub_get_list_animations_in' ) ) {
	function seohub_get_list_animations_in($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_animations_in']))
			$list = $SEOHUB_GLOBALS['list_animations_in'];
		else {
			$list = array(
				'none'				=> esc_html__('- None -',			'seohub'),
				'bounceIn'			=> esc_html__('Bounce In',			'seohub'),
				'bounceInUp'		=> esc_html__('Bounce In Up',		'seohub'),
				'bounceInDown'		=> esc_html__('Bounce In Down',		'seohub'),
				'bounceInLeft'		=> esc_html__('Bounce In Left',		'seohub'),
				'bounceInRight'		=> esc_html__('Bounce In Right',	'seohub'),
				'fadeIn'			=> esc_html__('Fade In',			'seohub'),
				'fadeInUp'			=> esc_html__('Fade In Up',			'seohub'),
				'fadeInDown'		=> esc_html__('Fade In Down',		'seohub'),
				'fadeInLeft'		=> esc_html__('Fade In Left',		'seohub'),
				'fadeInRight'		=> esc_html__('Fade In Right',		'seohub'),
				'fadeInUpBig'		=> esc_html__('Fade In Up Big',		'seohub'),
				'fadeInDownBig'		=> esc_html__('Fade In Down Big',	'seohub'),
				'fadeInLeftBig'		=> esc_html__('Fade In Left Big',	'seohub'),
				'fadeInRightBig'	=> esc_html__('Fade In Right Big',	'seohub'),
				'flipInX'			=> esc_html__('Flip In X',			'seohub'),
				'flipInY'			=> esc_html__('Flip In Y',			'seohub'),
				'lightSpeedIn'		=> esc_html__('Light Speed In',		'seohub'),
				'rotateIn'			=> esc_html__('Rotate In',			'seohub'),
				'rotateInUpLeft'	=> esc_html__('Rotate In Down Left','seohub'),
				'rotateInUpRight'	=> esc_html__('Rotate In Up Right',	'seohub'),
				'rotateInDownLeft'	=> esc_html__('Rotate In Up Left',	'seohub'),
				'rotateInDownRight'	=> esc_html__('Rotate In Down Right','seohub'),
				'rollIn'			=> esc_html__('Roll In',			'seohub'),
				'slideInUp'			=> esc_html__('Slide In Up',		'seohub'),
				'slideInDown'		=> esc_html__('Slide In Down',		'seohub'),
				'slideInLeft'		=> esc_html__('Slide In Left',		'seohub'),
				'slideInRight'		=> esc_html__('Slide In Right',		'seohub'),
				'zoomIn'			=> esc_html__('Zoom In',			'seohub'),
				'zoomInUp'			=> esc_html__('Zoom In Up',			'seohub'),
				'zoomInDown'		=> esc_html__('Zoom In Down',		'seohub'),
				'zoomInLeft'		=> esc_html__('Zoom In Left',		'seohub'),
				'zoomInRight'		=> esc_html__('Zoom In Right',		'seohub')
				);
			$SEOHUB_GLOBALS['list_animations_in'] = $list = apply_filters('seohub_filter_list_animations_in', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the out animations
if ( !function_exists( 'seohub_get_list_animations_out' ) ) {
	function seohub_get_list_animations_out($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_animations_out']))
			$list = $SEOHUB_GLOBALS['list_animations_out'];
		else {
			$list = array(
				'none'				=> esc_html__('- None -',	'seohub'),
				'bounceOut'			=> esc_html__('Bounce Out',			'seohub'),
				'bounceOutUp'		=> esc_html__('Bounce Out Up',		'seohub'),
				'bounceOutDown'		=> esc_html__('Bounce Out Down',		'seohub'),
				'bounceOutLeft'		=> esc_html__('Bounce Out Left',		'seohub'),
				'bounceOutRight'	=> esc_html__('Bounce Out Right',	'seohub'),
				'fadeOut'			=> esc_html__('Fade Out',			'seohub'),
				'fadeOutUp'			=> esc_html__('Fade Out Up',			'seohub'),
				'fadeOutDown'		=> esc_html__('Fade Out Down',		'seohub'),
				'fadeOutLeft'		=> esc_html__('Fade Out Left',		'seohub'),
				'fadeOutRight'		=> esc_html__('Fade Out Right',		'seohub'),
				'fadeOutUpBig'		=> esc_html__('Fade Out Up Big',		'seohub'),
				'fadeOutDownBig'	=> esc_html__('Fade Out Down Big',	'seohub'),
				'fadeOutLeftBig'	=> esc_html__('Fade Out Left Big',	'seohub'),
				'fadeOutRightBig'	=> esc_html__('Fade Out Right Big',	'seohub'),
				'flipOutX'			=> esc_html__('Flip Out X',			'seohub'),
				'flipOutY'			=> esc_html__('Flip Out Y',			'seohub'),
				'hinge'				=> esc_html__('Hinge Out',			'seohub'),
				'lightSpeedOut'		=> esc_html__('Light Speed Out',		'seohub'),
				'rotateOut'			=> esc_html__('Rotate Out',			'seohub'),
				'rotateOutUpLeft'	=> esc_html__('Rotate Out Down Left',	'seohub'),
				'rotateOutUpRight'	=> esc_html__('Rotate Out Up Right',		'seohub'),
				'rotateOutDownLeft'	=> esc_html__('Rotate Out Up Left',		'seohub'),
				'rotateOutDownRight'=> esc_html__('Rotate Out Down Right',	'seohub'),
				'rollOut'			=> esc_html__('Roll Out',		'seohub'),
				'slideOutUp'		=> esc_html__('Slide Out Up',		'seohub'),
				'slideOutDown'		=> esc_html__('Slide Out Down',	'seohub'),
				'slideOutLeft'		=> esc_html__('Slide Out Left',	'seohub'),
				'slideOutRight'		=> esc_html__('Slide Out Right',	'seohub'),
				'zoomOut'			=> esc_html__('Zoom Out',			'seohub'),
				'zoomOutUp'			=> esc_html__('Zoom Out Up',		'seohub'),
				'zoomOutDown'		=> esc_html__('Zoom Out Down',	'seohub'),
				'zoomOutLeft'		=> esc_html__('Zoom Out Left',	'seohub'),
				'zoomOutRight'		=> esc_html__('Zoom Out Right',	'seohub')
				);
			$SEOHUB_GLOBALS['list_animations_out'] = $list = apply_filters('seohub_filter_list_animations_out', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return classes list for the specified animation
if (!function_exists('seohub_get_animation_classes')) {
	function seohub_get_animation_classes($animation, $speed='normal', $loop='none') {
		// speed:	fast=0.5s | normal=1s | slow=2s
		// loop:	none | infinite
		return seohub_param_is_off($animation) ? '' : 'animated '.esc_attr($animation).' '.esc_attr($speed).(!seohub_param_is_off($loop) ? ' '.esc_attr($loop) : '');
	}
}


// Return list of categories
if ( !function_exists( 'seohub_get_list_categories' ) ) {
	function seohub_get_list_categories($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_categories']))
			$list = $SEOHUB_GLOBALS['list_categories'];
		else {
			$list = array();
			$args = array(
				'type'                     => 'post',
				'child_of'                 => 0,
				'parent'                   => '',
				'orderby'                  => 'name',
				'order'                    => 'ASC',
				'hide_empty'               => 0,
				'hierarchical'             => 1,
				'exclude'                  => '',
				'include'                  => '',
				'number'                   => '',
				'taxonomy'                 => 'category',
				'pad_counts'               => false );
			$taxonomies = get_categories( $args );
			if (is_array($taxonomies) && count($taxonomies) > 0) {
				foreach ($taxonomies as $cat) {
					$list[$cat->term_id] = $cat->name;
				}
			}
			$SEOHUB_GLOBALS['list_categories'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of taxonomies
if ( !function_exists( 'seohub_get_list_terms' ) ) {
	function seohub_get_list_terms($prepend_inherit=false, $taxonomy='category') {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_taxonomies_'.($taxonomy)]))
			$list = $SEOHUB_GLOBALS['list_taxonomies_'.($taxonomy)];
		else {
			$list = array();
			$args = array(
				'child_of'                 => 0,
				'parent'                   => '',
				'orderby'                  => 'name',
				'order'                    => 'ASC',
				'hide_empty'               => 0,
				'hierarchical'             => 1,
				'exclude'                  => '',
				'include'                  => '',
				'number'                   => '',
				'taxonomy'                 => $taxonomy,
				'pad_counts'               => false );
			$taxonomies = get_terms( $taxonomy, $args );
			if (is_array($taxonomies) && count($taxonomies) > 0) {
				foreach ($taxonomies as $cat) {
					$list[$cat->term_id] = $cat->name;	// . ($taxonomy!='category' ? ' /'.($cat->taxonomy).'/' : '');
				}
			}
			$SEOHUB_GLOBALS['list_taxonomies_'.($taxonomy)] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list of post's types
if ( !function_exists( 'seohub_get_list_posts_types' ) ) {
	function seohub_get_list_posts_types($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_posts_types']))
			$list = $SEOHUB_GLOBALS['list_posts_types'];
		else {
			$list = array();
			/* 
			// This way to return all registered post types
			$types = get_post_types();
			if (in_array('post', $types)) $list['post'] = esc_html__('Post', 'seohub');
			if (is_array($types) && count($types) > 0) {
				foreach ($types as $t) {
					if ($t == 'post') continue;
					$list[$t] = seohub_strtoproper($t);
				}
			}
			*/
			// Return only theme inheritance supported post types
			$SEOHUB_GLOBALS['list_posts_types'] = $list = apply_filters('seohub_filter_list_post_types', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list post items from any post type and taxonomy
if ( !function_exists( 'seohub_get_list_posts' ) ) {
	function seohub_get_list_posts($prepend_inherit=false, $opt=array()) {
		$opt = array_merge(array(
			'post_type'			=> 'post',
			'post_status'		=> 'publish',
			'taxonomy'			=> 'category',
			'taxonomy_value'	=> '',
			'posts_per_page'	=> -1,
			'orderby'			=> 'post_date',
			'order'				=> 'desc',
			'return'			=> 'id'
			), is_array($opt) ? $opt : array('post_type'=>$opt));

		global $SEOHUB_GLOBALS;
		$hash = 'list_posts_'.($opt['post_type']).'_'.($opt['taxonomy']).'_'.($opt['taxonomy_value']).'_'.($opt['orderby']).'_'.($opt['order']).'_'.($opt['return']).'_'.($opt['posts_per_page']);
		if (isset($SEOHUB_GLOBALS[$hash]))
			$list = $SEOHUB_GLOBALS[$hash];
		else {
			$list = array();
			$list['none'] = esc_html__("- Not selected -", 'seohub');
			$args = array(
				'post_type' => $opt['post_type'],
				'post_status' => $opt['post_status'],
				'posts_per_page' => $opt['posts_per_page'],
				'ignore_sticky_posts' => true,
				'orderby'	=> $opt['orderby'],
				'order'		=> $opt['order']
			);
			if (!empty($opt['taxonomy_value'])) {
				$args['tax_query'] = array(
					array(
						'taxonomy' => $opt['taxonomy'],
						'field' => (int) $opt['taxonomy_value'] > 0 ? 'id' : 'slug',
						'terms' => $opt['taxonomy_value']
					)
				);
			}
			$posts = get_posts( $args );
			if (is_array($posts) && count($posts) > 0) {
				foreach ($posts as $post) {
					$list[$opt['return']=='id' ? $post->ID : $post->post_title] = $post->post_title;
				}
			}
			$SEOHUB_GLOBALS[$hash] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of registered users
if ( !function_exists( 'seohub_get_list_users' ) ) {
	function seohub_get_list_users($prepend_inherit=false, $roles=array('administrator', 'editor', 'author', 'contributor', 'shop_manager')) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_users']))
			$list = $SEOHUB_GLOBALS['list_users'];
		else {
			$list = array();
			$list['none'] = esc_html__("- Not selected -", 'seohub');
			$args = array(
				'orderby'	=> 'display_name',
				'order'		=> 'ASC' );
			$users = get_users( $args );
			if (is_array($users) && count($users) > 0) {
				foreach ($users as $user) {
					$accept = true;
					if (is_array($user->roles)) {
						if (is_array($user->roles) && count($user->roles) > 0) {
							$accept = false;
							foreach ($user->roles as $role) {
								if (in_array($role, $roles)) {
									$accept = true;
									break;
								}
							}
						}
					}
					if ($accept) $list[$user->user_login] = $user->display_name;
				}
			}
			$SEOHUB_GLOBALS['list_users'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return slider engines list, prepended inherit (if need)
if ( !function_exists( 'seohub_get_list_sliders' ) ) {
	function seohub_get_list_sliders($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_sliders']))
			$list = $SEOHUB_GLOBALS['list_sliders'];
		else {
			$list = array(
				'swiper' => esc_html__("Posts slider (Swiper)", 'seohub')
			);
			$SEOHUB_GLOBALS['list_sliders'] = $list = apply_filters('seohub_filter_list_sliders', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return slider controls list, prepended inherit (if need)
if ( !function_exists( 'seohub_get_list_slider_controls' ) ) {
	function seohub_get_list_slider_controls($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_slider_controls']))
			$list = $SEOHUB_GLOBALS['list_slider_controls'];
		else {
			$list = array(
				'no'		=> esc_html__('None', 'seohub'),
				'side'		=> esc_html__('Side', 'seohub'),
				'bottom'	=> esc_html__('Bottom', 'seohub'),
				'pagination'=> esc_html__('Pagination', 'seohub')
				);
			$SEOHUB_GLOBALS['list_slider_controls'] = $list = apply_filters('seohub_filter_list_slider_controls', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return slider controls classes
if ( !function_exists( 'seohub_get_slider_controls_classes' ) ) {
	function seohub_get_slider_controls_classes($controls) {
		if (seohub_param_is_off($controls))	$classes = 'sc_slider_nopagination sc_slider_nocontrols';
		else if ($controls=='bottom')			$classes = 'sc_slider_nopagination sc_slider_controls sc_slider_controls_bottom';
		else if ($controls=='pagination')		$classes = 'sc_slider_pagination sc_slider_pagination_bottom sc_slider_nocontrols';
		else									$classes = 'sc_slider_nopagination sc_slider_controls sc_slider_controls_side';
		return $classes;
	}
}

// Return list with popup engines
if ( !function_exists( 'seohub_get_list_popup_engines' ) ) {
	function seohub_get_list_popup_engines($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_popup_engines']))
			$list = $SEOHUB_GLOBALS['list_popup_engines'];
		else {
			$list = array(
				"pretty"	=> esc_html__("Pretty photo", 'seohub'),
				"magnific"	=> esc_html__("Magnific popup", 'seohub')
				);
			$SEOHUB_GLOBALS['list_popup_engines'] = $list = apply_filters('seohub_filter_list_popup_engines', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return menus list, prepended inherit
if ( !function_exists( 'seohub_get_list_menus' ) ) {
	function seohub_get_list_menus($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_menus']))
			$list = $SEOHUB_GLOBALS['list_menus'];
		else {
			$list = array();
			$list['default'] = esc_html__("Default", 'seohub');
			$menus = wp_get_nav_menus();
			if (is_array($menus) && count($menus) > 0) {
				foreach ($menus as $menu) {
					$list[$menu->slug] = $menu->name;
				}
			}
			$SEOHUB_GLOBALS['list_menus'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return custom sidebars list, prepended inherit and main sidebars item (if need)
if ( !function_exists( 'seohub_get_list_sidebars' ) ) {
	function seohub_get_list_sidebars($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_sidebars'])) {
			$list = $SEOHUB_GLOBALS['list_sidebars'];
		} else {
			$list = isset($SEOHUB_GLOBALS['registered_sidebars']) ? $SEOHUB_GLOBALS['registered_sidebars'] : array();
			$SEOHUB_GLOBALS['list_sidebars'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return sidebars positions
if ( !function_exists( 'seohub_get_list_sidebars_positions' ) ) {
	function seohub_get_list_sidebars_positions($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_sidebars_positions']))
			$list = $SEOHUB_GLOBALS['list_sidebars_positions'];
		else {
			$list = array(
				'none'  => esc_html__('Hide',  'seohub'),
				'left'  => esc_html__('Left',  'seohub'),
				'right' => esc_html__('Right', 'seohub')
				);
			$SEOHUB_GLOBALS['list_sidebars_positions'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return sidebars class
if ( !function_exists( 'seohub_get_sidebar_class' ) ) {
	function seohub_get_sidebar_class() {
		$sb_main = seohub_get_custom_option('show_sidebar_main');
		$sb_outer = seohub_get_custom_option('show_sidebar_outer');
		return (seohub_param_is_off($sb_main) ? 'sidebar_hide' : 'sidebar_show sidebar_'.($sb_main))
				. ' ' . (seohub_param_is_off($sb_outer) ? 'sidebar_outer_hide' : 'sidebar_outer_show sidebar_outer_'.($sb_outer));
	}
}

// Return body styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_body_styles' ) ) {
	function seohub_get_list_body_styles($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_body_styles']))
			$list = $SEOHUB_GLOBALS['list_body_styles'];
		else {
			$list = array(
				'boxed'	=> esc_html__('Boxed',		'seohub'),
				'wide'	=> esc_html__('Wide',		'seohub')
				);
			if (seohub_get_theme_setting('allow_fullscreen')) {
				$list['fullwide']	= esc_html__('Fullwide',	'seohub');
				$list['fullscreen']	= esc_html__('Fullscreen',	'seohub');
			}
			$SEOHUB_GLOBALS['list_body_styles'] = $list = apply_filters('seohub_filter_list_body_styles', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return skins list, prepended inherit
if ( !function_exists( 'seohub_get_list_skins' ) ) {
	function seohub_get_list_skins($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_skins']))
			$list = $SEOHUB_GLOBALS['list_skins'];
		else
			$SEOHUB_GLOBALS['list_skins'] = $list = seohub_get_list_folders("skins");
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return css-themes list
if ( !function_exists( 'seohub_get_list_themes' ) ) {
	function seohub_get_list_themes($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_themes']))
			$list = $SEOHUB_GLOBALS['list_themes'];
		else
			$SEOHUB_GLOBALS['list_themes'] = $list = seohub_get_list_files("css/themes");
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return templates list, prepended inherit
if ( !function_exists( 'seohub_get_list_templates' ) ) {
	function seohub_get_list_templates($mode='') {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_templates_'.($mode)]))
			$list = $SEOHUB_GLOBALS['list_templates_'.($mode)];
		else {
			$list = array();
			if (is_array($SEOHUB_GLOBALS['registered_templates']) && count($SEOHUB_GLOBALS['registered_templates']) > 0) {
				foreach ($SEOHUB_GLOBALS['registered_templates'] as $k=>$v) {
					if ($mode=='' || seohub_strpos($v['mode'], $mode)!==false)
						$list[$k] = !empty($v['icon']) 
									? $v['icon'] 
									: (!empty($v['title']) 
										? $v['title'] 
										: seohub_strtoproper($v['layout'])
										);
				}
			}
			$SEOHUB_GLOBALS['list_templates_'.($mode)] = $list;
		}
		return $list;
	}
}

// Return blog styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_templates_blog' ) ) {
	function seohub_get_list_templates_blog($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_templates_blog']))
			$list = $SEOHUB_GLOBALS['list_templates_blog'];
		else {
			$list = seohub_get_list_templates('blog');
			$SEOHUB_GLOBALS['list_templates_blog'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return blogger styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_templates_blogger' ) ) {
	function seohub_get_list_templates_blogger($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_templates_blogger']))
			$list = $SEOHUB_GLOBALS['list_templates_blogger'];
		else {
			$list = seohub_array_merge(seohub_get_list_templates('blogger'), seohub_get_list_templates('blog'));
			$SEOHUB_GLOBALS['list_templates_blogger'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return single page styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_templates_single' ) ) {
	function seohub_get_list_templates_single($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_templates_single']))
			$list = $SEOHUB_GLOBALS['list_templates_single'];
		else {
			$list = seohub_get_list_templates('single');
			$SEOHUB_GLOBALS['list_templates_single'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return header styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_templates_header' ) ) {
	function seohub_get_list_templates_header($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_templates_header']))
			$list = $SEOHUB_GLOBALS['list_templates_header'];
		else {
			$list = seohub_get_list_templates('header');
			$SEOHUB_GLOBALS['list_templates_header'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return form styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_templates_forms' ) ) {
	function seohub_get_list_templates_forms($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_templates_forms']))
			$list = $SEOHUB_GLOBALS['list_templates_forms'];
		else {
			$list = seohub_get_list_templates('forms');
			$SEOHUB_GLOBALS['list_templates_forms'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return article styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_article_styles' ) ) {
	function seohub_get_list_article_styles($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_article_styles']))
			$list = $SEOHUB_GLOBALS['list_article_styles'];
		else {
			$list = array(
				"boxed"   => esc_html__('Boxed', 'seohub'),
				"stretch" => esc_html__('Stretch', 'seohub')
				);
			$SEOHUB_GLOBALS['list_article_styles'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return post-formats filters list, prepended inherit
if ( !function_exists( 'seohub_get_list_post_formats_filters' ) ) {
	function seohub_get_list_post_formats_filters($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_post_formats_filters']))
			$list = $SEOHUB_GLOBALS['list_post_formats_filters'];
		else {
			$list = array(
				"no"      => esc_html__('All posts', 'seohub'),
				"thumbs"  => esc_html__('With thumbs', 'seohub'),
				"reviews" => esc_html__('With reviews', 'seohub'),
				"video"   => esc_html__('With videos', 'seohub'),
				"audio"   => esc_html__('With audios', 'seohub'),
				"gallery" => esc_html__('With galleries', 'seohub')
				);
			$SEOHUB_GLOBALS['list_post_formats_filters'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return portfolio filters list, prepended inherit
if ( !function_exists( 'seohub_get_list_portfolio_filters' ) ) {
	function seohub_get_list_portfolio_filters($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_portfolio_filters']))
			$list = $SEOHUB_GLOBALS['list_portfolio_filters'];
		else {
			$list = array(
				"hide"		=> esc_html__('Hide', 'seohub'),
				"tags"		=> esc_html__('Tags', 'seohub'),
				"categories"=> esc_html__('Categories', 'seohub')
				);
			$SEOHUB_GLOBALS['list_portfolio_filters'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return hover styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_hovers' ) ) {
	function seohub_get_list_hovers($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_hovers']))
			$list = $SEOHUB_GLOBALS['list_hovers'];
		else {
			$list = array();
			$list['circle effect1']  = esc_html__('Circle Effect 1',  'seohub');
			$list['circle effect2']  = esc_html__('Circle Effect 2',  'seohub');
			$list['circle effect3']  = esc_html__('Circle Effect 3',  'seohub');
			$list['circle effect4']  = esc_html__('Circle Effect 4',  'seohub');
			$list['circle effect5']  = esc_html__('Circle Effect 5',  'seohub');
			$list['circle effect6']  = esc_html__('Circle Effect 6',  'seohub');
			$list['circle effect7']  = esc_html__('Circle Effect 7',  'seohub');
			$list['circle effect8']  = esc_html__('Circle Effect 8',  'seohub');
			$list['circle effect9']  = esc_html__('Circle Effect 9',  'seohub');
			$list['circle effect10'] = esc_html__('Circle Effect 10',  'seohub');
			$list['circle effect11'] = esc_html__('Circle Effect 11',  'seohub');
			$list['circle effect12'] = esc_html__('Circle Effect 12',  'seohub');
			$list['circle effect13'] = esc_html__('Circle Effect 13',  'seohub');
			$list['circle effect14'] = esc_html__('Circle Effect 14',  'seohub');
			$list['circle effect15'] = esc_html__('Circle Effect 15',  'seohub');
			$list['circle effect16'] = esc_html__('Circle Effect 16',  'seohub');
			$list['circle effect17'] = esc_html__('Circle Effect 17',  'seohub');
			$list['circle effect18'] = esc_html__('Circle Effect 18',  'seohub');
			$list['circle effect19'] = esc_html__('Circle Effect 19',  'seohub');
			$list['circle effect20'] = esc_html__('Circle Effect 20',  'seohub');
			$list['square effect1']  = esc_html__('Square Effect 1',  'seohub');
			$list['square effect2']  = esc_html__('Square Effect 2',  'seohub');
			$list['square effect3']  = esc_html__('Square Effect 3',  'seohub');
	//		$list['square effect4']  = esc_html__('Square Effect 4',  'seohub');
			$list['square effect5']  = esc_html__('Square Effect 5',  'seohub');
			$list['square effect6']  = esc_html__('Square Effect 6',  'seohub');
			$list['square effect7']  = esc_html__('Square Effect 7',  'seohub');
			$list['square effect8']  = esc_html__('Square Effect 8',  'seohub');
			$list['square effect9']  = esc_html__('Square Effect 9',  'seohub');
			$list['square effect10'] = esc_html__('Square Effect 10',  'seohub');
			$list['square effect11'] = esc_html__('Square Effect 11',  'seohub');
			$list['square effect12'] = esc_html__('Square Effect 12',  'seohub');
			$list['square effect13'] = esc_html__('Square Effect 13',  'seohub');
			$list['square effect14'] = esc_html__('Square Effect 14',  'seohub');
			$list['square effect15'] = esc_html__('Square Effect 15',  'seohub');
			$list['square effect_dir']   = esc_html__('Square Effect Dir',   'seohub');
			$list['square effect_shift'] = esc_html__('Square Effect Shift', 'seohub');
			$list['square effect_book']  = esc_html__('Square Effect Book',  'seohub');
			$list['square effect_more']  = esc_html__('Square Effect More',  'seohub');
			$list['square effect_fade']  = esc_html__('Square Effect Fade',  'seohub');
			$SEOHUB_GLOBALS['list_hovers'] = $list = apply_filters('seohub_filter_portfolio_hovers', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the blog counters
if ( !function_exists( 'seohub_get_list_blog_counters' ) ) {
	function seohub_get_list_blog_counters($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_blog_counters']))
			$list = $SEOHUB_GLOBALS['list_blog_counters'];
		else {
			$list = array(
				'views'		=> esc_html__('Views', 'seohub'),
				'likes'		=> esc_html__('Likes', 'seohub'),
				'rating'	=> esc_html__('Rating', 'seohub'),
				'comments'	=> esc_html__('Comments', 'seohub')
				);
			$SEOHUB_GLOBALS['list_blog_counters'] = $list = apply_filters('seohub_filter_list_blog_counters', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list of the item sizes for the portfolio alter style, prepended inherit
if ( !function_exists( 'seohub_get_list_alter_sizes' ) ) {
	function seohub_get_list_alter_sizes($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_alter_sizes']))
			$list = $SEOHUB_GLOBALS['list_alter_sizes'];
		else {
			$list = array(
					'1_1' => esc_html__('1x1', 'seohub'),
					'1_2' => esc_html__('1x2', 'seohub'),
					'2_1' => esc_html__('2x1', 'seohub'),
					'2_2' => esc_html__('2x2', 'seohub'),
					'1_3' => esc_html__('1x3', 'seohub'),
					'2_3' => esc_html__('2x3', 'seohub'),
					'3_1' => esc_html__('3x1', 'seohub'),
					'3_2' => esc_html__('3x2', 'seohub'),
					'3_3' => esc_html__('3x3', 'seohub')
					);
			$SEOHUB_GLOBALS['list_alter_sizes'] = $list = apply_filters('seohub_filter_portfolio_alter_sizes', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return extended hover directions list, prepended inherit
if ( !function_exists( 'seohub_get_list_hovers_directions' ) ) {
	function seohub_get_list_hovers_directions($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_hovers_directions']))
			$list = $SEOHUB_GLOBALS['list_hovers_directions'];
		else {
			$list = array();
			$list['left_to_right'] = esc_html__('Left to Right',  'seohub');
			$list['right_to_left'] = esc_html__('Right to Left',  'seohub');
			$list['top_to_bottom'] = esc_html__('Top to Bottom',  'seohub');
			$list['bottom_to_top'] = esc_html__('Bottom to Top',  'seohub');
			$list['scale_up']      = esc_html__('Scale Up',  'seohub');
			$list['scale_down']    = esc_html__('Scale Down',  'seohub');
			$list['scale_down_up'] = esc_html__('Scale Down-Up',  'seohub');
			$list['from_left_and_right'] = esc_html__('From Left and Right',  'seohub');
			$list['from_top_and_bottom'] = esc_html__('From Top and Bottom',  'seohub');
			$SEOHUB_GLOBALS['list_hovers_directions'] = $list = apply_filters('seohub_filter_portfolio_hovers_directions', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the label positions in the custom forms
if ( !function_exists( 'seohub_get_list_label_positions' ) ) {
	function seohub_get_list_label_positions($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_label_positions']))
			$list = $SEOHUB_GLOBALS['list_label_positions'];
		else {
			$list = array();
			$list['top']	= esc_html__('Top',		'seohub');
			$list['bottom']	= esc_html__('Bottom',		'seohub');
			$list['left']	= esc_html__('Left',		'seohub');
			$list['over']	= esc_html__('Over',		'seohub');
			$SEOHUB_GLOBALS['list_label_positions'] = $list = apply_filters('seohub_filter_label_positions', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the bg image positions
if ( !function_exists( 'seohub_get_list_bg_image_positions' ) ) {
	function seohub_get_list_bg_image_positions($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_bg_image_positions']))
			$list = $SEOHUB_GLOBALS['list_bg_image_positions'];
		else {
			$list = array();
			$list['left top']	  = esc_html__('Left Top', 'seohub');
			$list['center top']   = esc_html__("Center Top", 'seohub');
			$list['right top']    = esc_html__("Right Top", 'seohub');
			$list['left center']  = esc_html__("Left Center", 'seohub');
			$list['center center']= esc_html__("Center Center", 'seohub');
			$list['right center'] = esc_html__("Right Center", 'seohub');
			$list['left bottom']  = esc_html__("Left Bottom", 'seohub');
			$list['center bottom']= esc_html__("Center Bottom", 'seohub');
			$list['right bottom'] = esc_html__("Right Bottom", 'seohub');
			$SEOHUB_GLOBALS['list_bg_image_positions'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the bg image repeat
if ( !function_exists( 'seohub_get_list_bg_image_repeats' ) ) {
	function seohub_get_list_bg_image_repeats($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_bg_image_repeats']))
			$list = $SEOHUB_GLOBALS['list_bg_image_repeats'];
		else {
			$list = array();
			$list['repeat']	  = esc_html__('Repeat', 'seohub');
			$list['repeat-x'] = esc_html__('Repeat X', 'seohub');
			$list['repeat-y'] = esc_html__('Repeat Y', 'seohub');
			$list['no-repeat']= esc_html__('No Repeat', 'seohub');
			$SEOHUB_GLOBALS['list_bg_image_repeats'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the bg image attachment
if ( !function_exists( 'seohub_get_list_bg_image_attachments' ) ) {
	function seohub_get_list_bg_image_attachments($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_bg_image_attachments']))
			$list = $SEOHUB_GLOBALS['list_bg_image_attachments'];
		else {
			$list = array();
			$list['scroll']	= esc_html__('Scroll', 'seohub');
			$list['fixed']	= esc_html__('Fixed', 'seohub');
			$list['local']	= esc_html__('Local', 'seohub');
			$SEOHUB_GLOBALS['list_bg_image_attachments'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}


// Return list of the bg tints
if ( !function_exists( 'seohub_get_list_bg_tints' ) ) {
	function seohub_get_list_bg_tints($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_bg_tints']))
			$list = $SEOHUB_GLOBALS['list_bg_tints'];
		else {
			$list = array();
			$list['white']	= esc_html__('White', 'seohub');
			$list['light']	= esc_html__('Light', 'seohub');
			$list['dark']	= esc_html__('Dark', 'seohub');
			$SEOHUB_GLOBALS['list_bg_tints'] = $list = apply_filters('seohub_filter_bg_tints', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return custom fields types list, prepended inherit
if ( !function_exists( 'seohub_get_list_field_types' ) ) {
	function seohub_get_list_field_types($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_field_types']))
			$list = $SEOHUB_GLOBALS['list_field_types'];
		else {
			$list = array();
			$list['text']     = esc_html__('Text',  'seohub');
			$list['textarea'] = esc_html__('Text Area','seohub');
			$list['password'] = esc_html__('Password',  'seohub');
			$list['radio']    = esc_html__('Radio',  'seohub');
			$list['checkbox'] = esc_html__('Checkbox',  'seohub');
			$list['select']   = esc_html__('Select',  'seohub');
			$list['date']     = esc_html__('Date','seohub');
			$list['time']     = esc_html__('Time','seohub');
			$list['button']   = esc_html__('Button','seohub');
			$SEOHUB_GLOBALS['list_field_types'] = $list = apply_filters('seohub_filter_field_types', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return Google map styles
if ( !function_exists( 'seohub_get_list_googlemap_styles' ) ) {
	function seohub_get_list_googlemap_styles($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_googlemap_styles']))
			$list = $SEOHUB_GLOBALS['list_googlemap_styles'];
		else {
			$list = array();
			$list['default'] = esc_html__('Default', 'seohub');
			$list['simple'] = esc_html__('Simple', 'seohub');
			$list['greyscale'] = esc_html__('Greyscale', 'seohub');
			$list['greyscale2'] = esc_html__('Greyscale 2', 'seohub');
			$list['invert'] = esc_html__('Invert', 'seohub');
			$list['dark'] = esc_html__('Dark', 'seohub');
			$list['style1'] = esc_html__('Custom style 1', 'seohub');
			$list['style2'] = esc_html__('Custom style 2', 'seohub');
			$list['style3'] = esc_html__('Custom style 3', 'seohub');
			$SEOHUB_GLOBALS['list_googlemap_styles'] = $list = apply_filters('seohub_filter_googlemap_styles', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return iconed classes list
if ( !function_exists( 'seohub_get_list_icons' ) ) {
	function seohub_get_list_icons($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_icons']))
			$list = $SEOHUB_GLOBALS['list_icons'];
		else
			$SEOHUB_GLOBALS['list_icons'] = $list = seohub_parse_icons_classes(seohub_get_file_dir("css/fontello/css/fontello-codes.css"));
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return socials list
if ( !function_exists( 'seohub_get_list_socials' ) ) {
	function seohub_get_list_socials($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_socials']))
			$list = $SEOHUB_GLOBALS['list_socials'];
		else
			$SEOHUB_GLOBALS['list_socials'] = $list = seohub_get_list_files("images/socials", "png");
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return flags list
if ( !function_exists( 'seohub_get_list_flags' ) ) {
	function seohub_get_list_flags($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_flags']))
			$list = $SEOHUB_GLOBALS['list_flags'];
		else
			$SEOHUB_GLOBALS['list_flags'] = $list = seohub_get_list_files("images/flags", "png");
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with 'Yes' and 'No' items
if ( !function_exists( 'seohub_get_list_yesno' ) ) {
	function seohub_get_list_yesno($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_yesno']))
			$list = $SEOHUB_GLOBALS['list_yesno'];
		else {
			$list = array();
			$list["yes"] = esc_html__("Yes", 'seohub');
			$list["no"]  = esc_html__("No", 'seohub');
			$SEOHUB_GLOBALS['list_yesno'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with 'On' and 'Of' items
if ( !function_exists( 'seohub_get_list_onoff' ) ) {
	function seohub_get_list_onoff($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_onoff']))
			$list = $SEOHUB_GLOBALS['list_onoff'];
		else {
			$list = array();
			$list["on"] = esc_html__("On", 'seohub');
			$list["off"] = esc_html__("Off", 'seohub');
			$SEOHUB_GLOBALS['list_onoff'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with 'Show' and 'Hide' items
if ( !function_exists( 'seohub_get_list_showhide' ) ) {
	function seohub_get_list_showhide($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_showhide']))
			$list = $SEOHUB_GLOBALS['list_showhide'];
		else {
			$list = array();
			$list["show"] = esc_html__("Show", 'seohub');
			$list["hide"] = esc_html__("Hide", 'seohub');
			$SEOHUB_GLOBALS['list_showhide'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with 'Ascending' and 'Descending' items
if ( !function_exists( 'seohub_get_list_orderings' ) ) {
	function seohub_get_list_orderings($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_orderings']))
			$list = $SEOHUB_GLOBALS['list_orderings'];
		else {
			$list = array();
			$list["asc"] = esc_html__("Ascending", 'seohub');
			$list["desc"] = esc_html__("Descending", 'seohub');
			$SEOHUB_GLOBALS['list_orderings'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with 'Horizontal' and 'Vertical' items
if ( !function_exists( 'seohub_get_list_directions' ) ) {
	function seohub_get_list_directions($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_directions']))
			$list = $SEOHUB_GLOBALS['list_directions'];
		else {
			$list = array();
			$list["horizontal"] = esc_html__("Horizontal", 'seohub');
			$list["vertical"] = esc_html__("Vertical", 'seohub');
			$SEOHUB_GLOBALS['list_directions'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with item's shapes
if ( !function_exists( 'seohub_get_list_shapes' ) ) {
	function seohub_get_list_shapes($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_shapes']))
			$list = $SEOHUB_GLOBALS['list_shapes'];
		else {
			$list = array();
			$list["round"]  = esc_html__("Round", 'seohub');
			$list["square"] = esc_html__("Square", 'seohub');
			$SEOHUB_GLOBALS['list_shapes'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with item's sizes
if ( !function_exists( 'seohub_get_list_sizes' ) ) {
	function seohub_get_list_sizes($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_sizes']))
			$list = $SEOHUB_GLOBALS['list_sizes'];
		else {
			$list = array();
			$list["tiny"]   = esc_html__("Tiny", 'seohub');
			$list["small"]  = esc_html__("Small", 'seohub');
			$list["medium"] = esc_html__("Medium", 'seohub');
			$list["large"]  = esc_html__("Large", 'seohub');
			$SEOHUB_GLOBALS['list_sizes'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with float items
if ( !function_exists( 'seohub_get_list_floats' ) ) {
	function seohub_get_list_floats($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_floats']))
			$list = $SEOHUB_GLOBALS['list_floats'];
		else {
			$list = array();
			$list["none"] = esc_html__("None", 'seohub');
			$list["left"] = esc_html__("Float Left", 'seohub');
			$list["right"] = esc_html__("Float Right", 'seohub');
			$SEOHUB_GLOBALS['list_floats'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with alignment items
if ( !function_exists( 'seohub_get_list_alignments' ) ) {
	function seohub_get_list_alignments($justify=false, $prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_alignments']))
			$list = $SEOHUB_GLOBALS['list_alignments'];
		else {
			$list = array();
			$list["none"] = esc_html__("None", 'seohub');
			$list["left"] = esc_html__("Left", 'seohub');
			$list["center"] = esc_html__("Center", 'seohub');
			$list["right"] = esc_html__("Right", 'seohub');
			if ($justify) $list["justify"] = esc_html__("Justify", 'seohub');
			$SEOHUB_GLOBALS['list_alignments'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return sorting list items
if ( !function_exists( 'seohub_get_list_sortings' ) ) {
	function seohub_get_list_sortings($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_sortings']))
			$list = $SEOHUB_GLOBALS['list_sortings'];
		else {
			$list = array();
			$list["date"] = esc_html__("Date", 'seohub');
			$list["title"] = esc_html__("Alphabetically", 'seohub');
			$list["views"] = esc_html__("Popular (views count)", 'seohub');
			$list["comments"] = esc_html__("Most commented (comments count)", 'seohub');
			$list["author_rating"] = esc_html__("Author rating", 'seohub');
			$list["users_rating"] = esc_html__("Visitors (users) rating", 'seohub');
			$list["random"] = esc_html__("Random", 'seohub');
			$SEOHUB_GLOBALS['list_sortings'] = $list = apply_filters('seohub_filter_list_sortings', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list with columns widths
if ( !function_exists( 'seohub_get_list_columns' ) ) {
	function seohub_get_list_columns($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_columns']))
			$list = $SEOHUB_GLOBALS['list_columns'];
		else {
			$list = array();
			$list["none"] = esc_html__("None", 'seohub');
			$list["1_1"] = esc_html__("100%", 'seohub');
			$list["1_2"] = esc_html__("1/2", 'seohub');
			$list["1_3"] = esc_html__("1/3", 'seohub');
			$list["2_3"] = esc_html__("2/3", 'seohub');
			$list["1_4"] = esc_html__("1/4", 'seohub');
			$list["3_4"] = esc_html__("3/4", 'seohub');
			$list["1_5"] = esc_html__("1/5", 'seohub');
			$list["2_5"] = esc_html__("2/5", 'seohub');
			$list["3_5"] = esc_html__("3/5", 'seohub');
			$list["4_5"] = esc_html__("4/5", 'seohub');
			$list["1_6"] = esc_html__("1/6", 'seohub');
			$list["5_6"] = esc_html__("5/6", 'seohub');
			$list["1_7"] = esc_html__("1/7", 'seohub');
			$list["2_7"] = esc_html__("2/7", 'seohub');
			$list["3_7"] = esc_html__("3/7", 'seohub');
			$list["4_7"] = esc_html__("4/7", 'seohub');
			$list["5_7"] = esc_html__("5/7", 'seohub');
			$list["6_7"] = esc_html__("6/7", 'seohub');
			$list["1_8"] = esc_html__("1/8", 'seohub');
			$list["3_8"] = esc_html__("3/8", 'seohub');
			$list["5_8"] = esc_html__("5/8", 'seohub');
			$list["7_8"] = esc_html__("7/8", 'seohub');
			$list["1_9"] = esc_html__("1/9", 'seohub');
			$list["2_9"] = esc_html__("2/9", 'seohub');
			$list["4_9"] = esc_html__("4/9", 'seohub');
			$list["5_9"] = esc_html__("5/9", 'seohub');
			$list["7_9"] = esc_html__("7/9", 'seohub');
			$list["8_9"] = esc_html__("8/9", 'seohub');
			$list["1_10"]= esc_html__("1/10", 'seohub');
			$list["3_10"]= esc_html__("3/10", 'seohub');
			$list["7_10"]= esc_html__("7/10", 'seohub');
			$list["9_10"]= esc_html__("9/10", 'seohub');
			$list["1_11"]= esc_html__("1/11", 'seohub');
			$list["2_11"]= esc_html__("2/11", 'seohub');
			$list["3_11"]= esc_html__("3/11", 'seohub');
			$list["4_11"]= esc_html__("4/11", 'seohub');
			$list["5_11"]= esc_html__("5/11", 'seohub');
			$list["6_11"]= esc_html__("6/11", 'seohub');
			$list["7_11"]= esc_html__("7/11", 'seohub');
			$list["8_11"]= esc_html__("8/11", 'seohub');
			$list["9_11"]= esc_html__("9/11", 'seohub');
			$list["10_11"]= esc_html__("10/11", 'seohub');
			$list["1_12"]= esc_html__("1/12", 'seohub');
			$list["5_12"]= esc_html__("5/12", 'seohub');
			$list["7_12"]= esc_html__("7/12", 'seohub');
			$list["10_12"]= esc_html__("10/12", 'seohub');
			$list["11_12"]= esc_html__("11/12", 'seohub');
			$SEOHUB_GLOBALS['list_columns'] = $list = apply_filters('seohub_filter_list_columns', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return list of locations for the dedicated content
if ( !function_exists( 'seohub_get_list_dedicated_locations' ) ) {
	function seohub_get_list_dedicated_locations($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_dedicated_locations']))
			$list = $SEOHUB_GLOBALS['list_dedicated_locations'];
		else {
			$list = array();
			$list["default"] = esc_html__('As in the post defined', 'seohub');
			$list["center"]  = esc_html__('Above the text of the post', 'seohub');
			$list["left"]    = esc_html__('To the left the text of the post', 'seohub');
			$list["right"]   = esc_html__('To the right the text of the post', 'seohub');
			$list["alter"]   = esc_html__('Alternates for each post', 'seohub');
			$SEOHUB_GLOBALS['list_dedicated_locations'] = $list = apply_filters('seohub_filter_list_dedicated_locations', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return post-format name
if ( !function_exists( 'seohub_get_post_format_name' ) ) {
	function seohub_get_post_format_name($format, $single=true) {
		$name = '';
		if ($format=='gallery')		$name = $single ? esc_html__('gallery', 'seohub') : esc_html__('galleries', 'seohub');
		else if ($format=='video')	$name = $single ? esc_html__('video', 'seohub') : esc_html__('videos', 'seohub');
		else if ($format=='audio')	$name = $single ? esc_html__('audio', 'seohub') : esc_html__('audios', 'seohub');
		else if ($format=='image')	$name = $single ? esc_html__('image', 'seohub') : esc_html__('images', 'seohub');
		else if ($format=='quote')	$name = $single ? esc_html__('quote', 'seohub') : esc_html__('quotes', 'seohub');
		else if ($format=='link')	$name = $single ? esc_html__('link', 'seohub') : esc_html__('links', 'seohub');
		else if ($format=='status')	$name = $single ? esc_html__('status', 'seohub') : esc_html__('statuses', 'seohub');
		else if ($format=='aside')	$name = $single ? esc_html__('aside', 'seohub') : esc_html__('asides', 'seohub');
		else if ($format=='chat')	$name = $single ? esc_html__('chat', 'seohub') : esc_html__('chats', 'seohub');
		else						$name = $single ? esc_html__('standard', 'seohub') : esc_html__('standards', 'seohub');
		return apply_filters('seohub_filter_list_post_format_name', $name, $format);
	}
}

// Return post-format icon name (from Fontello library)
if ( !function_exists( 'seohub_get_post_format_icon' ) ) {
	function seohub_get_post_format_icon($format) {
		$icon = 'icon-';
		if ($format=='gallery')		$icon .= 'pictures';
		else if ($format=='video')	$icon .= 'video';
		else if ($format=='audio')	$icon .= 'note';
		else if ($format=='image')	$icon .= 'picture';
		else if ($format=='quote')	$icon .= 'quote';
		else if ($format=='link')	$icon .= 'link';
		else if ($format=='status')	$icon .= 'comment';
		else if ($format=='aside')	$icon .= 'doc-text';
		else if ($format=='chat')	$icon .= 'chat';
		else						$icon .= 'book-open';
		return apply_filters('seohub_filter_list_post_format_icon', $icon, $format);
	}
}

// Return fonts styles list, prepended inherit
if ( !function_exists( 'seohub_get_list_fonts_styles' ) ) {
	function seohub_get_list_fonts_styles($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_fonts_styles']))
			$list = $SEOHUB_GLOBALS['list_fonts_styles'];
		else {
			$list = array();
			$list['i'] = esc_html__('I','seohub');
			$list['u'] = esc_html__('U', 'seohub');
			$SEOHUB_GLOBALS['list_fonts_styles'] = $list;
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return Google fonts list
if ( !function_exists( 'seohub_get_list_fonts' ) ) {
	function seohub_get_list_fonts($prepend_inherit=false) {
		global $SEOHUB_GLOBALS;
		if (isset($SEOHUB_GLOBALS['list_fonts']))
			$list = $SEOHUB_GLOBALS['list_fonts'];
		else {
			$list = array();
			$list = seohub_array_merge($list, seohub_get_list_font_faces());
			// Google and custom fonts list:
			//$list['Advent Pro'] = array(
			//		'family'=>'sans-serif',																						// (required) font family
			//		'link'=>'Advent+Pro:100,100italic,300,300italic,400,400italic,500,500italic,700,700italic,900,900italic',	// (optional) if you use Google font repository
			//		'css'=>seohub_get_file_url('/css/font-face/Advent-Pro/stylesheet.css')									// (optional) if you use custom font-face
			//		);
			$list['Advent Pro'] = array('family'=>'sans-serif');
			$list['Alegreya Sans'] = array('family'=>'sans-serif');
			$list['Arimo'] = array('family'=>'sans-serif');
			$list['Asap'] = array('family'=>'sans-serif');
			$list['Averia Sans Libre'] = array('family'=>'cursive');
			$list['Averia Serif Libre'] = array('family'=>'cursive');
			$list['Bree Serif'] = array('family'=>'serif',);
			$list['Cabin'] = array('family'=>'sans-serif');
			$list['Cabin Condensed'] = array('family'=>'sans-serif');
			$list['Caudex'] = array('family'=>'serif');
			$list['Comfortaa'] = array('family'=>'cursive');
			$list['Cousine'] = array('family'=>'sans-serif');
			$list['Crimson Text'] = array('family'=>'serif');
			$list['Cuprum'] = array('family'=>'sans-serif');
			$list['Dosis'] = array('family'=>'sans-serif');
			$list['Economica'] = array('family'=>'sans-serif');
			$list['Exo'] = array('family'=>'sans-serif');
			$list['Expletus Sans'] = array('family'=>'cursive');
			$list['Karla'] = array('family'=>'sans-serif');
			$list['Lato'] = array('family'=>'sans-serif');
			$list['Lekton'] = array('family'=>'sans-serif');
			$list['Lobster Two'] = array('family'=>'cursive');
			$list['Maven Pro'] = array('family'=>'sans-serif');
			$list['Merriweather'] = array('family'=>'serif');
			$list['Montserrat'] = array('family'=>'sans-serif');
			$list['Neuton'] = array('family'=>'serif');
			$list['Noticia Text'] = array('family'=>'serif');
			$list['Old Standard TT'] = array('family'=>'serif');
			$list['Open Sans'] = array('family'=>'sans-serif');
			$list['Orbitron'] = array('family'=>'sans-serif');
			$list['Oswald'] = array('family'=>'sans-serif');
			$list['Overlock'] = array('family'=>'cursive');
			$list['Oxygen'] = array('family'=>'sans-serif');
			$list['Philosopher'] = array('family'=>'serif');
			$list['PT Serif'] = array('family'=>'serif');
			$list['Puritan'] = array('family'=>'sans-serif');
			$list['Raleway'] = array('family'=>'sans-serif');
			$list['Roboto'] = array('family'=>'sans-serif');
			$list['Roboto Slab'] = array('family'=>'sans-serif');
			$list['Roboto Condensed'] = array('family'=>'sans-serif');
			$list['Rosario'] = array('family'=>'sans-serif');
			$list['Share'] = array('family'=>'cursive');
			$list['Signika'] = array('family'=>'sans-serif');
			$list['Signika Negative'] = array('family'=>'sans-serif');
			$list['Source Sans Pro'] = array('family'=>'sans-serif');
			$list['Tinos'] = array('family'=>'serif');
			$list['Ubuntu'] = array('family'=>'sans-serif');
			$list['Vollkorn'] = array('family'=>'serif');
			$SEOHUB_GLOBALS['list_fonts'] = $list = apply_filters('seohub_filter_list_fonts', $list);
		}
		return $prepend_inherit ? seohub_array_merge(array('inherit' => esc_html__("Inherit", 'seohub')), $list) : $list;
	}
}

// Return Custom font-face list
if ( !function_exists( 'seohub_get_list_font_faces' ) ) {
	function seohub_get_list_font_faces($prepend_inherit=false) {
		static $list = false;
		if (is_array($list)) return $list;
		$list = array();
		$dir = seohub_get_folder_dir("css/font-face");
		if ( is_dir($dir) ) {
			$hdir = @ opendir( $dir );
			if ( $hdir ) {
				while (($file = readdir( $hdir ) ) !== false ) {
					$pi = pathinfo( ($dir) . '/' . ($file) );
					if ( substr($file, 0, 1) == '.' || ! is_dir( ($dir) . '/' . ($file) ) )
						continue;
					$css = file_exists( ($dir) . '/' . ($file) . '/' . ($file) . '.css' ) 
						? seohub_get_folder_url("css/font-face/".($file).'/'.($file).'.css')
						: (file_exists( ($dir) . '/' . ($file) . '/stylesheet.css' ) 
							? seohub_get_folder_url("css/font-face/".($file).'/stylesheet.css')
							: '');
					if ($css != '')
						$list[$file.' ('.esc_html__('uploaded font', 'seohub').')'] = array('css' => $css);
				}
				@closedir( $hdir );
			}
		}
		return $list;
	}
}
?>