<?php
function add_my_awesome_widgets_collection($folders){
    $folders[] = ImicFrameworkPath . '/page-builder/widgets/';
    return $folders;
}
add_filter('siteorigin_widgets_widget_folders', 'add_my_awesome_widgets_collection');

function nativechurch_add_widget_tabs($tabs) {
    $tabs[] = array(
        'title' => __('Gaea Theme Widgets', 'framework'),
        'filter' => array(
            'groups' => array('framework')
        )
    );

    return $tabs;
}
add_filter('siteorigin_panels_widget_dialog_tabs', 'nativechurch_add_widget_tabs', 30);


if(!function_exists('imic_prebuilt_pages')) {
function imic_prebuilt_pages($layouts){
    $layouts['home1'] = array(
        // We'll add a title field
        'name' => __('Home version 1', 'framework'),
  'widgets' => 
  array (
    0 => 
    array (
      'tab_id' => 67,
      'tabs' => 
      array (
        0 => 
        array (
          'tab_nav_title' => 'Our Mission',
          'tab_nav_content' => '<p></p>
<img class="alignright size-full wp-image-10" style="margin-top: -20px" src="http://preview.imithemes.com/gaea-wp/wp-content/uploads/2014/09/img_mission.jpg" alt="img_mission" />
<p class="lead">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel.</p>',
        ),
        1 => 
        array (
          'tab_nav_title' => 'Why you should join us',
          'tab_nav_content' => '<p></p>
[container extra="row"]
[one_third extra="" anim=""]

[icon_box icon_image="fa-globe" title="To make the planet lively" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel." type="label-info"]

[/one_third]
[one_third extra="" anim=""]

[icon_box icon_image="fa-umbrella" title="To save the Rain Water" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel." type="label-warning"]

[/one_third]
[one_third extra="" anim=""]

[icon_box icon_image="fa-pagelines" title="To make Forests Greener" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel." type="label-success"]

[/one_third]

[/container]',
        ),
      ),
      'display_type' => 'horizontal',
      'panels_info' => 
      array (
        'class' => 'Tabs_Widget',
        'raw' => false,
        'grid' => 0,
        'cell' => 0,
        'id' => 0,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    1 => 
    array (
      'title' => '<i class="fa fa-folder"></i> Latest Posts',
      'allpostsbtn' => 'Visit Blog',
      'allpostsurl' => '#',
      'categories' => '',
      'number_of_posts' => 2,
      'show_post_meta' => true,
      'excerpt_length' => true,
      'read_more_text' => 'Continue reading',
      'listing_layout' => 
      array (
        'layout_type' => 'list',
        'grid_column' => false,
      ),
      'panels_info' => 
      array (
        'class' => 'Posts_List_Widget',
        'raw' => false,
        'grid' => 1,
        'cell' => 0,
        'id' => 1,
        'style' => 
        array (
          'class' => 'border-right padding-tb45',
          'background_display' => 'tile',
        ),
      ),
    ),
    2 => 
    array (
      'title' => ' Upcoming Events',
      'number' => '4',
      'category' => '',
      'status' => 'future',
      'url' => '#',
      'panels_info' => 
      array (
        'class' => 'upcoming_events',
        'raw' => false,
        'grid' => 1,
        'cell' => 1,
        'id' => 2,
        'style' => 
        array (
          'class' => 'padding-tb45',
          'background_display' => 'tile',
        ),
      ),
    ),
    3 => 
    array (
      'panels_data' => 
      array (
        'widgets' => 
        array (
          0 => 
          array (
            'title' => '<small>Mission</small>Partners',
            'allpostsbtn' => 'All partners',
            'allpostsurl' => '#',
            'panels_info' => 
            array (
              'class' => 'Title_Widget',
              'raw' => false,
              'grid' => 0,
              'cell' => 0,
              'id' => 0,
              'style' => 
              array (
                'class' => '',
                'widget_css' => '',
                'padding' => '',
                'background' => '',
                'background_image_attachment' => '0',
                'background_display' => 'tile',
                'border_color' => '',
                'font_color' => '',
              ),
            ),
          ),
          1 => 
          array (
            'title' => '',
            'text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem.',
            'panels_info' => 
            array (
              'class' => 'WP_Widget_Text',
              'raw' => false,
              'grid' => 1,
              'cell' => 0,
              'id' => 1,
              'style' => 
              array (
                'class' => '',
                'widget_css' => '',
                'padding' => '',
                'background' => '',
                'background_image_attachment' => '0',
                'background_display' => 'tile',
                'border_color' => '',
                'font_color' => '',
              ),
            ),
          ),
          2 => 
          array (
            'title' => '',
            'allpostsbtn' => 'Button',
            'allpostsurl' => '',
            'images' => 
            array (
              0 => 
              array (
                'icon_image' => '63',
                'icon_title' => '',
                'more_url' => '',
              ),
              1 => 
              array (
                'icon_image' => '62',
                'icon_title' => '',
                'more_url' => '',
              ),
              2 => 
              array (
                'icon_image' => '61',
                'icon_title' => '',
                'more_url' => '',
              ),
              3 => 
              array (
                'icon_image' => '60',
                'icon_title' => '',
                'more_url' => '',
              ),
              4 => 
              array (
                'icon_image' => '59',
                'icon_title' => '',
                'more_url' => '',
              ),
            ),
            'number_of_posts' => '4',
            'display_type' => 'carousel',
            'autoplay' => 'default',
            'navigation' => 'no',
            'pagination' => 'yes',
            'panels_info' => 
            array (
              'class' => 'Carousel_Widget',
              'raw' => false,
              'grid' => 1,
              'cell' => 1,
              'id' => 2,
              'style' => 
              array (
                'class' => '',
                'widget_css' => '',
                'padding' => '',
                'background' => '',
                'background_image_attachment' => '0',
                'background_display' => 'tile',
                'border_color' => '',
                'font_color' => '',
              ),
            ),
          ),
        ),
        'grids' => 
        array (
          0 => 
          array (
            'cells' => 1,
            'style' => 
            array (
              'class' => '',
              'cell_class' => '',
              'row_css' => '',
              'bottom_margin' => '0px',
              'gutter' => '',
              'padding' => '',
              'row_stretch' => '',
              'background' => '',
              'background_image_attachment' => '0',
              'background_display' => 'tile',
              'border_color' => '',
            ),
          ),
          1 => 
          array (
            'cells' => 2,
            'style' => 
            array (
            ),
          ),
        ),
        'grid_cells' => 
        array (
          0 => 
          array (
            'grid' => 0,
            'weight' => 1,
          ),
          1 => 
          array (
            'grid' => 1,
            'weight' => 0.250415973377999978577435058468836359679698944091796875,
          ),
          2 => 
          array (
            'grid' => 1,
            'weight' => 0.7495840266219999659114137102733366191387176513671875,
          ),
        ),
      ),
      'builder_id' => '555b39e99d730',
      'panels_info' => 
      array (
        'class' => 'SiteOrigin_Panels_Widgets_Layout',
        'raw' => false,
        'grid' => 2,
        'cell' => 0,
        'id' => 3,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    4 => 
    array (
      'title' => '<small>Featured</small> Projects',
      'allpostsbtn' => '',
      'allpostsurl' => '',
      'categories' => '',
      'number_of_posts' => 3,
      'show_post_meta' => true,
      'grid_column' => '4',
      'panels_info' => 
      array (
        'class' => 'Featured_Projects_Widget',
        'raw' => false,
        'grid' => 3,
        'cell' => 0,
        'id' => 4,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
  ),
  'grids' => 
  array (
    0 => 
    array (
      'cells' => 1,
      'style' => 
      array (
        'class' => 'no-top-content-padding border-bottom wave-bg',
        'bottom_margin' => '0px',
        'padding' => '60px',
        'row_stretch' => 'full',
        'background' => '#fafafa',
        'background_display' => 'tile',
      ),
    ),
    1 => 
    array (
      'cells' => 2,
      'style' => 
      array (
        'bottom_margin' => '0px',
        'background_display' => 'tile',
      ),
    ),
    2 => 
    array (
      'cells' => 1,
      'style' => 
      array (
        'class' => 'border-top wave-bg',
        'bottom_margin' => '0px',
        'padding' => '60px',
        'row_stretch' => 'full',
        'background' => '#fafafa',
        'background_display' => 'tile',
      ),
    ),
    3 => 
    array (
      'cells' => 1,
      'style' => 
      array (
        'class' => 'no-bottom-content-padding secondary-color-bg dark-bg no-title-border',
        'bottom_margin' => '0px',
        'padding' => '60px',
        'row_stretch' => 'full',
        'background_display' => 'tile',
      ),
    ),
  ),
  'grid_cells' => 
  array (
    0 => 
    array (
      'grid' => 0,
      'weight' => 1,
    ),
    1 => 
    array (
      'grid' => 1,
      'weight' => 0.66722129783700001581792093929834663867950439453125,
    ),
    2 => 
    array (
      'grid' => 1,
      'weight' => 0.33277870216299998418207906070165336132049560546875,
    ),
    3 => 
    array (
      'grid' => 2,
      'weight' => 1,
    ),
    4 => 
    array (
      'grid' => 3,
      'weight' => 1,
    ),
  ),

    );
	
	$layouts['home2'] = array(
        // We'll add a title field
        'name' => __('Home version 2', 'framework'),
  'widgets' => 
  array (
    0 => 
    array (
      'title' => '',
      'text' => '[icon_box icon_image="fa-globe" title="To make the planet lively" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel." type="label-info"]',
      'filter' => true,
      'panels_info' => 
      array (
        'class' => 'WP_Widget_Text',
        'raw' => false,
        'grid' => 0,
        'cell' => 0,
        'id' => 0,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    1 => 
    array (
      'title' => '',
      'text' => '[icon_box icon_image="fa-umbrella" title="To save the Rain Water" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel." type="label-warning"]',
      'filter' => true,
      'panels_info' => 
      array (
        'class' => 'WP_Widget_Text',
        'raw' => false,
        'grid' => 0,
        'cell' => 1,
        'id' => 1,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    2 => 
    array (
      'title' => '',
      'text' => '[icon_box icon_image="fa-pagelines" title="To make Forests Greener" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis egestas rhoncus. Donec facilisis fermentum sem, ac viverra ante luctus vel." type="label-success"]',
      'filter' => true,
      'panels_info' => 
      array (
        'class' => 'WP_Widget_Text',
        'raw' => false,
        'grid' => 0,
        'cell' => 2,
        'id' => 2,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    3 => 
    array (
      'title' => 'Products',
      'number' => '5',
      'show' => '',
      'orderby' => 'date',
      'order' => 'desc',
      'hide_free' => 0,
      'show_hidden' => 0,
      'panels_info' => 
      array (
        'class' => 'WC_Widget_Products',
        'raw' => false,
        'grid' => 1,
        'cell' => 0,
        'id' => 3,
        'style' => 
        array (
          'class' => 'border-right padding-tb45',
          'background_display' => 'tile',
        ),
      ),
    ),
    4 => 
    array (
      'height' => '45px',
      'panels_info' => 
      array (
        'class' => 'Spacer_Widget',
        'raw' => false,
        'grid' => 1,
        'cell' => 1,
        'id' => 4,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    5 => 
    array (
      'title' => 'Instagram Gallery',
      'username' => '',
      'count' => '6',
      'accessToken' => '',
      'panels_info' => 
      array (
        'class' => 'insta_gallery',
        'raw' => false,
        'grid' => 1,
        'cell' => 1,
        'id' => 5,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    6 => 
    array (
      'title' => 'Cart',
      'hide_if_empty' => 0,
      'panels_info' => 
      array (
        'class' => 'WC_Widget_Cart',
        'raw' => false,
        'grid' => 1,
        'cell' => 1,
        'id' => 6,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
    7 => 
    array (
      'title' => '<small>Featured</small>Projects',
      'allpostsbtn' => 'All Projects',
      'allpostsurl' => '#',
      'categories' => '',
      'number_of_posts' => 3,
      'show_post_meta' => true,
      'grid_column' => '4',
      'panels_info' => 
      array (
        'class' => 'Featured_Projects_Widget',
        'raw' => false,
        'grid' => 2,
        'cell' => 0,
        'id' => 7,
        'style' => 
        array (
          'background_display' => 'tile',
        ),
      ),
    ),
  ),
  'grids' => 
  array (
    0 => 
    array (
      'cells' => 3,
      'style' => 
      array (
        'class' => 'wave-bg no-top-content-padding border-bottom',
        'bottom_margin' => '0px',
        'padding' => '60px',
        'row_stretch' => 'full',
        'background' => '#fafafa',
        'background_display' => 'tile',
      ),
    ),
    1 => 
    array (
      'cells' => 2,
      'style' => 
      array (
        'class' => 'border-bottom',
        'bottom_margin' => '0px',
        'background_display' => 'tile',
      ),
    ),
    2 => 
    array (
      'cells' => 1,
      'style' => 
      array (
        'class' => 'secondary-color-bg dark-bg no-bottom-content-padding',
        'bottom_margin' => '0px',
        'padding' => '60px',
        'row_stretch' => 'full',
        'background_image_attachment' => false,
        'background_display' => 'tile',
      ),
    ),
  ),
  'grid_cells' => 
  array (
    0 => 
    array (
      'grid' => 0,
      'weight' => 0.333333333333333314829616256247390992939472198486328125,
    ),
    1 => 
    array (
      'grid' => 0,
      'weight' => 0.333333333333333314829616256247390992939472198486328125,
    ),
    2 => 
    array (
      'grid' => 0,
      'weight' => 0.333333333333333314829616256247390992939472198486328125,
    ),
    3 => 
    array (
      'grid' => 1,
      'weight' => 0.66722129783700001581792093929834663867950439453125,
    ),
    4 => 
    array (
      'grid' => 1,
      'weight' => 0.33277870216299998418207906070165336132049560546875,
    ),
    5 => 
    array (
      'grid' => 2,
      'weight' => 1,
    ),
  ),

    );
	
    return $layouts;

}
add_filter('siteorigin_panels_prebuilt_layouts','imic_prebuilt_pages');
}
?>