sliders = array( 'layer' => Mfn_Builder_Helper::get_sliders('layer'), 'rev' => Mfn_Builder_Helper::get_sliders('rev'), ); $this->options = Mfn_Builder_Helper::get_options(); $this->set_items(); return; } // Default constructor $this->vb = $vb; $this->sliders = array( 'layer' => Mfn_Builder_Helper::get_sliders('layer'), 'rev' => Mfn_Builder_Helper::get_sliders('rev'), ); $this->options = Mfn_Builder_Helper::get_options(); $this->set_animations(); $this->set_advanced(); $this->set_section(); $this->set_wrap(); $this->set_items(); if( ! $this->vb ){ $this->get_advanced( $limited ); } } /** * SET advanced fields */ public function get_advanced( $limited = false ) { if( 'admin' == $limited && mfn_opts_get('builder-blocks') ) { $items_exclude = array('placeholder'); foreach ($this->items as $i=>$it) { foreach($this->advanced as $adv) { if( !in_array($i, $items_exclude) ) { $this->items[$i]['attr'][] = $adv; } } } } return $this->advanced; } /** * GET section fields */ public function get_section(){ return $this->section; } /** * GET wrap fields */ public function get_wrap(){ return $this->wrap; } /** * GET items */ public function get_items(){ return $this->items; } /** * GET item fields */ public function get_item_fields( $item_type ){ return $this->items[$item_type]; } /** * GET entrance animations */ public function get_animations(){ return $this->animations; } /** * GET placeholder image */ public function get_placeholder(){ return get_theme_file_uri( '/muffin-options/svg/placeholders/image.svg' ); } /** * GET column editor */ public function get_column_editor(){ $column_editor = 'textarea'; // codemirror if( $this->options['column-visual'] ){ $column_editor = 'visual'; } return $column_editor; } /** * SET section fields */ private function set_section(){ $this->section = array( /** * HEADER additional fields */ array( 'type' => 'html', 'html' => '', // end: modalbox-card ), array( 'type' => 'html', 'html' => '', // end: modalbox-card ), array( 'type' => 'html', 'html' => '', // end: modalbox-card ) ); } /** * SET wrap fields */ private function set_wrap() { $this->wrap = array( /** * HEADER additional fields * */ array( 'type' => 'html', 'html' => '', ), array( 'type' => 'html', 'html' => '', // end: modalbox-card ), array( 'type' => 'html', 'html' => '', ), ); } /** * SET items and their fields */ private function set_items(){ $this->items = array( // thank you ---------------------------------------------------- 'thankyou_overview' => array( 'type' => 'thankyou_overview', 'title' => __('Order overview', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'thanks', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ) ), // thank you ---------------------------------------------------- 'thankyou_order' => array( 'type' => 'thankyou_order', 'title' => __('Order details', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'thanks', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ) ), // checkout ---------------------------------------------------- 'checkout' => array( 'type' => 'checkout', 'title' => __('Checkout', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'checkout', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ) ), // cart table ---------------------------------------------------- 'cart_table' => array( 'type' => 'cart_table', 'title' => __('Cart table', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'cart', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ), ), // cart totals ---------------------------------------------------- 'cart_totals' => array( 'type' => 'cart_totals', 'title' => __('Cart totals', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'cart', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ), ), // cart cross sells ---------------------------------------------------- 'cart_cross_sells' => array( 'type' => 'cart_cross_sells', 'title' => __('Cross sells', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'cart', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ), ), // Order steps ---------------------------------------------------- 'order_steps' => array( 'type' => 'order_steps', 'title' => __('Order steps', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'order-shared', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ), ), // ALIAS: Blog Heading ---------------------------------------------------- 'archive_heading' => array( 'type' => 'heading', 'title' => __('Title', 'mfn-opts'), 'cat' => 'archive', ), // ALIAS: Blog image ---------------------------------------------------- 'archive_image' => array( 'type' => 'image', 'title' => __('Archive image', 'mfn-opts'), 'cat' => 'archive', ), // ALIAS: Blog readmore ---------------------------------------------------- 'archive_read_more' => array( 'type' => 'button', 'title' => __('Read more', 'mfn-opts'), 'cat' => 'archive', ), // ALIAS: Blog Desc ---------------------------------------------------- 'archive_content' => array( 'type' => 'plain_text', 'title' => __('Description', 'mfn-opts'), 'cat' => 'archive', ), 'archive_blog_categories' => array( 'type' => 'tag_cloud', 'title' => __('Categories', 'mfn-opts'), 'cat' => 'blog', ), 'archive_portfolio_categories' => array( 'type' => 'tag_cloud', 'title' => __('Categories', 'mfn-opts'), 'cat' => 'portfolio', ), // ALIAS: Single Post Heading ---------------------------------------------------- 'post_heading' => array( 'type' => 'heading', 'title' => __('Post title', 'mfn-opts'), 'cat' => 'single-post', ), // ALIAS: Single Post Image ---------------------------------------------------- 'post_image' => array( 'type' => 'image', 'title' => __('Featured image', 'mfn-opts'), 'cat' => 'single-post', ), // ALIAS: Single Post Author ----------------------------------------------------- 'post_author' => array( 'type' => 'icon_box_2', 'title' => __('Post author', 'mfn-opts'), 'cat' => 'single-post', ), // ALIAS: Single Post date ------------------------------------------------------- 'post_date' => array( 'type' => 'heading', 'title' => __('Post date', 'mfn-opts'), 'cat' => 'single-post', ), // ALIAS: Single Post related ---------------------------------------------------- 'post_blog_related' => array( 'type' => 'blog', 'title' => __('Related posts', 'mfn-opts'), 'cat' => 'single-blog-post', ), // ALIAS: Single Portfolio related ---------------------------------------------------- 'post_portfolio_related' => array( 'type' => 'portfolio', 'title' => __('Related posts', 'mfn-opts'), 'cat' => 'single-portfolio-post', ), // ALIAS: Single Post categories ------------------------------------------------- 'post_blog_categories' => array( 'type' => 'tag_cloud', 'title' => __('Post categories', 'mfn-opts'), 'cat' => 'single-blog-post', ), // ALIAS: Single Post categories ------------------------------------------------- 'post_portfolio_categories' => array( 'type' => 'tag_cloud', 'title' => __('Post categories', 'mfn-opts'), 'cat' => 'single-portfolio-post', ), // ALIAS: Single Post categories ------------------------------------------------- 'post_blog_tags' => array( 'type' => 'tag_cloud', 'title' => __('Post tags', 'mfn-opts'), 'cat' => 'single-blog-post', ), // ALIAS: Single Post categories ------------------------------------------------- 'post_excerpt' => array( 'type' => 'plain_text', 'title' => __('Excerpt', 'mfn-opts'), 'cat' => 'single-post', ), // ALIAS: Single Post love it ------------------------------------------------- 'post_love' => array( 'type' => 'icon_box_2', 'title' => __('Post love', 'mfn-opts'), 'cat' => 'single-post', ), // Single Post Comments ---------------------------------------------------- 'post_comments' => array( 'type' => 'post_comments', 'title' => __('Post comments', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'single-post', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ), ), // Single Post Content ---------------------------------------------------- 'post_content' => array( 'type' => 'post_content', 'title' => __('Post content', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'single-post', 'attr' => array( array( 'type' => 'html', 'html' => '', ), ), ), // Menu ---------------------------------------------------- 'sidemenu_menu' => array( 'type' => 'sidemenu_menu', 'title' => __('Menu', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'sidemenu', 'attr' => array( //'fields' => array( /*array( 'type' => 'html', 'html' => $this->itemtabs, ),*/ array( 'type' => 'html', 'html' => '', ), // advanced here ), ), // Popup Exit popup exit_popup exit-button ---------------------------------------------------- 'popup_exit' => array( 'type' => 'popup_exit', 'title' => __('Exit link', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'popup', 'fields' => array( array( 'type' => 'html', 'html' => '', ), // advanced here ), ), // Footer Logo ---------------------------------------------------- 'footer_logo' => array( 'type' => 'footer_logo', 'title' => __('Logo', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'footer', 'attr' => array( array( 'type' => 'html', 'html' => '', ), // advanced here ), ), // Footer Menu ---------------------------------------------------- 'footer_menu' => array( 'type' => 'footer_menu', 'title' => __('Menu', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'footer', 'attr' => array( //'fields' => array( /*array( 'type' => 'html', 'html' => $this->itemtabs, ),*/ array( 'type' => 'html', 'html' => '', ), ), ), // Mega menu Menu ---------------------------------------------------- 'megamenu_menu' => array( 'type' => 'megamenu_menu', 'title' => __('Menu', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'megamenu', 'attr' => array( //'fields' => array( /*array( 'type' => 'html', 'html' => $this->itemtabs, ),*/ array( 'type' => 'html', 'html' => '', ), ), ), // Logo ---------------------------------------------------- 'header_logo' => array( 'type' => 'header_logo', 'title' => __('Logo', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'header', 'attr' => array( array( 'type' => 'html', 'html' => '', ), // advanced here ), ), // Menu ---------------------------------------------------- 'header_menu' => array( 'type' => 'header_menu', 'title' => __('Menu', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'header', 'attr' => array( //'fields' => array( /*array( 'type' => 'html', 'html' => $this->itemtabs, ),*/ array( 'type' => 'html', 'html' => '', ), // advanced here ), ), // Header menu burger ---------------------------------------------------- 'header_burger' => array( 'type' => 'header_burger', 'title' => __('Menu burger', 'mfn-opts'), 'size' => '1/1', 'tablet_size' => '1/1', 'mobile_size' => '1/1', 'tablet_resized' => '0', 'cat' => 'header', 'attr' => array( //'fields' => array( /*array( 'type' => 'html', 'html' => $this->itemtabs, ),*/ array( 'type' => 'html', 'html' => '