Advertisement
bowenac

Branded Contact Row

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