Advertisement
rhandom

HS Options File

Jul 1st, 2015
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 32.89 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Initialize the custom theme options.
  4.  */
  5. add_action( 'admin_init', 'custom_theme_options' );
  6.  
  7. /**
  8.  * Build the custom settings & update OptionTree.
  9.  */
  10. function custom_theme_options() {
  11.  
  12.   /* OptionTree is not loaded yet */
  13.   if ( ! function_exists( 'ot_settings_id' ) )
  14.     return false;
  15.    
  16.   /**
  17.    * Get a copy of the saved settings array.
  18.    */
  19.   $saved_settings = get_option( ot_settings_id(), array() );
  20.  
  21.   /**
  22.    * Custom settings array that will eventually be
  23.    * passes to the OptionTree Settings API Class.
  24.    */
  25.   $custom_settings = array(
  26.     'contextual_help' => array(
  27.       'sidebar'       => ''
  28.     ),
  29.     'sections'        => array(
  30.       array(
  31.         'id'          => 'general',
  32.         'title'       => 'General'
  33.       ),
  34.       array(
  35.         'id'          => 'color',
  36.         'title'       => 'Colors'
  37.       ),
  38.       array(
  39.         'id'          => 'shopdetails',
  40.         'title'       => 'Shop Details'
  41.       ),
  42.       array(
  43.         'id'          => 'slider',
  44.         'title'       => 'Sliders, Banners, Brands'
  45.       ),
  46.       array(
  47.         'id'          => 'social',
  48.         'title'       => 'Social Networks'
  49.       )
  50.     ),
  51.     'settings'        => array(
  52.       array(
  53.         'id'          => 'hs_fav',
  54.         'label'       => 'Favicon',
  55.         'desc'        => 'Upload your favicon',
  56.         'std'         => '',
  57.         'type'        => 'upload',
  58.         'section'     => 'general',
  59.         'rows'        => '',
  60.         'post_type'   => '',
  61.         'taxonomy'    => '',
  62.         'min_max_step'=> '',
  63.         'class'       => '',
  64.         'condition'   => '',
  65.         'operator'    => 'and'
  66.       ),
  67.       array(
  68.         'id'          => 'hs_logofont',
  69.         'label'       => 'Logo Font',
  70.         'desc'        => 'Insert Google font name you want to use for logo. You can find the font name from <a href="http://www.google.com/fonts" target="_blank">here</a>. Else leave it blank if you want to use image base.',
  71.         'std'         => 'Bangers',
  72.         'type'        => 'text',
  73.         'section'     => 'general',
  74.         'rows'        => '',
  75.         'post_type'   => '',
  76.         'taxonomy'    => '',
  77.         'min_max_step'=> '',
  78.         'class'       => '',
  79.         'condition'   => '',
  80.         'operator'    => 'and'
  81.       ),
  82.       array(
  83.         'id'          => 'hs_logofontsize',
  84.         'label'       => 'Logo Font Size',
  85.         'desc'        => 'Size for the logo if you want to use text base',
  86.         'std'         => '',
  87.         'type'        => 'measurement',
  88.         'section'     => 'general',
  89.         'rows'        => '',
  90.         'post_type'   => '',
  91.         'taxonomy'    => '',
  92.         'min_max_step'=> '',
  93.         'class'       => '',
  94.         'condition'   => '',
  95.         'operator'    => 'and'
  96.       ),
  97.       array(
  98.         'id'          => 'hs_logo',
  99.         'label'       => 'Logo Image',
  100.         'desc'        => 'Upload your shop logo. Leave it blank if you want to use text-base logo',
  101.         'std'         => '',
  102.         'type'        => 'upload',
  103.         'section'     => 'general',
  104.         'rows'        => '',
  105.         'post_type'   => '',
  106.         'taxonomy'    => '',
  107.         'min_max_step'=> '',
  108.         'class'       => '',
  109.         'condition'   => '',
  110.         'operator'    => 'and'
  111.       ),
  112.       array(
  113.         'id'          => 'hs_logo_retina',
  114.         'label'       => 'Retina Logo Image',
  115.         'desc'        => 'Upload retina logo, must be twice size of normal logo with same ratio',
  116.         'std'         => '',
  117.         'type'        => 'upload',
  118.         'section'     => 'general',
  119.         'rows'        => '',
  120.         'post_type'   => '',
  121.         'taxonomy'    => '',
  122.         'min_max_step'=> '',
  123.         'class'       => '',
  124.         'condition'   => '',
  125.         'operator'    => 'and'
  126.       ),
  127.       array(
  128.         'id'          => 'hs_fontgoogle',
  129.         'label'       => 'Body Google Font',
  130.         'desc'        => 'If you decided to use Google Font, just insert the font name here. Leave form blank if you want to use default fonts selected above.',
  131.         'std'         => 'Lato',
  132.         'type'        => 'text',
  133.         'section'     => 'general',
  134.         'rows'        => '',
  135.         'post_type'   => '',
  136.         'taxonomy'    => '',
  137.         'min_max_step'=> '',
  138.         'class'       => '',
  139.         'condition'   => '',
  140.         'operator'    => 'and'
  141.       ),
  142.       array(
  143.         'id'          => 'hs_font',
  144.         'label'       => 'Body Font',
  145.         'desc'        => 'Default font setting. If you want to use this font-family, clear form for Body Google Font below.',
  146.         'std'         => '',
  147.         'type'        => 'typography',
  148.         'section'     => 'general',
  149.         'rows'        => '',
  150.         'post_type'   => '',
  151.         'taxonomy'    => '',
  152.         'min_max_step'=> '',
  153.         'class'       => '',
  154.         'condition'   => '',
  155.         'operator'    => 'and'
  156.       ),
  157.       array(
  158.         'id'          => 'hs_sidebarpage',
  159.         'label'       => 'Page sidebar',
  160.         'desc'        => 'Select sidebar position for pages',
  161.         'std'         => '',
  162.         'type'        => 'select',
  163.         'section'     => 'general',
  164.         'rows'        => '',
  165.         'post_type'   => '',
  166.         'taxonomy'    => '',
  167.         'min_max_step'=> '',
  168.         'class'       => '',
  169.         'condition'   => '',
  170.         'operator'    => 'and',
  171.         'choices'     => array(
  172.           array(
  173.             'value'       => '1',
  174.             'label'       => 'Left SideBar',
  175.             'src'         => ''
  176.           ),
  177.           array(
  178.             'value'       => '2',
  179.             'label'       => 'Right Sidebar',
  180.             'src'         => ''
  181.           ),
  182.           array(
  183.             'value'       => 'no_sidebar',
  184.             'label'       => 'No Sidebar',
  185.             'src'         => ''
  186.           )
  187.         )
  188.       ),
  189.       array(
  190.         'id'          => 'hs_sidebarblog',
  191.         'label'       => 'Blog Sidebar',
  192.         'desc'        => 'Select sidebar position for blog list and blog post',
  193.         'std'         => '',
  194.         'type'        => 'select',
  195.         'section'     => 'general',
  196.         'rows'        => '',
  197.         'post_type'   => '',
  198.         'taxonomy'    => '',
  199.         'min_max_step'=> '',
  200.         'class'       => '',
  201.         'condition'   => '',
  202.         'operator'    => 'and',
  203.         'choices'     => array(
  204.           array(
  205.             'value'       => '1',
  206.             'label'       => 'Left Sidebar',
  207.             'src'         => ''
  208.           ),
  209.           array(
  210.             'value'       => '2',
  211.             'label'       => 'Right Sidebar',
  212.             'src'         => ''
  213.           ),
  214.           array(
  215.             'value'       => 'no_sidebar',
  216.             'label'       => 'No Sidebar',
  217.             'src'         => ''
  218.           )
  219.         )
  220.       ),
  221.       array(
  222.         'id'          => 'hs_sidebarshop',
  223.         'label'       => 'Shop Sidebar',
  224.         'desc'        => 'Select sidebar position for product listing',
  225.         'std'         => '',
  226.         'type'        => 'select',
  227.         'section'     => 'general',
  228.         'rows'        => '',
  229.         'post_type'   => '',
  230.         'taxonomy'    => '',
  231.         'min_max_step'=> '',
  232.         'class'       => '',
  233.         'condition'   => '',
  234.         'operator'    => 'and',
  235.         'choices'     => array(
  236.           array(
  237.             'value'       => '1',
  238.             'label'       => 'Left Sidebar',
  239.             'src'         => ''
  240.           ),
  241.           array(
  242.             'value'       => '2',
  243.             'label'       => 'Right Sidebar',
  244.             'src'         => ''
  245.           ),
  246.           array(
  247.             'value'       => 'no_sidebar',
  248.             'label'       => 'No Sidebar',
  249.             'src'         => ''
  250.           )
  251.         )
  252.       ),
  253.       array(
  254.         'id'          => 'share_text',
  255.         'label'       => 'Share text in product page',
  256.         'desc'        => '',
  257.         'std'         => 'Hard to decide? Ask your friends',
  258.         'type'        => 'text',
  259.         'section'     => 'general',
  260.         'rows'        => '',
  261.         'post_type'   => '',
  262.         'taxonomy'    => '',
  263.         'min_max_step'=> '',
  264.         'class'       => '',
  265.         'condition'   => '',
  266.         'operator'    => 'and'
  267.       ),
  268.       array(
  269.         'id'          => 'hs_homefeat',
  270.         'label'       => 'Homepage Featured Products',
  271.         'desc'        => 'Featured products title',
  272.         'std'         => '',
  273.         'type'        => 'text',
  274.         'section'     => 'general',
  275.         'rows'        => '',
  276.         'post_type'   => '',
  277.         'taxonomy'    => '',
  278.         'min_max_step'=> '',
  279.         'class'       => '',
  280.         'condition'   => '',
  281.         'operator'    => 'and'
  282.       ),
  283.       array(
  284.         'id'          => 'hs_homefeatno',
  285.         'label'       => 'Number of Featured Products',
  286.         'desc'        => 'Number of featured products you want to display on homepage',
  287.         'std'         => '9',
  288.         'type'        => 'text',
  289.         'section'     => 'general',
  290.         'rows'        => '',
  291.         'post_type'   => '',
  292.         'taxonomy'    => '',
  293.         'min_max_step'=> '',
  294.         'class'       => '',
  295.         'condition'   => '',
  296.         'operator'    => 'and'
  297.       ),
  298.       array(
  299.         'id'          => 'hs_zoom',
  300.         'label'       => 'Zoom Effect',
  301.         'desc'        => 'Option for zoom effect for product listing on homepage and shop page. Check to disable',
  302.         'std'         => '',
  303.         'type'        => 'checkbox',
  304.         'section'     => 'general',
  305.         'rows'        => '',
  306.         'post_type'   => '',
  307.         'taxonomy'    => '',
  308.         'min_max_step'=> '',
  309.         'class'       => '',
  310.         'condition'   => '',
  311.         'operator'    => 'and',
  312.         'choices'     => array(
  313.           array(
  314.             'value'       => 'true',
  315.             'label'       => 'Disable',
  316.             'src'         => ''
  317.           )
  318.         )
  319.       ),
  320.       array(
  321.         'id'          => 'hs_announcement',
  322.         'label'       => 'Announcement',
  323.         'desc'        => 'This section sit at footer area, beside payment method icons. You can insert greeting, promotion, announcement, testimoni or anything here. HTML is allowed.',
  324.         'std'         => '',
  325.         'type'        => 'textarea',
  326.         'section'     => 'general',
  327.         'rows'        => '',
  328.         'post_type'   => '',
  329.         'taxonomy'    => '',
  330.         'min_max_step'=> '',
  331.         'class'       => '',
  332.         'condition'   => '',
  333.         'operator'    => 'and'
  334.       ),
  335.       array(
  336.         'id'          => 'hs_background',
  337.         'label'       => 'Body Background',
  338.         'desc'        => 'Custom your background look',
  339.         'std'         => '',
  340.         'type'        => 'background',
  341.         'section'     => 'color',
  342.         'rows'        => '',
  343.         'post_type'   => '',
  344.         'taxonomy'    => '',
  345.         'min_max_step'=> '',
  346.         'class'       => '',
  347.         'condition'   => '',
  348.         'operator'    => 'and'
  349.       ),
  350.       array(
  351.         'id'          => 'hs_link',
  352.         'label'       => 'Body link color',
  353.         'desc'        => 'Choose default link color for body',
  354.         'std'         => '#E55137',
  355.         'type'        => 'colorpicker',
  356.         'section'     => 'color',
  357.         'rows'        => '',
  358.         'post_type'   => '',
  359.         'taxonomy'    => '',
  360.         'min_max_step'=> '',
  361.         'class'       => '',
  362.         'condition'   => '',
  363.         'operator'    => 'and'
  364.       ),
  365.       array(
  366.         'id'          => 'hs_panel',
  367.         'label'       => 'Main panel color',
  368.         'desc'        => 'Select color for main panel',
  369.         'std'         => '#FFFFFF',
  370.         'type'        => 'colorpicker',
  371.         'section'     => 'color',
  372.         'rows'        => '',
  373.         'post_type'   => '',
  374.         'taxonomy'    => '',
  375.         'min_max_step'=> '',
  376.         'class'       => '',
  377.         'condition'   => '',
  378.         'operator'    => 'and'
  379.       ),
  380.       array(
  381.         'id'          => 'hs_headpanel',
  382.         'label'       => 'Header panel color',
  383.         'desc'        => 'Select head panel color (page title section)',
  384.         'std'         => '#F2F2F2',
  385.         'type'        => 'colorpicker',
  386.         'section'     => 'color',
  387.         'rows'        => '',
  388.         'post_type'   => '',
  389.         'taxonomy'    => '',
  390.         'min_max_step'=> '',
  391.         'class'       => '',
  392.         'condition'   => '',
  393.         'operator'    => 'and'
  394.       ),
  395.       array(
  396.         'id'          => 'hs_line',
  397.         'label'       => 'Border color',
  398.         'desc'        => 'Select default border line color',
  399.         'std'         => '#DDDDDD',
  400.         'type'        => 'colorpicker',
  401.         'section'     => 'color',
  402.         'rows'        => '',
  403.         'post_type'   => '',
  404.         'taxonomy'    => '',
  405.         'min_max_step'=> '',
  406.         'class'       => '',
  407.         'condition'   => '',
  408.         'operator'    => 'and'
  409.       ),
  410.       array(
  411.         'id'          => 'hs_footerbg',
  412.         'label'       => 'Footer background color',
  413.         'desc'        => 'Select you footer background color',
  414.         'std'         => '',
  415.         'type'        => 'background',
  416.         'section'     => 'color',
  417.         'rows'        => '',
  418.         'post_type'   => '',
  419.         'taxonomy'    => '',
  420.         'min_max_step'=> '',
  421.         'class'       => '',
  422.         'condition'   => '',
  423.         'operator'    => 'and'
  424.       ),
  425.       array(
  426.         'id'          => 'hs_footerfont',
  427.         'label'       => 'Footer font color',
  428.         'desc'        => 'Choose default color for texts in footer.',
  429.         'std'         => '#777777',
  430.         'type'        => 'colorpicker',
  431.         'section'     => 'color',
  432.         'rows'        => '',
  433.         'post_type'   => '',
  434.         'taxonomy'    => '',
  435.         'min_max_step'=> '',
  436.         'class'       => '',
  437.         'condition'   => '',
  438.         'operator'    => 'and'
  439.       ),
  440.       array(
  441.         'id'          => 'hs_footerlink',
  442.         'label'       => 'Footer link color',
  443.         'desc'        => 'Choose font color for link in footer.',
  444.         'std'         => '#bbbbbb',
  445.         'type'        => 'colorpicker',
  446.         'section'     => 'color',
  447.         'rows'        => '',
  448.         'post_type'   => '',
  449.         'taxonomy'    => '',
  450.         'min_max_step'=> '',
  451.         'class'       => '',
  452.         'condition'   => '',
  453.         'operator'    => 'and'
  454.       ),
  455.       array(
  456.         'id'          => 'hs_footerline',
  457.         'label'       => 'Footer border line color',
  458.         'desc'        => 'Select footer border line color',
  459.         'std'         => '#333333',
  460.         'type'        => 'colorpicker',
  461.         'section'     => 'color',
  462.         'rows'        => '',
  463.         'post_type'   => '',
  464.         'taxonomy'    => '',
  465.         'min_max_step'=> '',
  466.         'class'       => '',
  467.         'condition'   => '',
  468.         'operator'    => 'and'
  469.       ),
  470.       array(
  471.         'id'          => 'hs_zoombg',
  472.         'label'       => 'Zoom effect background color',
  473.         'desc'        => 'Zoom in effect background color. Default is cream, else skip to use default color.',
  474.         'std'         => '',
  475.         'type'        => 'colorpicker',
  476.         'section'     => 'color',
  477.         'rows'        => '',
  478.         'post_type'   => '',
  479.         'taxonomy'    => '',
  480.         'min_max_step'=> '',
  481.         'class'       => '',
  482.         'condition'   => '',
  483.         'operator'    => 'and'
  484.       ),
  485.       array(
  486.         'id'          => 'hs_css',
  487.         'label'       => 'Additional CSS',
  488.         'desc'        => 'Enter your additional css here (optional)',
  489.         'std'         => '',
  490.         'type'        => 'css',
  491.         'section'     => 'color',
  492.         'rows'        => '',
  493.         'post_type'   => '',
  494.         'taxonomy'    => '',
  495.         'min_max_step'=> '',
  496.         'class'       => '',
  497.         'condition'   => '',
  498.         'operator'    => 'and'
  499.       ),
  500.       array(
  501.         'id'          => 'hs_add1',
  502.         'label'       => 'Address 1',
  503.         'desc'        => 'First row address',
  504.         'std'         => '',
  505.         'type'        => 'text',
  506.         'section'     => 'shopdetails',
  507.         'rows'        => '',
  508.         'post_type'   => '',
  509.         'taxonomy'    => '',
  510.         'min_max_step'=> '',
  511.         'class'       => '',
  512.         'condition'   => '',
  513.         'operator'    => 'and'
  514.       ),
  515.       array(
  516.         'id'          => 'hs_add2',
  517.         'label'       => 'Address 2',
  518.         'desc'        => 'Second row address',
  519.         'std'         => '',
  520.         'type'        => 'text',
  521.         'section'     => 'shopdetails',
  522.         'rows'        => '',
  523.         'post_type'   => '',
  524.         'taxonomy'    => '',
  525.         'min_max_step'=> '',
  526.         'class'       => '',
  527.         'condition'   => '',
  528.         'operator'    => 'and'
  529.       ),
  530.       array(
  531.         'id'          => 'hs_town',
  532.         'label'       => 'Town/City',
  533.         'desc'        => 'Town/City',
  534.         'std'         => '',
  535.         'type'        => 'text',
  536.         'section'     => 'shopdetails',
  537.         'rows'        => '',
  538.         'post_type'   => '',
  539.         'taxonomy'    => '',
  540.         'min_max_step'=> '',
  541.         'class'       => '',
  542.         'condition'   => '',
  543.         'operator'    => 'and'
  544.       ),
  545.       array(
  546.         'id'          => 'hs_zip',
  547.         'label'       => 'Postcode/ZIP',
  548.         'desc'        => 'Postcode/ZIP',
  549.         'std'         => '',
  550.         'type'        => 'text',
  551.         'section'     => 'shopdetails',
  552.         'rows'        => '',
  553.         'post_type'   => '',
  554.         'taxonomy'    => '',
  555.         'min_max_step'=> '',
  556.         'class'       => '',
  557.         'condition'   => '',
  558.         'operator'    => 'and'
  559.       ),
  560.       array(
  561.         'id'          => 'hs_country',
  562.         'label'       => 'Country',
  563.         'desc'        => 'Country',
  564.         'std'         => '',
  565.         'type'        => 'text',
  566.         'section'     => 'shopdetails',
  567.         'rows'        => '',
  568.         'post_type'   => '',
  569.         'taxonomy'    => '',
  570.         'min_max_step'=> '',
  571.         'class'       => '',
  572.         'condition'   => '',
  573.         'operator'    => 'and'
  574.       ),
  575.       array(
  576.         'id'          => 'hs_phone',
  577.         'label'       => 'Phone No',
  578.         'desc'        => 'Phone number',
  579.         'std'         => '',
  580.         'type'        => 'text',
  581.         'section'     => 'shopdetails',
  582.         'rows'        => '',
  583.         'post_type'   => '',
  584.         'taxonomy'    => '',
  585.         'min_max_step'=> '',
  586.         'class'       => '',
  587.         'condition'   => '',
  588.         'operator'    => 'and'
  589.       ),
  590.       array(
  591.         'id'          => 'hs_fax',
  592.         'label'       => 'Fax No',
  593.         'desc'        => 'Fax number',
  594.         'std'         => '',
  595.         'type'        => 'text',
  596.         'section'     => 'shopdetails',
  597.         'rows'        => '',
  598.         'post_type'   => '',
  599.         'taxonomy'    => '',
  600.         'min_max_step'=> '',
  601.         'class'       => '',
  602.         'condition'   => '',
  603.         'operator'    => 'and'
  604.       ),
  605.       array(
  606.         'id'          => 'hs_email',
  607.         'label'       => 'Email',
  608.         'desc'        => 'Email address',
  609.         'std'         => '',
  610.         'type'        => 'text',
  611.         'section'     => 'shopdetails',
  612.         'rows'        => '',
  613.         'post_type'   => '',
  614.         'taxonomy'    => '',
  615.         'min_max_step'=> '',
  616.         'class'       => '',
  617.         'condition'   => '',
  618.         'operator'    => 'and'
  619.       ),
  620.       array(
  621.         'id'          => 'hs_bank',
  622.         'label'       => 'Payment Option',
  623.         'desc'        => 'Select payment method logos you want to display at the footer.',
  624.         'std'         => '',
  625.         'type'        => 'checkbox',
  626.         'section'     => 'shopdetails',
  627.         'rows'        => '',
  628.         'post_type'   => '',
  629.         'taxonomy'    => '',
  630.         'min_max_step'=> '',
  631.         'class'       => '',
  632.         'condition'   => '',
  633.         'operator'    => 'and',
  634.         'choices'     => array(
  635.           array(
  636.             'value'       => 'amex',
  637.             'label'       => 'American Express',
  638.             'src'         => ''
  639.           ),
  640.           array(
  641.             'value'       => 'mastercard',
  642.             'label'       => 'MasterCard',
  643.             'src'         => ''
  644.           ),
  645.           array(
  646.             'value'       => 'visa',
  647.             'label'       => 'Visa',
  648.             'src'         => ''
  649.           ),
  650.           array(
  651.             'value'       => 'paypal',
  652.             'label'       => 'Paypal',
  653.             'src'         => ''
  654.           ),
  655.           array(
  656.             'value'       => 'cirrus',
  657.             'label'       => 'Cirrus',
  658.             'src'         => ''
  659.           ),
  660.           array(
  661.             'value'       => 'delta',
  662.             'label'       => 'Deltad',
  663.             'src'         => ''
  664.           ),
  665.           array(
  666.             'value'       => 'direct-debit',
  667.             'label'       => 'Direct Debit',
  668.             'src'         => ''
  669.           ),
  670.           array(
  671.             'value'       => 'discover',
  672.             'label'       => 'Discoverd',
  673.             'src'         => ''
  674.           ),
  675.           array(
  676.             'value'       => 'ebay',
  677.             'label'       => 'Ebay',
  678.             'src'         => ''
  679.           ),
  680.           array(
  681.             'value'       => 'google',
  682.             'label'       => 'Google Checkout',
  683.             'src'         => ''
  684.           ),
  685.           array(
  686.             'value'       => 'maestro',
  687.             'label'       => 'Maestro',
  688.             'src'         => ''
  689.           ),
  690.           array(
  691.             'value'       => 'moneybookers',
  692.             'label'       => 'Moneybookers',
  693.             'src'         => ''
  694.           ),
  695.           array(
  696.             'value'       => 'sagepay',
  697.             'label'       => 'Sagepay',
  698.             'src'         => ''
  699.           ),
  700.           array(
  701.             'value'       => 'solo',
  702.             'label'       => 'Solo',
  703.             'src'         => ''
  704.           ),
  705.           array(
  706.             'value'       => 'switch',
  707.             'label'       => 'Switch',
  708.             'src'         => ''
  709.           ),
  710.           array(
  711.             'value'       => 'visaelectron',
  712.             'label'       => 'Visa Electron',
  713.             'src'         => ''
  714.           ),
  715.           array(
  716.             'value'       => 'twocheckout',
  717.             'label'       => '2checkout',
  718.             'src'         => ''
  719.           ),
  720.           array(
  721.             'value'       => 'westernunion',
  722.             'label'       => 'Western Union',
  723.             'src'         => ''
  724.           )
  725.         )
  726.       ),
  727.       array(
  728.         'id'          => 'hs_slider',
  729.         'label'       => 'Slider',
  730.         'desc'        => 'Add slider for front page',
  731.         'std'         => '',
  732.         'type'        => 'list-item',
  733.         'section'     => 'slider',
  734.         'rows'        => '',
  735.         'post_type'   => '',
  736.         'taxonomy'    => '',
  737.         'min_max_step'=> '',
  738.         'class'       => '',
  739.         'condition'   => '',
  740.         'operator'    => 'and',
  741.         'settings'    => array(
  742.           array(
  743.             'id'          => 'hs_slideimage',
  744.             'label'       => 'Image',
  745.             'desc'        => 'Upload your banner image <em>(recommended size 940x400)</em>',
  746.             'std'         => '',
  747.             'type'        => 'upload',
  748.             'rows'        => '',
  749.             'post_type'   => '',
  750.             'taxonomy'    => '',
  751.             'min_max_step'=> '',
  752.             'class'       => '',
  753.             'condition'   => '',
  754.             'operator'    => 'and'
  755.           ),
  756.           array(
  757.             'id'          => 'hs_slidelink',
  758.             'label'       => 'Link',
  759.             'desc'        => 'Insert link for the banner',
  760.             'std'         => '',
  761.             'type'        => 'text',
  762.             'rows'        => '',
  763.             'post_type'   => '',
  764.             'taxonomy'    => '',
  765.             'min_max_step'=> '',
  766.             'class'       => '',
  767.             'condition'   => '',
  768.             'operator'    => 'and'
  769.           ),
  770.           array(
  771.             'id'          => 'hs_slidetext',
  772.             'label'       => 'Additional Text',
  773.             'desc'        => 'Insert short text for the banner. HTML is allowed',
  774.             'std'         => '',
  775.             'type'        => 'textarea',
  776.             'rows'        => '',
  777.             'post_type'   => '',
  778.             'taxonomy'    => '',
  779.             'min_max_step'=> '',
  780.             'class'       => '',
  781.             'condition'   => '',
  782.             'operator'    => 'and'
  783.           )
  784.         )
  785.       ),
  786.       array(
  787.         'id'          => 'hs_slidercarousel',
  788.         'label'       => 'Slider carousel',
  789.         'desc'        => 'Carousel option for slider in front page. Only nicely fit window if you have more than 5 sliders',
  790.         'std'         => '0',
  791.         'type'        => 'checkbox',
  792.         'section'     => 'slider',
  793.         'rows'        => '',
  794.         'post_type'   => '',
  795.         'taxonomy'    => '',
  796.         'min_max_step'=> '',
  797.         'class'       => '',
  798.         'condition'   => '',
  799.         'operator'    => 'and',
  800.         'choices'     => array(
  801.           array(
  802.             'value'       => 'true',
  803.             'label'       => 'Enable',
  804.             'src'         => ''
  805.           )
  806.         )
  807.       ),
  808.       array(
  809.         'id'          => 'hs_banner',
  810.         'label'       => 'Promo Banner',
  811.         'desc'        => 'Check if you want to enable promo banner',
  812.         'std'         => '',
  813.         'type'        => 'checkbox',
  814.         'section'     => 'slider',
  815.         'rows'        => '',
  816.         'post_type'   => '',
  817.         'taxonomy'    => '',
  818.         'min_max_step'=> '',
  819.         'class'       => '',
  820.         'condition'   => '',
  821.         'operator'    => 'and',
  822.         'choices'     => array(
  823.           array(
  824.             'value'       => 'true',
  825.             'label'       => 'Enable',
  826.             'src'         => ''
  827.           )
  828.         )
  829.       ),
  830.       array(
  831.         'id'          => 'hs_promos',
  832.         'label'       => 'Promo Banners',
  833.         'desc'        => 'Upload promo banners, recommended is <strong>3 banners</strong>',
  834.         'std'         => '',
  835.         'type'        => 'list-item',
  836.         'section'     => 'slider',
  837.         'rows'        => '',
  838.         'post_type'   => '',
  839.         'taxonomy'    => '',
  840.         'min_max_step'=> '',
  841.         'class'       => '',
  842.         'condition'   => '',
  843.         'operator'    => 'and',
  844.         'settings'    => array(
  845.           array(
  846.             'id'          => 'hs_bannerimg',
  847.             'label'       => 'Banner image',
  848.             'desc'        => 'Upload your promo banner. Recommended size is 260x140',
  849.             'std'         => '',
  850.             'type'        => 'upload',
  851.             'rows'        => '',
  852.             'post_type'   => '',
  853.             'taxonomy'    => '',
  854.             'min_max_step'=> '',
  855.             'class'       => '',
  856.             'condition'   => '',
  857.             'operator'    => 'and'
  858.           ),
  859.           array(
  860.             'id'          => 'hs_bannerlink',
  861.             'label'       => 'Banner Link',
  862.             'desc'        => 'Insert URL for promo link',
  863.             'std'         => '',
  864.             'type'        => 'text',
  865.             'rows'        => '',
  866.             'post_type'   => '',
  867.             'taxonomy'    => '',
  868.             'min_max_step'=> '',
  869.             'class'       => '',
  870.             'condition'   => '',
  871.             'operator'    => 'and'
  872.           )
  873.         )
  874.       ),
  875.       array(
  876.         'id'          => 'hs_brand',
  877.         'label'       => 'Brands carousel',
  878.         'desc'        => 'Add Brands carousel title. Leave this field blank if you don\'t want to use this feature.',
  879.         'std'         => '',
  880.         'type'        => 'text',
  881.         'section'     => 'slider',
  882.         'rows'        => '',
  883.         'post_type'   => '',
  884.         'taxonomy'    => '',
  885.         'min_max_step'=> '',
  886.         'class'       => '',
  887.         'condition'   => '',
  888.         'operator'    => 'and'
  889.       ),
  890.       array(
  891.         'id'          => 'hs_brandlist',
  892.         'label'       => 'Brands Logo',
  893.         'desc'        => 'Add Brand your logos',
  894.         'std'         => '',
  895.         'type'        => 'list-item',
  896.         'section'     => 'slider',
  897.         'rows'        => '',
  898.         'post_type'   => '',
  899.         'taxonomy'    => '',
  900.         'min_max_step'=> '',
  901.         'class'       => '',
  902.         'condition'   => '',
  903.         'operator'    => 'and',
  904.         'settings'    => array(
  905.           array(
  906.             'id'          => 'hs_brandimage',
  907.             'label'       => 'Image',
  908.             'desc'        => 'Add Brand logo',
  909.             'std'         => '',
  910.             'type'        => 'upload',
  911.             'rows'        => '',
  912.             'post_type'   => '',
  913.             'taxonomy'    => '',
  914.             'min_max_step'=> '',
  915.             'class'       => '',
  916.             'condition'   => '',
  917.             'operator'    => 'and'
  918.           ),
  919.           array(
  920.             'id'          => 'hs_brandlink',
  921.             'label'       => 'Link',
  922.             'desc'        => 'Insert full path url, else leave it blank.',
  923.             'std'         => '',
  924.             'type'        => 'text',
  925.             'rows'        => '',
  926.             'post_type'   => '',
  927.             'taxonomy'    => '',
  928.             'min_max_step'=> '',
  929.             'class'       => '',
  930.             'condition'   => '',
  931.             'operator'    => 'and'
  932.           )
  933.         )
  934.       ),
  935.       array(
  936.         'id'          => 'facebook',
  937.         'label'       => 'Facebook',
  938.         'desc'        => 'Facebook user/page name',
  939.         'std'         => '',
  940.         'type'        => 'text',
  941.         'section'     => 'social',
  942.         'rows'        => '',
  943.         'post_type'   => '',
  944.         'taxonomy'    => '',
  945.         'min_max_step'=> '',
  946.         'class'       => '',
  947.         'condition'   => '',
  948.         'operator'    => 'and'
  949.       ),
  950.       array(
  951.         'id'          => 'twitter',
  952.         'label'       => 'Twitter',
  953.         'desc'        => 'Your twitter username',
  954.         'std'         => '',
  955.         'type'        => 'text',
  956.         'section'     => 'social',
  957.         'rows'        => '',
  958.         'post_type'   => '',
  959.         'taxonomy'    => '',
  960.         'min_max_step'=> '',
  961.         'class'       => '',
  962.         'condition'   => '',
  963.         'operator'    => 'and'
  964.       ),
  965.       array(
  966.         'id'          => 'gplus',
  967.         'label'       => 'Google Plus',
  968.         'desc'        => 'Your Google+ ID',
  969.         'std'         => '',
  970.         'type'        => 'text',
  971.         'section'     => 'social',
  972.         'rows'        => '',
  973.         'post_type'   => '',
  974.         'taxonomy'    => '',
  975.         'min_max_step'=> '',
  976.         'class'       => '',
  977.         'condition'   => '',
  978.         'operator'    => 'and'
  979.       ),
  980.       array(
  981.         'id'          => 'pinterest',
  982.         'label'       => 'Pinterest',
  983.         'desc'        => 'Your pinterest username',
  984.         'std'         => '',
  985.         'type'        => 'text',
  986.         'section'     => 'social',
  987.         'rows'        => '',
  988.         'post_type'   => '',
  989.         'taxonomy'    => '',
  990.         'min_max_step'=> '',
  991.         'class'       => '',
  992.         'condition'   => '',
  993.         'operator'    => 'and'
  994.       ),
  995.       array(
  996.         'id'          => 'tumblr',
  997.         'label'       => 'Tumblr',
  998.         'desc'        => 'Your tumblr page url',
  999.         'std'         => '',
  1000.         'type'        => 'text',
  1001.         'section'     => 'social',
  1002.         'rows'        => '',
  1003.         'post_type'   => '',
  1004.         'taxonomy'    => '',
  1005.         'min_max_step'=> '',
  1006.         'class'       => '',
  1007.         'condition'   => '',
  1008.         'operator'    => 'and'
  1009.       ),
  1010.       array(
  1011.         'id'          => 'instagram',
  1012.         'label'       => 'Instagram',
  1013.         'desc'        => 'Your instagram username',
  1014.         'std'         => '',
  1015.         'type'        => 'text',
  1016.         'section'     => 'social',
  1017.         'rows'        => '',
  1018.         'post_type'   => '',
  1019.         'taxonomy'    => '',
  1020.         'min_max_step'=> '',
  1021.         'class'       => '',
  1022.         'condition'   => '',
  1023.         'operator'    => 'and'
  1024.       )
  1025.     )
  1026.   );
  1027.  
  1028.   /* allow settings to be filtered before saving */
  1029.   $custom_settings = apply_filters( ot_settings_id() . '_args', $custom_settings );
  1030.  
  1031.   /* settings are not the same update the DB */
  1032.   if ( $saved_settings !== $custom_settings ) {
  1033.     update_option( ot_settings_id(), $custom_settings );
  1034.   }
  1035.  
  1036.   /* Lets OptionTree know the UI Builder is being overridden */
  1037.   global $ot_has_custom_theme_options;
  1038.   $ot_has_custom_theme_options = true;
  1039.  
  1040. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement