Advertisement
bowenac

Branded Tabbed Contacts Row

Dec 4th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.46 KB | None | 0 0
  1. array (
  2.     'key' => '53f3d41933d23z',
  3.     'name' => 'tabs_content_contact',
  4.     'label' => 'Tabbed Contacts',
  5.     'display' => 'table',
  6.     'sub_fields' => array (
  7.         array (
  8.             'key' => 'field_53f3d41933d25z',
  9.             'label' => 'Tab',
  10.             'name' => 'tab_contact',
  11.             'prefix' => '',
  12.             'type' => 'repeater',
  13.             'instructions' => '',
  14.             'required' => 0,
  15.             'conditional_logic' => 0,
  16.             'column_width' => '',
  17.             'min' => '',
  18.             'max' => '',
  19.             'layout' => 'table',
  20.             'button_label' => 'Add Tab',
  21.             'sub_fields' => array (
  22.                 array (
  23.                     'key' => 'field_title_tab_contact',
  24.                     'label' => 'Title',
  25.                     'name' => 'title_tab_contact',
  26.                     'prefix' => '',
  27.                     'type' => 'text',
  28.                     'instructions' => '',
  29.                     'required' => 0,
  30.                     'conditional_logic' => 0,
  31.                     'column_width' => 25,
  32.                     'default_value' => '',
  33.                     'placeholder' => '',
  34.                     'prepend' => '',
  35.                     'append' => '',
  36.                     'maxlength' => '',
  37.                     'readonly' => 0,
  38.                     'disabled' => 0,
  39.                 ),
  40.                 array (
  41.                     'key' => 'field_google_map_tab_contact',
  42.                     'label' => 'Google Map',
  43.                     'name' => 'google_map_tab_contact',
  44.                     'prefix' => '',
  45.                     'type' => 'google_map',
  46.                     'instructions' => '',
  47.                     'required' => 0,
  48.                     'conditional_logic' => 0,
  49.                     'center_lat' => '',
  50.                     'center_lng' => '',
  51.                     'zoom' => '',
  52.                     'height' => '',
  53.                 ),
  54.                 array (
  55.                     'key' => 'field_form_area_title_tab_contact',
  56.                     'label' => 'Form Area Title',
  57.                     'name' => 'form_area_title_tab_contact',
  58.                     'prefix' => '',
  59.                     'type' => 'text',
  60.                     'instructions' => '',
  61.                     'required' => 0,
  62.                     'conditional_logic' => 0,
  63.                     'default_value' => '',
  64.                     'placeholder' => '',
  65.                     'prepend' => '',
  66.                     'append' => '',
  67.                     'maxlength' => '',
  68.                     'readonly' => 0,
  69.                     'disabled' => 0,
  70.                 ),
  71.                 array (
  72.                     'key' => 'field_5400cc9351bdbz1',
  73.                     'label' => 'Contact Form',
  74.                     'name' => 'contact_form_tab_contact',
  75.                     'prefix' => '',
  76.                     'type' => 'cf7',
  77.                     'instructions' => 'Select your contact form',
  78.                     'required' => 0,
  79.                     'conditional_logic' => 0,
  80.                     'allow_null' => 0,
  81.                     'multiple' => 0,
  82.                     'disable' => array (
  83.                         0 => 0,
  84.                     ),
  85.                 ),
  86.         array (
  87.             'key' => 'field_meta_info_tab_contact',
  88.             'label' => 'Meta info',
  89.             'name' => 'meta_info_tab_contact',
  90.             'prefix' => '',
  91.             'type' => 'repeater',
  92.             'instructions' => '',
  93.             'required' => 0,
  94.             'conditional_logic' => 0,
  95.             'min' => '',
  96.             'max' => '',
  97.             'layout' => 'table',
  98.             'button_label' => 'Add Row',
  99.             'sub_fields' => array (
  100.                 array (
  101.                     'key' => 'icon_tab_contact',
  102.                     'label' => 'Icon',
  103.                     'name' => 'icon',
  104.                     'prefix' => '',
  105.                     'type' => 'select',
  106.                     'instructions' => '',
  107.                     'required' => 0,
  108.                     'conditional_logic' => 0,
  109.                     'column_width' => '',
  110.                     'choices' => array (
  111.                         'airplay' => 'airplay',
  112.                         'alarm' => 'alarm',
  113.                         'albums' => 'albums',
  114.                         'anchor' => 'anchor',
  115.                         'angle-down' => 'angle-down',
  116.                         'angle-down-circle' => 'angle-down-circle',
  117.                         'angle-left' => 'angle-left',
  118.                         'angle-left-circle' => 'angle-left-circle',
  119.                         'angle-right' => 'angle-right',
  120.                         'angle-right-circle' => 'angle-right-circle',
  121.                         'angle-up' => 'angle-up',
  122.                         'angle-up-circle' => 'angle-up-circle',
  123.                         'attention' => 'attention',
  124.                         'back' => 'back',
  125.                         'ball' => 'ball',
  126.                         'battery' => 'battery',
  127.                         'bell' => 'bell',
  128.                         'bicycle' => 'bicycle',
  129.                         'bookmarks' => 'bookmarks',
  130.                         'box1' => 'box1',
  131.                         'box2' => 'box2',
  132.                         'browser' => 'browser',
  133.                         'calculator' => 'calculator',
  134.                         'call' => 'call',
  135.                         'camera' => 'camera',
  136.                         'cart' => 'cart',
  137.                         'chat' => 'chat',
  138.                         'check' => 'check',
  139.                         'circle' => 'circle',
  140.                         'clock' => 'clock',
  141.                         'close' => 'close',
  142.                         'cloud' => 'cloud',
  143.                         'cloud-download' => 'cloud-download',
  144.                         'cloud-upload' => 'cloud-upload',
  145.                         'coffee' => 'coffee',
  146.                         'comment' => 'comment',
  147.                         'compass' => 'compass',
  148.                         'config' => 'config',
  149.                         'copy-file' => 'copy-file',
  150.                         'credit' => 'credit',
  151.                         'crop' => 'crop',
  152.                         'culture' => 'culture',
  153.                         'cup' => 'cup',
  154.                         'date' => 'date',
  155.                         'diskette' => 'diskette',
  156.                         'display1' => 'display1',
  157.                         'display2' => 'display2',
  158.                         'download' => 'download',
  159.                         'drawer' => 'drawer',
  160.                         'drop' => 'drop',
  161.                         'edit' => 'edit',
  162.                         'expand1' => 'expand1',
  163.                         'expand2' => 'expand2',
  164.                         'file' => 'file',
  165.                         'filter' => 'filter',
  166.                         'flag' => 'flag',
  167.                         'folder' => 'folder',
  168.                         'gift' => 'gift',
  169.                         'glasses' => 'glasses',
  170.                         'gleam' => 'gleam',
  171.                         'global' => 'global',
  172.                         'graph' => 'graph',
  173.                         'graph1' => 'graph1',
  174.                         'graph2' => 'graph2',
  175.                         'graph3' => 'graph3',
  176.                         'help1' => 'help1',
  177.                         'help2' => 'help2',
  178.                         'home' => 'home',
  179.                         'info' => 'info',
  180.                         'junk' => 'junk',
  181.                         'keypad' => 'keypad',
  182.                         'less' => 'less',
  183.                         'light' => 'light',
  184.                         'like' => 'like',
  185.                         'link' => 'link',
  186.                         'lintern' => 'lintern',
  187.                         'look lock' => 'look lock',
  188.                         'loop' => 'loop',
  189.                         'magnet' => 'magnet',
  190.                         'mail' => 'mail',
  191.                         'mail-open' => 'mail-open',
  192.                         'mail-open-file' => 'mail-open-file',
  193.                         'map' => 'map',
  194.                         'map-marker' => 'map-marker',
  195.                         'menu' => 'menu',
  196.                         'micro' => 'micro',
  197.                         'monitor' => 'monitor',
  198.                         'moon' => 'moon',
  199.                         'more' => 'more',
  200.                         'mouse' => 'mouse',
  201.                         'music' => 'music',
  202.                         'musiclist' => 'musiclist',
  203.                         'news-paper' => 'news-paper',
  204.                         'next' => 'next',
  205.                         'note' => 'note',
  206.                         'notebook' => 'notebook',
  207.                         'paint' => 'paint',
  208.                         'paper-plane' => 'paper-plane',
  209.                         'pen' => 'pen',
  210.                         'phone' => 'phone',
  211.                         'photo-gallery' => 'photo-gallery',
  212.                         'plane' => 'plane',
  213.                         'play' => 'play',
  214.                         'plus' => 'plus',
  215.                         'portfolio' => 'portfolio',
  216.                         'power' => 'power',
  217.                         'prev' => 'prev',
  218.                         'print' => 'print',
  219.                         'radio' => 'radio',
  220.                         'refresh' => 'refresh',
  221.                         'refresh-cloud' => 'refresh-cloud',
  222.                         'repeat' => 'repeat',
  223.                         'ribbon' => 'ribbon',
  224.                         'science' => 'science',
  225.                         'search' => 'search',
  226.                         'server' => 'server',
  227.                         'share' => 'share',
  228.                         'shopbag' => 'shopbag',
  229.                         'shuffle' => 'shuffle',
  230.                         'signal' => 'signal',
  231.                         'speaker' => 'speaker',
  232.                         'star' => 'star',
  233.                         'stopwatch' => 'stopwatch',
  234.                         'study' => 'study',
  235.                         'sun' => 'sun',
  236.                         'target' => 'target',
  237.                         'ticket' => 'ticket',
  238.                         'timer' => 'timer',
  239.                         'tools' => 'tools',
  240.                         'trash' => 'trash',
  241.                         'umbrella' => 'umbrella',
  242.                         'unlock' => 'unlock',
  243.                         'upload' => 'upload',
  244.                         'user' => 'user',
  245.                         'video' => 'video',
  246.                         'voicemail' => 'voicemail',
  247.                         'volume1' => 'volume1',
  248.                         'volume2' => 'volume2',
  249.                         'wallet' => 'wallet',
  250.                     ),
  251.                     'default_value' => array (
  252.                     ),
  253.                     'allow_null' => 0,
  254.                     'multiple' => 0,
  255.                     'ui' => 1,
  256.                     'ajax' => 1,
  257.                     'placeholder' => '',
  258.                     'disabled' => 0,
  259.                     'readonly' => 0,
  260.                 ),
  261.                 array (
  262.                     'key' => 'field_text_tab_contact',
  263.                     'label' => 'Text',
  264.                     'name' => 'text_tab_contact',
  265.                     'prefix' => '',
  266.                     'type' => 'text',
  267.                     'instructions' => '',
  268.                     'required' => 0,
  269.                     'conditional_logic' => 0,
  270.                     'column_width' => '',
  271.                     'default_value' => '',
  272.                     'placeholder' => '',
  273.                     'prepend' => '',
  274.                     'append' => '',
  275.                     'maxlength' => '',
  276.                     'readonly' => 0,
  277.                     'disabled' => 0,
  278.                 ),
  279.             ),
  280.         ),
  281.  
  282.  
  283.             ),
  284.         ),
  285.     ),
  286.     'min' => '',
  287.     'max' => '',
  288. ),
  289.  
  290.  
  291. //content-page.php
  292.  
  293. // TABBED CONTACTS
  294.  
  295. elseif (get_row_layout() == 'tabs_content_contact'):
  296. $tab = get_sub_field('tab_contact');
  297. $background_color = get_background_color();
  298. if (get_sub_field('tab_contact')):
  299.     ?>
  300.     <section class="white-section tabbed-contacts">
  301.         <div class="center-holder">
  302.             <div class="tab-column">
  303.                 <ul class="tabset">
  304.                     <?php $count=1;
  305.                     while (has_sub_field('tab_contact')):
  306.                         if ($count == 1 ) : $tc= 'active'; else : $tc= '' ; endif  ?>
  307.                     <li><a href="#tab<?php
  308.                         echo esc_attr($count); ?>" class="<?php echo esc_attr($tc); ?>" style="background: #293133;"><?php
  309.                         echo esc_attr(get_sub_field('title_tab_contact')); ?></a></li>
  310.                         <?php
  311.                          $count++;
  312.                     endwhile; ?>
  313.                 </ul>
  314.                 <?php
  315.             endif; ?>
  316.             <?php
  317.             if (get_sub_field('tab_contact')): ?>
  318.             <div class="tab-content">
  319.                 <?php $count=1;
  320.                 while (has_sub_field('tab_contact')):
  321.                      ?>
  322.                      
  323.                
  324.                 <div id="tab<?php
  325.                         echo esc_attr($count); ?>">
  326.                     <div class="tab-text">
  327.                         <div id="contacts-popup" class="lightbox">
  328.                             <div class="tabbed-contact-holder">
  329.                                 <?php  
  330.  
  331.                                 $location = get_sub_field('google_map_tab_contact');  
  332.  
  333.                                 if( ! empty($location) ):  
  334.                                 ?>  
  335.                                 <div class="acf-map">  
  336.                                     <div class="marker" data-lat="<?php echo esc_attr($location['lat']); ?>" data-lng="<?php echo esc_attr($location['lng']); ?>"></div>  
  337.                                 </div>  
  338.                                 <?php endif; ?>
  339.                                 <div class="twocolumn">
  340.                                    
  341.                                     <div class="lightbox-content">
  342.                                        
  343.                                         <h1><?php echo wptexturize(get_sub_field('form_area_title_tab_contact')); ?></h1>
  344.                                         <?php echo wptexturize(get_sub_field('contact_form_tab_contact')); ?>
  345.                                     </div>
  346.                                
  347.                                     <div class="lightbox-aside">
  348.                                     <ul class="contacts-list">
  349.                                         <?php
  350.                                         while (has_sub_field('meta_info_tab_contact')): ?>
  351.                                         <li><span class="icon pe-7s-<?php echo esc_attr(get_sub_field('icon')); ?>"></span><?php echo wptexturize(get_sub_field('text_tab_contact')); ?></li>
  352.                                        
  353.                                         <?php endwhile; ?>
  354.                                     </ul>
  355.                                      <?php
  356.                                      $twitter  = get_theme_mod('twitter_text');  
  357.                                      $facebook  = get_theme_mod('facebook_text');
  358.                                      ?>
  359.                                         <ul class="social-networks">
  360.                                             <?php
  361.                                       if(!empty($facebook)){ ?>
  362.                                             <li><a class="icon-twitter" href="<?php echo esc_url($twitter); ?>" target="_blank"></a></li>
  363.                                                 <?php  }  
  364.                                       if(!empty($twitter)){ ?>
  365.                                             <li><a class="icon-facebook" href="<?php echo esc_url($facebook); ?>" target="_blank"></a></li>
  366.                                               <?php  } ?>
  367.                                         </ul>
  368.                                     </div>
  369.                                 </div>
  370.                             </div>
  371.                         </div>
  372.                     </div>
  373.                 </div>
  374.                 <?php
  375.                 $count++;
  376.             endwhile; ?>
  377.         </div></div></div></section>
  378.         <?php
  379.     endif; ?>
  380.     <?php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement